ICMP Sample
a[0][0] = Send Packet
a[0][1] = Recived Packet
id=os.getpid() = Operatins System Call getpid
>>> a,u = sr(IP(dst='192.168.2.150')/ICMP(id=os.getpid(),seq=RandShort())*25)
Begin emission:
.************************Finished to send 25 packets.
*
Received 26 packets, got 25 answers, remaining 0 packets
>>> a[0][1].time - a[0][0].sent_time
0.00087618827819824219
>>> a[0][0]
>
>>> a[0][1]
>>
>>>
DNS Request
i=IP(dst="195.186.1.110")
u=UDP(dport=53)
d=DNS(rd=1,qd=DNSQR(qname="www.heise.de"))
sr1(i/u/d)
SNMP get
p = IP(dst="192.168.2.150")/UDP(sport=161)/SNMP(community="public",PDU=SNMPget(varbindlist=[SNMPvarbind(oid=ASN1_OID("1.3.6.1.2.1.1.1.0"))]))
sr1(p)
SNMP set
p = IP(dst="192.168.2.150")/UDP(sport=161)/SNMP(community="private",PDU=SNMPset(varbindlist=[SNMPvarbind(oid=ASN1_OID("1.3.6.1.4.1.9.2.1.55.192.168.2.100"),value="192.168.2.150.config")]))
sr1(p)
SNMP Cisco Transfer
i=IP(src="192.168.2.100",dst="192.168.2.150")/UDP(sport=161,dport=161)
s1=SNMP(community="private",PDU=SNMPset(varbindlist=[SNMPvarbind(oid=ASN1_OID("1.3.6.1.4.1.9.9.96.1.1.1.1.14.112"),value=6)]))
s2=SNMP(community="private",PDU=SNMPset(varbindlist=[SNMPvarbind(oid=ASN1_OID("1.3.6.1.4.1.9.9.96.1.1.1.1.2.112"),value=1)]))
s3=SNMP(community="private",PDU=SNMPset(varbindlist=[SNMPvarbind(oid=ASN1_OID("1.3.6.1.4.1.9.9.96.1.1.1.1.3.112"),value=4)]))
s4=SNMP(community="private",PDU=SNMPset(varbindlist=[SNMPvarbind(oid=ASN1_OID("1.3.6.1.4.1.9.9.96.1.1.1.1.4.112"),value=1)]))
s5=SNMP(community="private",PDU=SNMPset(varbindlist=[SNMPvarbind(oid=ASN1_OID("1.3.6.1.4.1.9.9.96.1.1.1.1.5.112"),value=ASN1_IPADDRESS("192.168.2.100"))]))
s6=SNMP(community="private",PDU=SNMPset(varbindlist=[SNMPvarbind(oid=ASN1_OID("1.3.6.1.4.1.9.9.96.1.1.1.1.6.112"),value="chw8.txt")]))
s7=SNMP(community="private",PDU=SNMPset(varbindlist=[SNMPvarbind(oid=ASN1_OID("1.3.6.1.4.1.9.9.96.1.1.1.1.14.112"),value=1)]))
send(i/s1)
send(i/s2)
send(i/s3)
send(i/s4)
send(i/s5)
send(i/s6)
send(i/s7)
NTP Fuzzing
send(IP(dst="195.186.1.100")/fuzz(UDP()/NTP(version=4)),loop=1)
SYN packet to port 80 of target 1.2.3.4
and some othe SYN Samples:
sr1(IP(dst="1.2.3.4")/TCP(dport=80,flags="S"))
sr(IP(dst="192.168.1.1")/TCP(sport=666,dport=(440,443),flags="S"))
sr(IP(dst="192.168.1.1")/TCP(sport=RandShort(),dport=[440,441,442,443],flags="S"))