Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I was having trouble getting the sulley framework to run properly on Linux x86_64, but managed to fix it, so thought it might be of use to someone else.
- The problem was that the network_monitor.py script would error out, and my sessions script showing 0 bytes data was captured:
- [06:14.06] initializing capture for test case #1
- Exception in thread Thread-1:
- Traceback (most recent call last):
- File “/usr/lib/python2.6/threading.py”, line 525, in __bootstrap_inner
- self.run()
- File “network_monitor.py”, line 87, in run
- self.pcap.dispatch(0, self.packet_handler)
- PcapError: corrupted frame on kernel ring mac offset 70 + caplen 0 > frame len 64
- After a few dead-ends, figuring out whether all my libraries were up to date, I traced back whatever came first, and that led me to pre_send:
- def pre_send (self, test_number):
- '''
- This routine is called before the fuzzer transmits a test case and spin off a packet capture thread.
- '''
- self.log("initializing capture for test case #%d" % test_number)
- # open the capture device and set the BPF filter.
- self.pcap = pcapy.open_live(self.device, -1, 1, 1000)
- self.pcap.setfilter(self.filter)
- ........
- pcapy.open is crucial. I changed the line to:
- self.pcap = pcapy.open_live(self.device, 65535, True, 1000)
- And, problem solved. No more PcapErrors, bytes are being captured properly, and sulley works as it should.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement