Metasploit Penetration Testing Cookbook
Format: PDF / Kindle (mobi) / ePub
Over 70 recipes to master the most widely used penetration testing framework
* More than 80 recipes/practicaltasks that will escalate the reader's knowledge from beginner to an advanced level
* Special focus on the latest operating systems, exploits, and penetration testing techniques
* Detailed analysis of third party tools based on the Metasploit framework to enhance the penetration testing experience
Metasploit® software helps security and IT professionals identify security issues, verify vulnerability mitigations, and manage expert-driven security assessments. Capabilities include smart exploitation, password auditing, web application scanning, and social engineering. Teams can collaborate in Metasploit and present their findings in consolidated reports. The goal of the software is to provide a clear understanding of the critical vulnerabilities in any environment and to manage those risks.
Metasploit Penetration Testing Cookbook targets both professionals and beginners to the framework. The chapters of the book are logically arranged with an increasing level of complexity and cover Metasploit aspects ranging from pre-exploitation to the post-exploitation phase thoroughly. The recipe structure of the book provides a good mix of both theoretical understanding and practical implementation.
This book will help readers in thinking from a hacker's perspective to dig out the flaws in target networks and also to leverage the powers of Metasploit to compromise them. It will take your penetration skills to the next level.
The book starts with the basics such as gathering information about your target and gradually covers advanced topics like building your own framework scripts and modules. The book goes deep into operating systems-based penetration testing techniques and moves ahead with client-based exploitation methodologies. In the post- exploitation phase, it covers meterpreter, antivirus bypass, ruby wonders, exploit building, porting exploits to framework, and third party tools like armitage, and SET.
Metasploit Penetration Testing Cookbook is the required guide to penetration testing and exploitation.
What you will learn from this book
* Set up a complete penetration testing environment using metasploit and virtual machines
* Learn to penetration-test popular operating systems such as Windows7, Windows 2008 Server, Ubuntu etc.
* Get familiar with penetration testing based on client side exploitation techniques with detailed analysis of vulnerabilities and codes
* Avail of exclusive coverage of antivirus bypassing techniques using metasploit
* Master post-exploitation techniques such as exploring the target, keystrokes capturing, sniffing, pivoting, setting persistent connections etc.
* Build and analyze meterpreter scripts in Ruby
* Build and export exploits to framework
* Use extension tools like Armitage, SET etc.
This is a Cookbook which follows a practical task-based style. There are plenty of code and commands used for illustration which make your learning curve easy and quick.
Who this book is written for
This book targets both professional penetration testers as well as new users of Metasploit who wish to gain expertise over the framework. The book requires basic knowledge of scanning, exploitation, and Ruby language
www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access. Dedicated to my grandparents for their blessings. To my parents and sister for their support and encouragement, and to my dear friend Neetika for being a motivator. -Abhinav Singh Preface Penetration testing is one of the core aspects of network security in today's scenario. It involves a complete analysis of the system by implementing
basics. The next step will be the same as we discussed in the previous two recipes. The only difference will be in using the exploit. How to do it... To perform penetration testing on the Windows 2003 Server, follow these steps: Let us start with searching for netapi. This will list any available exploit related to netapi in the Metasploit directory:msf > search netapi Matching Modules ================ Name Disclosure Date Rank ---- --------------- ----
already seen the use of meterpreter and post-exploitation in the previous chapter of antivirus bypass. In this chapter, we will understand in detail about meterpreter and how to use it as a potential tool for the post-exploitation phase. We have been using payloads in order to achieve specific results but they have a major disadvantage. Payloads work by creating new processes in the compromised system. This can trigger alarms in the antivirus programs and can be caught easily. Also, a payload is
straightforward. The twist begins with defining the exploit() function. Let us see how we can do this. We will start with the first four bytes of the original exploit script, that is, $magic = "Mjik"; It will be replaced with sploit = "Mjik" in our module. Then, we move ahead and build our buffer. As we have found the position where EIP has been overwritten, we can replace the repeated return address value by: sploit << rand_text_alpha_upper(1028); sploit << [target.ret].pack('V'); Then,
ETTERCAP TO LISTEN ON, IF NOTHING WILL DEFAULT # EXAMPLE: ETTERCAP_INTERFACE=wlan0 ETTERCAP_INTERFACE=eth0 # # ETTERCAP HOME DIRECTORY (NEEDED FOR DNS_SPOOF) ETTERCAP_PATH=/usr/share/ettercap Ettercap is a multipurpose sniffer for switched LAN. Ettercap section can be used to perform LAN attacks like DNS poisoning, spoofing etc. The above SET setting can be used to either set ettercap ON of OFF depending upon the usability. # SENDMAIL ON OR OFF FOR SPOOFING EMAIL ADDRESSES Ettercap is a