Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleBuild & Run
lazenca0x0@ubuntu:~/Shell$ gcc -o shell2 -fno-stack-protector -z execstack --no-pie -m32 shell2.c
lazenca0x0@ubuntu:~/Shell$ ./shell2 
Shellcode len : 36
$ id
uid=1000(lazenca0x0) gid=1000(lazenca0x0) groups=1000(lazenca0x0),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),113(lpadmin),128(sambashare)
$ 

...

Code Block
titleBuild & Run
lazenca0x0@ubuntu:~/Shell$ gcc -o test -fno-stack-protector -z execstack --no-pie -m32 test.c
lazenca0x0@ubuntu:~/Shell$ sudo chown root:root ./test
lazenca0x0@ubuntu:~/Shell$ sudo chmod 4755 ./test
lazenca0x0@ubuntu:~/Shell$ ls -al
total 44
drwxrwxr-x  2 lazenca0x0 lazenca0x0 4096 Feb 21 00:44 .
drwxr-xr-x 24 lazenca0x0 lazenca0x0 4096 Feb 15 00:37 ..
-rwsr-xr-x  1 root       root       7568 Feb 21 00:44 test
-rw-rw-r--  1 lazenca0x0 lazenca0x0  431 Feb 21 00:43 test.c
lazenca0x0@ubuntu:~/Shell$ ./test
Shellcode len : 36
$ id
uid=1000(lazenca0x0) gid=1000(lazenca0x0) groups=1000(lazenca0x0),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),113(lpadmin),128(sambashare)
$ 

...