![]() | |
| |||||||
| Home | Register | Projects | Blogs | FAQ | Calendar | Search | Today's Posts | Mark Forums Read | Free Directory | Free DNSReport | Tags |
| Notices |
| Hacking Discuss the art of hacking, your experiences, etc... |
generating shellcodeThis is a discussion on "generating shellcode" within the Hacking part of the Computer Security: Discussions section; Hi All, trying to generate useable shellcode using shellforge... Here's my localshell.c #include <stdio.h> int main(void) { char *arg[2]; arg[0] = "/bin/sh"; arg[1] = NULL; execve("/bin/sh", arg, ... |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
| Hi All, trying to generate useable shellcode using shellforge... Here's my localshell.c #include <stdio.h> int main(void) { char *arg[2]; arg[0] = "/bin/sh"; arg[1] = NULL; execve("/bin/sh", arg, NULL); } H3llfyr3@slax:~/exploitdev/shellforge$ ./shellforge.py localshell.c ** Compiling localshell.c ** Tuning original assembler code ERROR: Error at [call execve@PLT]: Symbol not found any ideas on what is causing this? |
| Sponsor | ||
| ||
| |
| ||||
| try #include <stdio.h> int main() { char arg[] = "/bin/sh"; char arg2[] = "ls"; char env=NULL; execve(arg,arg2,env); return 0; } or int main() { char *arg[] = {"/bin/sh","ls",NULL}; execve(arg[1],arg[2],arg[3]); return 0; } you are maybe misunderdstanding this function execve, look google. |
| |||
| Cheers class101, no difference I'm afraid, they both produce the same output, BTW my original code compiles correctly #include <stdio.h> int main() { char arg[] = "/bin/sh"; char arg2[] = "ls"; char env=NULL; execve(arg,arg2,env); return 0; } h3llfyr3@slax:~/exploitdev/shellforge$ ./shellforge.py class101shell.c ** Compiling class101shell.c class101shell.c: In function `main': class101shell.c:6: warning: initialization makes integer from pointer without a cast ** Tuning original assembler code ERROR: Error at [call execve@PLT]: Symbol not found |
| ||||
| then don't use shellforge, I don't see why you use such useless proggy, just compile your binary and get the shellcode from its assembly.. |
![]() |
| | |
| generating, shellcode | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| linux shellcode | fl0 fl0w | Programming | 0 | 27-12-07 12:59 |
| Shellcode Decoding | Yog-Sotho | Programming | 10 | 19-05-06 01:12 |
| IIS 5.0 WebDAV ntdll.dll Overflow Exploit | touk | Public | 9 | 20-03-06 12:03 |
| my shellcode collection | class101 | Shared Links | 0 | 19-12-05 11:19 |
| GetPC shellcode for WinXPSP1? | w4terlime | Hacking | 2 | 26-07-05 06:48 |