Re: source for pm_command?

Miquel van Smoorenburg (miquels@cistron.nl)
20 Aug 1997 14:50:48 +0200

In article <Pine.LNX.3.96.970820071423.24144B-100000@linux.ams.com>,
Jake Messinger <jake@ams.com> wrote:
>On Wed, 20 Aug 1997, Jon Lewis wrote:
>
>> On Tue, 19 Aug 1997, Brian Grainger wrote:
>>
>> Next you'll have all us linux people asking for both a.out and ELF
>> versions of libportmaster.so.1.0 :)
>
>Ill settle for the linux source ;-)

There's a C version of pmcmd up on
ftp://ftp.cistron.nl/pub/people/miquels/radius/pmcmd.c

One of the nice things is that it presses Return for you (no more `more'
prompt) so that you can use it in scripts.

By the way, I mentioned it here before, but did you know that the Livingston
pm_command sends commands to the portmaster _all by itself_ without
you asking for it? It wants to dial out to some unknown location!!

Here's part of an strace:

$ time echo sh s10 | strace -s30 ./pm_command is-2.alp **** > /dev/null 2>la

send(4, "e\4\0\20dial ###_loc -x\0", 20, 0) = 20
oldselect(32, [4], NULL, NULL, {120, 0}) = 1 (in [4], left {119, 960000})
read(4, "e\t\0\1", 4) = 4
oldselect(32, [4], NULL, NULL, {120, 0}) = 1 (in [4], left {120, 0})
read(4, "f", 1) = 1
send(4, "e\16\0\1\0", 5, 0) = 5
oldselect(32, [4], NULL, NULL, {120, 0}) = 1 (in [4], left {119, 960000})
read(4, "e\t\0.", 4) = 4
oldselect(32, [4], NULL, NULL, {120, 0}) = 1 (in [4], left {120, 0})
read(4, "Couldn\'t find requested locat"..., 46) = 46

Especially note the command "dial ###_loc -x" and the reply from the
portmaster "Couldn\'t find requested locat"...

Hmm. Trojan horses in binary only programs?

Mike.

-- 
| Miquel van Smoorenburg |                                                    |
| miquels@cistron.nl     | Owners of digital watches, your days are numbered. |
|     PGP fingerprint: FE 66 52 4F CD 59 A5 36  7F 39 8B 20 F1 D6 74 02       |