Kali 2016-03-13
From charlesreid1
CTF book notes
some tools for wifi:
- iwtools
- aircrack suite
- hostapd
- wireshark
- dnschef
- crunch
if your wifi adapter is compatible with injection drivers, you should be ok. airmon-ng start interface should go smoothly if you are compatible with injection drivers.
can create a wep network and fake traffic, with airbase, python, and iptables.
import socket
s = socket.socket()
HOST = "192.168.1.10"
PORT = 9000
s.bind((HOST, PORT))
s.listen(5)
while True:
c, addr = s.accept()
print("incoming connection from %s"%(addr))
c.send ("bang")
Socket library gives you the nice convenient socket interaction implementation that's built into linux. Host should be the local network facing address, and not the loopback interface.
Bind creates socket on port X wikth the IP X. Listen then listens on that socket.
Whereas, on the client, the code looks like this:
import socket import time HOST = "192.168.1.10" PORT = 9000 while True: s = socket.socket() s.connect((HOST, PORT)) print s.recv(1024) s.close time.sleep(5)
This script now runs the connect, not the bind, command. This will connect to the remote port. Receive command will receive whatever the server sends to stdout, up to a max of 1024 buffer size. Close closes the connections.