Hacking: The Art of Exploitation

Last updated
"Hacking, The art of exploitation" Hackingexplota.jpg
"Hacking, The art of exploitation"

Hacking: The Art of Exploitation ( ISBN   1-59327-007-0) is a book by Jon "Smibbs" Erickson about computer security and network security. [1] It was published by No Starch Press in 2003, [2] [3] with a second edition in 2008. [4] [5] All the examples in the book were developed, compiled, and tested on Gentoo Linux. The accompanying CD provides a Linux environment containing all the tools and examples referenced in the book.

Contents

Background information

Jon "Smibbs" Erickson worked in the field of computer security with a background in computer science. [6] As of 2011, he worked as a vulnerability researcher and computer security specialist in northern California. A bootable CD is included with the book which provides a Linux-based programming and debugging environment for the users.

Content of 1st edition

The content of Exploiting (2003) moves between programming, networking, and cryptography. The book does not use any notable measure of real-world examples: discussions rarely bring up specific worms and exploits.

Programming

The computer programming portion of Hacking takes up over half of the book. This section goes into the development, design, construction, and testing of exploit code, and thus involves some basic assembly programming. The demonstrated attacks range from simple buffer overflows on the stack to techniques involving overwriting the Global Offset Table.

While Erickson discusses countermeasures such as a non-executable stack and how to evade them with return-to-libc attacks, he does not dive into deeper matters without known guaranteed exploits such as address space layout randomization. The book also does not cover the Openwall, GrSecurity, and PaX projects, or kernel exploits.

Networking

The networking segment of Hacking explains the basics of the OSI model and basic networking concepts, including packet sniffing, connection hijacking, denial of service, and port scanning.

Cryptology

The cryptology section of Hacking covers basic information theory, in addition to symmetric and asymmetric encryption. It winds out in cracking WEP utilizing the Fluhrer, Mantin, and Shamir attacks. Besides the basics, including man-in-the-middle attacks, dictionary attacks, and the use of John the Ripper; Hacking discusses quantum key distribution, Lov Grover's Quantum Search Algorithm, and Peter Shor's Quantum Factoring Algorithm, which are used for breaking RSA encryption using a very large quantum computer.

Other details

The front cover of Hacking shows the complete process: from reverse engineering to carrying out the attack, and developing an exploit for a program that is vulnerable to buffer overflow in its command-line arguments.

Content of 2nd edition

Hacking: The Art of Exploitation Second Edition
Hacking Book Cover second edition.jpg
AuthorJon Erickson
LanguageEnglish (Second Edition)
SeriesSecond Edition
Genre Computer Science
PublisherNo Starch Press
Publication date
February 2008
Publication placeUnited States (Original)
Media typePrint Paperback
Pages488
ISBN 978-1593271442

The content of Hacking: The Art of Exploitation Second Edition (2008), the introduction of the book states that hacking should only be done within the confines of the law, and only for productive reasons. Below are the chapters:

  1. 0x200 Programming: This chapter covers control structures and other basic aspects of programming.
  2. 0x300 Exploitation: This chapter covers exploit techniques such as memory corruption, Buffer overflows and format strings, especially using Perl and Bash shellcode.
  3. 0x400 Networking
  4. OSI Model: In communication among computers through networking, the OSI Model is used. This model provides the standards that computers use to communicate.
  5. 0x500 Shellcode: Shellcode is a custom code written by a hacker for execution upon gaining control over a program.
  6. 0x600 Countermeasures: This part of the book is about having defenses and intrusion prevention systems to stop known hacking exploits.
  7. 0x700 Cryptology
The OSI Model OSI Model v1.svg
The OSI Model

See also

Related Research Articles

<span class="mw-page-title-main">Buffer overflow</span> Anomaly in computer security and programming

In programming and information security, a buffer overflow or buffer overrun is an anomaly whereby a program writes data to a buffer beyond the buffer's allocated memory, overwriting adjacent memory locations.

In hacking, a shellcode is a small piece of code used as the payload in the exploitation of a software vulnerability. It is called "shellcode" because it typically starts a 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. However, attempts at replacing the term have not gained wide acceptance. Shellcode is commonly written in machine code.

A heap overflow, heap overrun, or heap smashing is a type of buffer overflow that occurs in the heap data area. Heap overflows are exploitable in a different manner to that of stack-based overflows. Memory on the heap is dynamically allocated at runtime and typically contains program data. Exploitation is performed by corrupting this data in specific ways to cause the application to overwrite internal structures such as linked list pointers. The canonical heap overflow technique overwrites dynamic memory allocation linkage and uses the resulting pointer exchange to overwrite a program function pointer.

In computer security, hardening is usually the process of securing a system by reducing its attack surface, which is larger when a system performs more functions; in principle a single-function system is more secure than a multipurpose one. Reducing available ways of attack typically includes changing default passwords, the removal of unnecessary software, unnecessary usernames or logins, and the disabling or removal of unnecessary services.

Network security are security controls, policies, processes and practices adopted to prevent, detect and monitor unauthorized access, misuse, modification, or denial of a computer network and network-accessible resources. Network security involves the authorization of access to data in a network, which is controlled by the network administrator. Users choose or are assigned an ID and password or other authenticating information that allows them access to information and programs within their authority. Network security covers a variety of computer networks, both public and private, that are used in everyday jobs: conducting transactions and communications among businesses, government agencies and individuals. Networks can be private, such as within a company, and others which might be open to public access. Network security is involved in organizations, enterprises, and other types of institutions. It does as its title explains: it secures the network, as well as protecting and overseeing operations being done. The most common and simple way of protecting a network resource is by assigning it a unique name and a corresponding password.

A penetration test, colloquially known as a pentest, is an authorized simulated cyberattack on a computer system, performed to evaluate the security of the system; this is not to be confused with a vulnerability assessment. The test is performed to identify weaknesses, including the potential for unauthorized parties to gain access to the system's features and data, as well as strengths, enabling a full risk assessment to be completed.

<span class="mw-page-title-main">Peiter Zatko</span> American computer security expert

Peiter C. Zatko, better known as Mudge, is an American network security expert, open source programmer, writer, and hacker. He is currently the chief information officer of DARPA. He was the most prominent member of the high-profile hacker think tank the L0pht as well as the computer and culture hacking cooperative the Cult of the Dead Cow.

A ping of death is a type of attack on a computer system that involves sending a malformed or otherwise malicious ping to a computer. In this attack, a host sends hundreds of ping requests with a packet size that is large or illegal to another host to try to take it offline or to keep it preoccupied responding with ICMP Echo replies.

No Starch Press is an American publishing company, specializing in technical literature often geared towards the geek, hacker, and DIY subcultures. Popular titles include Hacking: The Art of Exploitation, Andrew Huang's Hacking the Xbox, and How Wikipedia Works.

The OpenBSD operating system focuses on security and the development of security features. According to author Michael W. Lucas, OpenBSD "is widely regarded as the most secure operating system available anywhere, under any licensing terms."

Improper input validation or unchecked user input is a type of vulnerability in computer software that may be used for security exploits. This vulnerability is caused when "[t]he product does not validate or incorrectly validates input that can affect the control flow or data flow of a program."

In client-server computing, a Unix domain socket is a Berkeley socket that allows data to be exchanged between two processes executing on the same Unix or Unix-like host computer. This is similar to an Internet domain socket that allows data to be exchanged between two processes executing on different host computers.

In computer security, a NOP slide, NOP sled or NOP ramp is a sequence of NOP (no-operation) instructions meant to "slide" the CPU's instruction execution flow to its final, desired destination whenever the program branches to a memory address anywhere on the slide.

In software, a stack buffer overflow or stack buffer overrun occurs when a program writes to a memory address on the program's call stack outside of the intended data structure, which is usually a fixed-length buffer. Stack buffer overflow bugs are caused when a program writes more data to a buffer located on the stack than what is actually allocated for that buffer. This almost always results in corruption of adjacent data on the stack, and in cases where the overflow was triggered by mistake, will often cause the program to crash or operate incorrectly. Stack buffer overflow is a type of the more general programming malfunction known as buffer overflow. Overfilling a buffer on the stack is more likely to derail program execution than overfilling a buffer on the heap because the stack contains the return addresses for all active function calls.

<span class="mw-page-title-main">Cryptography</span> Practice and study of secure communication techniques

Cryptography, or cryptology, is the practice and study of techniques for secure communication in the presence of adversarial behavior. More generally, cryptography is about constructing and analyzing protocols that prevent third parties or the public from reading private messages. Modern cryptography exists at the intersection of the disciplines of mathematics, computer science, information security, electrical engineering, digital signal processing, physics, and others. Core concepts related to information security are also central to cryptography. Practical applications of cryptography include electronic commerce, chip-based payment cards, digital currencies, computer passwords, and military communications.

Post-quantum cryptography (PQC), sometimes referred to as quantum-proof, quantum-safe, or quantum-resistant, is the development of cryptographic algorithms that are currently thought to be secure against a cryptanalytic attack by a quantum computer. Most widely-used public-key algorithms rely on the difficulty of one of three mathematical problems: the integer factorization problem, the discrete logarithm problem or the elliptic-curve discrete logarithm problem. All of these problems could be easily solved on a sufficiently powerful quantum computer running Shor's algorithm or even faster and less demanding alternatives.

Mobile security, or mobile device security, is the protection of smartphones, tablets, and laptops from threats associated with wireless computing. It has become increasingly important in mobile computing. The security of personal and business information now stored on smartphones is of particular concern.

Sigreturn-oriented programming (SROP) is a computer security exploit technique that allows an attacker to execute code in presence of security measures such as non-executable memory and code signing. It was presented for the first time at the 35th IEEE Symposium on Security and Privacy in 2014 where it won the best student paper award. This technique employs the same basic assumptions behind the return-oriented programming (ROP) technique: an attacker controlling the call stack, for example through a stack buffer overflow, is able to influence the control flow of the program through simple instruction sequences called gadgets. The attack works by pushing a forged sigcontext structure on the call stack, overwriting the original return address with the location of a gadget that allows the attacker to call the sigreturn system call. Often just a single gadget is needed to successfully put this attack into effect. This gadget may reside at a fixed location, making this attack simple and effective, with a setup generally simpler and more portable than the one needed by the plain return-oriented programming technique.

The Zealot Campaign is a cryptocurrency mining malware collected from a series of stolen National Security Agency (NSA) exploits, released by the Shadow Brokers group on both Windows and Linux machines to mine cryptocurrency, specifically Monero. Discovered in December 2017, these exploits appeared in the Zealot suite include EternalBlue, EternalSynergy, and Apache Struts Jakarta Multipart Parser attack exploit, or CVE-2017-5638. The other notable exploit within the Zealot vulnerabilities includes vulnerability CVE-2017-9822, known as DotNetNuke (DNN) which exploits a content management system so that the user can install a Monero miner software. An estimated USD $8,500 of Monero having been mined on a single targeted computer. The campaign was discovered and studied extensively by F5 Networks in December 2017.

William "Chuck" Easttom II is an American computer scientist specializing in cyber security, cryptography, quantum computing, and systems engineering.

References

  1. "Book Review: Hacking". Unix Review . 25 July 2004. Archived from the original on 25 July 2004. Retrieved 26 July 2018.
  2. Bruen, Robert (March 15, 2004). "Robert Bruen's review of "Hacking. The Art of Exploitation" by Jon Erikson, No Starch Press 2003, IEEE Cipher, E59 Mar 15, 2004". Ieee-security.org. Retrieved 2024-01-07.
  3. Stytz, Martin R. (March 2004). "Hacking for Understanding". IEEE Security & Privacy. IEEE. doi:10.1109/MSECP.2004.1281235. ISSN   1558-4046.
  4. Henry-Stocker, Sandra (2008-04-02). "Book Review-- Hacking: The Art of Exploitation, 2nd Edition". Computerworld . ISSN   0010-4841 . Retrieved 2024-01-07.
  5. Schaefer, Ed. "Hacking: The Art of Exploitation, 2nd Edition » Linux Magazine". Linux Magazine . ISSN   1471-5678 . Retrieved 2024-01-07.
  6. "Jon Erickson". Oreilly.com. Retrieved 2023-04-14.

Other sources