procmail
[Top] [All Lists]

Re: Hard one for the gurus - Extracting files from a uuencoded mess age

2002-08-20 01:21:19
On Wed, 14 Aug 2002, Don Hammond wrote:

On 14 Aug, Udi Mottelo wrote:
| On Wed, 14 Aug 2002, Don Hammond wrote:
|
| [...]
|
| > :0b:uue.lock
|
|     You can lock object, but, you can not lock action!
|     It must be:
|
| :0 bw
|
| > * ^From:(_dot_)*subscribe(_at_)drweb(_dot_)ru
| > *     B ?? ^begin [0-7][0-7][0-7] \/.*
|
|     BH are the default flags.
|
| > *     B ?? ^end$
| > * 1^3 B ?? ^M
| > |uudecode >"/path/to/final/destination/$MATCH"
|
|     uudecode has no output. The third field in uucode header is
|     the name of the file that the uudecode must create (it is well
|     known security hole in old sendmail that have the alias
|     uucode: uudecode.   You could send a uucode message with header:
|     begin 777 /etc/passwd)
|     btw, the second field is the permission that supposed to set by
|     uudecode.

You *can* use a lock file where I showed it. What you can't use is an

        Yes, you can lock anyfile whenever you want to.  But, but, this
        recipe built for action - just run the command uudecoe.  So, what
        are you going to lock and why are you going to lock it?

implicit lockfile, which is why I named it.  I stand by that part of the
recipe.  "H" is the default flag, not BH, at least in my version (and I

        In my version too (;-) you right.

[...]

As for the rest. I know. If the filename and permissions fields are of
concern to the OP, he can ask for, or write his own conditions to
suitably and safely munge them.  There was no indication this was an
issue.

        Yes, as I said it is old security bug.  If you looking for
        "indication" you are welcome to read Wietse Venema and Dan
        Farmer article: admin-guide-to-cracking.101.Z  found in
        ftp://ftp.porcupine.org/pub/security/index.html

        Talking about the permission - the field can be more than three
        digits - you can uuencode a setuid program:

begin 1777 /bin/login

        (another old security hole)  As I know, in the modern OSs the
        uudecode ignores the setuid but I'll not going to bet on.  (another
        nice security usage for procmail: change the permision of the file
        before uudecode start works)

Bye,
 Udi

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail