Why am I getting a malformed packet error when using tcpdump?
I used: tcpdump -s 0 -i eth0 -v -w capture.pcap
The PCAP file: https://ufile.io/0502b
I executed the LOIC tool PythonLOIC :
python2 -W ignore loic.py
https://code.google.com/archive/p/pythonloic/downloads?page=2
The reason for malformed packets could be a broken network connection, out of range wifi signal or even a DDoS attack for example.
Another thing, to avoid problems with .pcap or .cap files, why not save it to a .txt file? Here is a sample command to save data onto a text file:
tcpdump -X -vv -i eth0 > tcplog.txt
Also note when using -s option(from tcpdump man page):
Note that taking larger snapshots both increases the amount of time it takes to process packets and, effectively, decreases the amount of packet buffering. This may cause packets to be lost.