O'Reilly logo

Gray Hat Hacking The Ethical Hacker's Handbook, Fourth Edition, 4th Edition by Stephen Sims, Ryan Linn, Branko Spasojevic, Jonathan Ness, Chris Eagle, Allen Harper, Shon Harris, Daniel Regalado

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 7

 

Writing Linux Shellcode

In the previous chapters, we used Aleph1’s ubiquitous shellcode. In this chapter, we will learn to write our own. Although the previously shown shellcode works well in the examples, the exercise of creating your own is worthwhile because there will be many situations where the standard shellcode does not work and you will need to create your own.

            In this chapter, we cover the following topics:

            •  Writing basic Linux shellcode

            •  Implementing port-binding shellcode

            •  Implementing reverse connecting shellcode

            •  Encoding shellcode

            •  Automating shellcode generation with Metasploit

 

Basic Linux Shellcode

The term shellcode refers to self-contained ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required