tshark -r .pcapng -Y 'icmp && data.data' -T fields -e data.data > icmp_data
As each icmp echo and reply request are same so if you put filter only icmp then duplicate data will be taken.
So run the below command. type 8 for request and type 0 for reply
tshark -r .pcapng -Y 'icmp.type = = 8 && data.data' -T fields -e data.data > icmp_data
Now decode the hex using cyber chef.
We can see that PK file signature which is an indication of zip file signature. But PK appears three times. It supposed to be appeared only 1 time.
So grab the first line.
Remove 1st 16 characters (before the 1st PK). Keep then 32 characters. Then again remove last 48 characters because from here another PK starts (in this 48 characters there are two PK).
After removing, Now we have PK........r..Re. only 32 characters left. we need to keep this only.
we need to do this for all the hex code. copy all the hex code in sublime.
Find: \w{16}(\w{32})\w{48}
Replace: $1
Breakdown:
\w{16} --> we dont want 1st 16 characters
(\w{32}) --> we do want middle 32 characters
\w{48}--> we dont want last 48 characters
$1 --> means keep only the middle 32 characters and remove 1st 16 and last 48 characters.
Now take all the hex code again to cyber chef. decode it and save it as data.zip
Then unzip that to proceed further.
Comments
Post a Comment