Book Image

Mastering Metasploit

By : Nipun Jaswal
Book Image

Mastering Metasploit

By: Nipun Jaswal

Overview of this book

Table of Contents (17 chapters)
Mastering Metasploit
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Building up the exploit base


We are now familiar with most of the processes carried out during exploitation. We saw how debuggers work and we saw how we can find out the values in various registers after an overwrite has taken place. Therefore, let's now see that how we can finalize the writing process of the exploit using Metasploit and its various tools.

Calculating the buffer size

Let's continue with the Generating junk section that we discussed previously. Let's try to find the exact location of the crash and answer the unsolved questions in our mind about that approach. However, here we will use a different but similar application. You can find the reference link of the vulnerable application from the information box at the end of this section. Ok, so let's create a pattern again:

To create a pattern of 500 junk data bytes with the pattern_create.rb tool from Metasploit, we need to supply this pattern to the target application as the input. Let's save it to a file this time:

Now, our file...