14
Network programming in Python Mastering the layers of protocol stack

Network programming in python

Embed Size (px)

Citation preview

Page 1: Network programming in python

Network programming in Python

Mastering the layers of protocol stack

Page 2: Network programming in python

>>>dir(speaker)

• Not a developer.

• Security guy who codes from time to time

• Been using Python for over four years.

• Interested Networks & Software exploitation

• In love with Python & Assembly ;)

• Sucks at making power points.

Page 3: Network programming in python

Why Python?

• Batteries included.

• Powerful third party libraries.

• Python saves a lot of 'programmer’ time.

• Simple Learning curve.

http://xkcd.com/353/

Page 4: Network programming in python

Some Python tools..

http://www.dirk-loss.de/python-tools.htm

Page 5: Network programming in python

Python’s popularity

Page 6: Network programming in python

Let’s get to the fun stuff!!

Page 7: Network programming in python

PART - I

• Core protocols(TCP, UDP, IPV4, IPV6)• TCP options, IP options• Packet headers• Byte order

Essential Networking

Page 8: Network programming in python

PART - II

• Socket address structures• Socket options• TCP Sockets, UDP Sockets• Name functions, Byte order functions• Basic scripts(day time, echo, time out)• Simple port scanner

Elementary Sockets

Page 9: Network programming in python

PART - III

• DNS• HTTP• FTP• SSL/TLS• SSH• POP/IMAP• Others

Protocols

Page 10: Network programming in python

PART - IV

• Typical network errors & exception handling

Network errors & Debugging

Page 11: Network programming in python

PART - V

• Scapy• Impacket• python-shodan• pymaltego• python-nmap• Others

Third party libraries

Page 12: Network programming in python

PART - VI

• Intro to Raw Sockets• Port scanner using raw sockets

- SYN Scan- ACK Scan- Other techniques

Raw Sockets

Page 13: Network programming in python

PART - VII

• Some interesting scenario based scripts.

(possibly using a WLAN to watch them in action)

Scenario based scripts

Page 14: Network programming in python

PART - VIII

• Going beyond what's covered in the workshop

Moving Forward..