Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | [REVS] Introduction to Shellcoding - How to Exploit Buffer Overflows |
|---|---|
| Date: | 20 Oct 2004 18:51:05 +0200 |
The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com - - promotion The SecuriTeam alerts list - Free, Accurate, Independent. Get your security news from a reliable source. http://www.securiteam.com/mailinglist.html - - - - - - - - - Introduction to Shellcoding - How to Exploit Buffer Overflows ------------------------------------------------------------------------ SUMMARY The paper provides a tutorial on how to write shellcodes for the Windows and Unix environments, with a focus on Linux shellcodes. The paper starts from a simple buffer overflow scenario, and explains how to detect the vulnerability and how to write an appropriate shellcode for it. DETAILS What Is a Shellcode? Shellcode is a piece of machine-readable code, or script code that has just one mission; to open up a command interpreter (shell) on the target system so that an attacker can type in commands in the same fashion as a regular authorized user or system administrator of that system can do (with a few not-so-important exceptions of course). However, in order to get remote access to the shell, you're going to need some kind of networking support in that shellcode too. There's more to shellcoding than just having a program execute /bin/sh or cmd.exe. This white paper will introduce you to shellcodes, how they're used in practice, and how they are used with buffer overflow vulnerabilities. Since it's important that the shellcode is very small, the shellcode hacker usually writes the code in the assembly programming language. In this white paper I will be using x86 Intel syntax assembly under Linux. The GNU compiler (gcc) uses AT&T syntax, which is somewhat different from Intel syntax. All assembly examples can be compiled with Netwide Assembler <http://nasm.sourceforge.net> nasm a portable Intel syntax assembler available for a wide variety of operating systems. nasm is readily available in most GNU/Linux distributions. What About the Code in Shellcode? Shellcode is primarily used to exploit buffer overflows (including heap overflows) or format string bugs in binary, machine-readable software. In these software, the shellcode has to be machine-readable too, and to make things more complicated it can't contain any null bytes (0x00). Null (0) is a string delimiter which instructs all C string functions (and other implementations) to, once found, stop processing the string (thus, a null-terminated string). There are other delimiters like linefeed (0x0A), carriage return (0x0D), 0xFF, and others. Some depend on how the programmer wrote the program (or the vulnerable function that handles input) and other implementations depend on underlying C library functions or 3rd party libraries, etc. ADDITIONAL INFORMATION The original article can be found at: <http://tigerteam.se/dl/papers/intro_to_shellcoding.pdf> http://tigerteam.se/dl/papers/intro_to_shellcoding.pdf ======================================== This bulletin is sent to members of the SecuriTeam mailing list. To unsubscribe from the list, send mail with an empty subject line and body to: list-unsubscribe@securiteam.com In order to subscribe to the mailing list, simply forward this email to: list-subscribe@securiteam.com ==================== ==================== DISCLAIMER: The information in this bulletin is provided "AS IS" without warranty of any kind. In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [EXPL] BitchX Local Root Exploit, SecuriTeam |
|---|---|
| Next by Date: | [NT] Microsoft's 'Fight Spyware' Information Center, SecuriTeam |
| Previous by Thread: | [EXPL] BitchX Local Root Exploit, SecuriTeam |
| Next by Thread: | [NT] Microsoft's 'Fight Spyware' Information Center, SecuriTeam |
| Indexes: | [Date] [Thread] [Top] [All Lists] |