万本电子书0元读

万本电子书0元读

顶部广告

Learning Penetration Testing with Python电子书

售       价:¥

4人正在读 | 0人评论 9.8

作       者:Christopher Duffy

出  版  社:Packt Publishing

出版时间:2015-09-30

字       数:229.6万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Utilize Python *ing to execute effective and efficient penetration tests About This Book Understand how and where Python *s meet the need for penetration testing Familiarise yourself with the process of highlighting a specific methodology to exploit an environment to fetch critical data Develop your Python and penetration testing skills with real-world examples Who This Book Is For If you are a security professional or researcher, with knowledge of different operating systems and a conceptual idea of penetration testing, and you would like to grow your knowledge in Python, then this book is ideal for you. What You Will Learn Familiarise yourself with the generation of Metasploit resource files Use the Metasploit Remote Procedure Call (MSFRPC) to automate exploit generation and execution Use Python’s Scrapy, network, socket, office, Nmap libraries, and custom modules Parse Microsoft Office spreadsheets and eXtensible Markup Language (XML) data files Write buffer overflows and reverse Metasploit modules to expand capabilities Exploit Remote File Inclusion (RFI) to gain administrative access to systems with Python and other *ing languages Crack an organization’s Internet perimeter Chain exploits to gain deeper access to an organization’s resources Interact with web services with Python In Detail Python is a powerful new-age *ing platform that allows you to build exploits, evaluate services, automate, and link solutions with ease. Python is a multi-paradigm programming language well suited to both object-oriented application development as well as functional design patterns. Because of the power and flexibility offered by it, Python has become one of the most popular languages used for penetration testing. This book highlights how you can evaluate an organization methodically and realistically. Specific tradecraft and techniques are covered that show you exactly when and where industry tools can and should be used and when Python fits a need that proprietary and open source solutions do not. Initial methodology, and Python fundamentals are established and then built on. Specific examples are created with vulnerable system images, which are available to the community to test *s, techniques, and exploits. This book walks you through real-world penetration testing challenges and how Python can help. From start to finish, the book takes you through how to create Python *s that meet relative needs that can be adapted to particular situations. As chapters progress, the * examples explain new concepts to enhance your foundational knowledge, culminating with you being able to build multi-threaded security tools, link security tools together, automate reports, create custom exploits, and expand Metasploit modules. Style and approach This book is a practical guide that will help you become better penetration testers and/or Python security tool developers. Each chapter builds on concepts and tradecraft using detailed examples in test environments that you can simulate.
目录展开

Learning Penetration Testing with Python

Table of Contents

Learning Penetration Testing with Python

Credits

Disclaimer

About the Author

Acknowlegements

About the Reviewers

www.PacktPub.com

Support files, eBooks, discount offers, and more

Why subscribe?

Free access for Packt account holders

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Downloading the color images of this book

Errata

Piracy

Questions

1. Understanding the Penetration Testing Methodology

An overview of penetration testing

Understanding what penetration testing is not

Vulnerability assessments

Reverse engineering engagements

Hacking

Assessment methodologies

The penetration testing execution standard

Pre-engagement interactions

White Box Testing

Grey Box Testing

Black Box Testing

Double Blind Testing

Intelligence gathering

Threat modeling

Vulnerability analysis

Exploitation

Post exploitation

Reporting

An example engagement

Penetration testing tools

NMAP

Metasploit

Veil

Burp Suite

Hydra

John the Ripper

Cracking Windows passwords with John

oclHashcat

Ophcrack

Mimikatz and Incognito

SMBexec

Cewl

Responder

theHarvester and Recon-NG

pwdump and fgdump

Netcat

Sysinternals tools

Summary

2. The Basics of Python Scripting

Understanding the difference between interpreted and compiled languages

Python – the good and the bad

A Python interactive interpreter versus a script

Environmental variables and PATH

Understanding dynamically typed languages

The first Python script

Developing scripts and identifying errors

Reserved words, keywords, and built-in functions

Global and local variables

Understanding a namespace

Modules and imports

Python formatting

Indentation

Python variables

Debugging variable values

String variables

Number variables

Converting string and number variables

List variables

Tuple variables

Dictionary variables

Understanding default values and constructors

Passing a variable to a string

Operators

Comparison operators

Assignment operators

Arithmetic operators

Logical and membership operators

Compound statements

The if statements

Python loops

The while loop

The for loop

The break condition

Conditional handlers

Functions

The impact of dynamically typed languages on functions on functions

Curly brackets

How to comment your code

The Python style guide

Classes

Functions

Variables and instance names

Arguments and options

Your first assessor script

Summary

3. Identifying Targets with Nmap, Scapy, and Python

Understanding how systems communicate

The Ethernet frame architecture

Layer 2 in Ethernet networks

Layer 2 in wireless networks

The IP packet architecture

The TCP header architecture

Understanding how TCP works

The TCP three-way handshake

The UDP header architecture

Understanding how UDP works

Understanding Nmap

Inputting the target ranges for Nmap

Executing the different scan types

Executing TCP full connection scans

Executing SYN scans

Executing ACK scans

Executing UDP scans

Executing combined UDP and TCP scans

Skipping the operating system scans

Different output types

Understanding the Nmap Grepable output

Understanding the Nmap XML output

The Nmap scripting engine

Being efficient with Nmap scans

Determining your interface details with the netifaces library

Nmap libraries for Python

The Scapy library for Python

Summary

4. Executing Credential Attacks with Python

The types of credential attacks

Defining the online credential attack

Defining the offline credential attack

Identifying the target

Creating targeted usernames

Generating and verifying usernames with help from the U.S. census

Generating the usernames

Testing for users using SMTP VRFY

Creating the SMTP VRFY script

Summary

5. Exploiting Services with Python

Understanding the new age of service exploitation

Understanding the chaining of exploits

Checking for weak, default, or known passwords

Gaining root access to the system

Understanding the cracking of Linux hashes

Testing for the synchronization of account credentials

Automating the exploit train with Python

Summary

6. Assessing Web Applications with Python

Identifying live applications versus open ports

Identifying hidden files and directories with Python

Credential attacks with Burp Suite

Using twill to walk through the source

Understanding when to use Python for web assessments

Understanding when to use specific libraries

Being efficient during web assessments

Summary

7. Cracking the Perimeter with Python

Understanding today's perimeter

Clear-text protocols

Web applications

Encrypted remote access services

Virtual Private Networks (VPNs)

Mail services

Domain Name Service (DNS)

User Datagram Protocol (UDP) services

Understanding the link between accounts and services

Cracking inboxes with Burp Suite

Identifying the attack path

Understanding the limitations of perimeter scanning

Downloading backup files from a TFTP server

Determining the backup filenames

Cracking Cisco MD5 hashes

Gaining access through websites

The execution of file inclusion attacks

Verifying an RFI vulnerability

Exploiting the hosts through RFI

Summary

8. Exploit Development with Python, Metasploit, and Immunity

Getting started with registers

Understanding general purpose registers

The EAX

The EBX

The ECX

The EDX

Understanding special purpose registers

The EBP

The EDI

The EIP

The ESP

Understanding the Windows memory structure

Understanding the stack and the heap

Understanding the program image and dynamic-link libraries

Understanding the process environment block

Understanding the thread environment block

Kernel

Understanding memory addresses and endianness

Understanding the manipulation of the stack

Understanding immunity

Understanding basic buffer overflow

Writing a basic buffer overflow exploit

Understanding stack adjustments

Understanding the purpose of local exploits

Understanding other exploit scripts

Exploiting standalone binaries by executing scripts

Exploiting systems by TCP service

Exploiting systems by UDP service

Reversing Metasploit modules

Understanding protection mechanisms

Summary

9. Automating Reports and Tasks with Python

Understanding how to parse XML files for reports

Understanding how to create a Python class

Creating a Python script to parse an Nmap XML

Creating a Python script to generate Excel spreadsheets

Summary

10. Adding Permanency to Python Tools

Understanding logging within Python

Understanding the difference between multithreading and multiprocessing

Creating a multithreaded script in Python

Creating a multiprocessing script in Python

Building industry-standard tools

Summary

Index

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部