Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Shellcode
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Small piece of code used as a payload to exploit a software vulnerability}} {{Redirect|Shell code|code written in a shell's command language|Shell script}} {{Redirect|Alphanumeric executable|executable code presented in hexadecimal format|Hex file (disambiguation)}} In [[hacker (computer security)|hacking]], a '''shellcode''' is a small piece of code used as the [[Payload (computing)|payload]] in the [[exploit (computer security)|exploitation]] of a software [[Vulnerability (computing)|vulnerability]]. It is called "shellcode" because it typically starts a [[Shell (computing)|command shell]] from which the attacker can control the compromised machine, but any piece of code that performs a similar task can be called shellcode. Because the function of a payload is not limited to merely spawning a shell, some have suggested that the name shellcode is insufficient.<ref>{{cite book |title=Sockets, Shellcode, Porting, & Coding: Reverse Engineering Exploits and Tool Coding for Security Professionals |author-first1=James C. |author-last1=Foster |author-first2=Mike |author-last2=Price |publisher=Elsevier Science & Technology Books |date=2005-04-12 |isbn=1-59749-005-9 |url=https://books.google.com/books?id=ZNI5dvBSfZoC}}</ref> However, attempts at replacing the term have not gained wide acceptance. Shellcode is commonly written in [[machine code]]. When creating shellcode, it is generally desirable to make it both small and executable, which allows it to be used in as wide a variety of situations as possible.<ref name="anley_koziol_2007">{{Cite book |title=The shellcoder's handbook: discovering and exploiting security holes |date=2007 |publisher=Wiley |author-first1=Chris |author-last1=Anley |author-first2=Jack |author-last2=Koziol |isbn=978-0-470-19882-7 |edition=2 |location=Indianapolis, Indiana, UA |oclc=173682537}}</ref> In assembly code, the same function can be performed in a multitude of ways and there is some variety in the lengths of opcodes that can be used for this purpose; good shellcode writers can put these small opcodes to use to create more compact shellcode.<ref>{{Cite book |title=Buffer overflow attacks: detect, exploit, prevent |date=2005 |publisher=Syngress |author-last=Foster |author-first=James C. |isbn=1-59749-022-9 |location=Rockland, MA, USA |oclc=57566682}}</ref> Some have reached the smallest possible size while maintaining stability.<ref>{{Cite web |title=Tiny Execve sh - Assembly Language - Linux/x86 |url=https://github.com/geyslan/SLAE/blob/master/4th.assignment/tiny_execve_sh.asm |access-date=2021-02-01 |website=GitHub}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)