Violent Python: A Cookbook for Hackers, Forensic Analysts, Penetration Testers and Security Engineers (33 page)

bridging FTP and web,
56

66
port scanner,
32

33
BSD sockets,
32
TCP,
32
TCP/IP sockets,
32
SSH,
41

56

N

National Oceanic and Atmospheric Administration (NOAA),
214
Network-based intrusion detection system (NIDS),
162
Networking,
9

10
NIDS.
See
Network-based intrusion detection system
NOAA.
See
National Oceanic and Atmospheric Administration

O

Organizational unique identifier (OUI),
203

P

Password authentication,
50

52
Password cracking,
24
,
29
UNIX,
21

24
zip-file,
24

29
script for,
28

29
PDF file.
See
Portable document format file
PDF metadata parsing using PyPDF,
93

95
Peekaboo project,
174

175
Penetration test,
1
pentest engagement document,
2
Python language,
6

7
dictionaries,
9
exception handling,
10

12
file I/O,
16

17
functions,
12

14
iteration,
14

16
lists,
8

9
networking,
9

10
OS module,
18

20
selection,
10
strings,
7

8
sys module,
17

18
variables,
7
Python programs,
20
cuckoo’s egg,
20

21
UNIX password cracker,
21

24
zip-file password cracker,
24

29
setting up development environment
interpreted vs. interactive Python,
5

6
Python download site,
2
Python standard library,
2
third party libraries installations,
3

5
third-party packages,
2
Pentagon’s computer network,
143
checkTTL() function,
147
decoy Nmap scan identification,
149
testTTL() function,
146
TTL field,
144

145
Pexpect module,
42
Phishing with Smtplib,
239
places.sqlite
database,
111

112
Portable document format file (PDF file),
93
Public-key cryptograph,
50
Pxssh script,
45

46
Pyinstaller,
248
,
249
Python,
5

6
interpreter,
2
,
5

6
programs,
20
cuckoo’s egg,
20

21
cyber fast track program,
24
UNIX password cracker,
21

24
zip-file password cracker,
24

29
regular expressions,
175

176
using findCreditCard() function,
176
credit card information,
175
using findCreditCard() function,
176
using Scapy library,
176

177
test case program,
176
unencrypted wireless network,
177

178
standard library,
2
threading,
37
Windows Installer,
5
Python 2.x,
5
Python interaction with Metasploit
Meterpreter process,
70
using Nmap-Python module,
69
Python ObexFTP, printer with,
207

208
Python programming language,
6

7
,
32
built-in OS module,
18

20
built-in sys module,
17

18
dictionaries,
9
download site,
2
exception handling,
10

12
file I/O,
16

17
iteration
checking IP addresses,
14
testing IP addresses,
15

16
vulnerabilities checking,
14

15
lists,
8

9
networking,
9

10
selection,
10
strings,
7

8
variables,
7
Python-Nmap integration,
39
filtering access,
41
locating and identifying targets,
40

41
Python-nmap package,
3

4

R

Recv(1024) method,
9

10
Recycle bin, deleted item recover in,
89
using OS module,
90
SID correlation to user,
90

93
Remote shell (RSH),
41

42
RFCOMM channel scanning
Bluetooth service discovery profile,
206
dubbed BlueBug,
205
RFCOMM connections,
206
unauthenticated channels,
205

206
Rich Text Format (RTF),
81

82
RSH.
See
Remote shell

S

Safari Web Browser,
198
Scraping web pages with anonbrowser,
219
interaction with Google,
223

224
links,
225

227
URL encoding,
224

225
mirroring images,
222

223
parsing links,
219

220
parsing tweets
location data out,
229

231
regular expressions,
234
target’s interests,
231

233
from Twitter,
227

228
,
228

229
SDP.
See
Service discovery protocol
Secure Shell (SSH),
41

42
botnet construction,
53
botnetCommand() function,
53

55
voluntary botnet,
54
wrapping botnet script,
55
exploitation through weak private keys,
48

49
password authentication,
50

52
public-key cryptograph,
50
testing against target,
52
interaction through Pexpect,
42
child.expect() method,
43
command() function,
43

44
connect() function,
43
connecting with script,
45
session.expect() method,
43
passwords with Pxssh,
45

46
connect() function,
46

48
login() function,
46

48
password brute force,
48
sendp()
command,
194
Service discovery protocol (SDP),
206

207
Service Message Block protocol (SMB protocol),
150
session.expect
() method,
43
SHA-512 functionality,
23
Shadow crew,
178
Shimomura, Tsutomu,
155
SkyGrabber software,
189
SkyHook
database,
85
Skype database queries,
108
using Python and sqlite3,
102

108
Skype sqlite3 database,
100

102
updation,
110
SMB protocol.
See
Service Message Block protocol
Sniffing hotel guests
findGuest()
procedure,
179

180
hotel sniffer program,
180

181
HTTP,
178
plaintext transmission,
178

179
public wireless networks,
178
using scapy library,
180
sniffProbe()
function,
186

187
SNORT
alert log for,
164
exploit.rules signature file for,
164
IDS system,
162
rules for scan,
165
Social engineering,
211

212
Socket module,
9

10
SQLite database,
100

101
SSH.
See
Secure Shell
Stack-based buffer
overflows
,
74

75
Stalking with Bluetooth and Python,
201
BlueBugging phone,
208

209
Bluetooth RFCOMM channel scanning
Bluetooth service discovery profile,
206
dubbed BlueBug,
205
RFCOMM connections,
206
unauthenticated channels,
205

206
discover_devices()
function,
201
findDevs,
201

202
intercepting wireless traffic,
203

205
Python ObexFTP, printer with,
207

208
Python script,
202
SDP using Bluetooth,
206

207
Storm’s fast-flux,
149

150
detection with Scapy,
151

152
Strings,
7

8
SYN flood,
155

156
Sys module,
17

18

T

TCP
packet,
184

185
sequence prediction,
155
sequence number,
157

158
spoofing,
159

162
SYN flood,
155

156
TCP fin scan,
40
TCP null scan,
40
TCP port scanner
application banner grabbing,
35

36
Python-Nmap integration,
39
filtering access,
41
locating and identifying targets,
40

41
TCP full connect scan,
33
connScan function,
34

35
parsing target hostname,
33

34
portScan function,
34

35
Python code,
33
types,
40
TCP syn scan,
40
TCP XMAS scan,
40
Third party libraries installations
aptitude package,
5
BackTrack distribution,
4
using commands,
5
commands,
5
easy_install,
4
easy_install python-nmap,
4
Linux libraries,
5
Python 2.x,
5
Using
python setup.py install
3

4
Python Windows Installer,
5
Time-to-live field (TTL field),
143

144

U

UAVs, intercepting and spying on,
189
crafting 802.11 frames
emergency-land command,
194

195
injectCmd() method,
193

194
IP length field,
192

194
using Scapy,
192
dissecting protocol,
189

192
emergency landing UAV,
195

196
finalizing attack,
195

196
intercepting traffic,
189

192
Uniform resource identifier (URI),
136
UNIX password cracker,
21

24
Unmanned aerial vehicles (UAVs),
188

189
Bluetooth protocol,
209
emergency-land command,
194

195
with Python script,
195

196
URI.
See
Uniform resource identifier

V

Variables,
7
Virtual private network (VPN),
214
VPN.
See
Virtual private network

W

W32DownandUp Worm.
See
Conficker

Other books

Born In The Apocalypse by Joseph Talluto
Undeniable by Lexie Davis
Nathan Coulter by Wendell Berry
Kop by Hammond, Warren
IF YOU WANTED THE MOON by Monroe, Mallory
Underdogs by Markus Zusak