Presentation for Roadshow of Cyber Security Marathon 2018
Code Margonda
Depok, 2018-01-11
So you got python? How far can you push your python?
Why would hackers love python?
It's not hard to know that python is amazing language. But how amazing it could be for cyber security? Let's see by getting our hands dirty, from simple tasks to more challenging action
5. Why Python for cyber security?
1. Designed for rapid prototyping
2. Simple and clean structure, improve readability
and ease of use.
3. Extensive library, also ease of interfacing
4. Widely adopted, most linux distro ship it by
default
Which makes it ideal language for scripting and rapid
development.
7. 1. CPython (reference)
2. IronPython and FePy (run on top of .NET VM)
3. Jython (run on top of JVM / Java VM)
4. PyPy (python in python)
Many more…
See https://www.python.org/download/alternatives/
18. What is Scapy?
▸Packet manipulation and decoder for python
▹send, sniff, dissect, and forge network packets
▹Handle most network tasks such as scanning,
tracerouting, probing, fuzzing, network discovery.
▹The idea: sending packets and receiving answers.
21. Basic of Scapy
▸Each protocol has representation (i.e: Ether, ARP, TCP,
IP, etc)
▸The component of each protocol can be modified (i.e:
destination address, hardware address, etc)
▸A packet is a stack of protocols, as simple as
concatenating with / (slash)
▸Packet can be sent from layer 3 (send) or layer 2
(sendp).
26. ▸Program can be represented as graph for better
exploration.
▸Complex operation can be decomposed / simplified.
▸Program is a flow of set (block) of instruction to
another set of instruction.
▸We call it states
▸From this states, can we reach that state?