Showing posts with label pcap. Show all posts
Showing posts with label pcap. Show all posts

17 October 2022

carian string dlm wireshark

1)




2)




 ref: https://www.cellstream.com/reference-reading/tipsandtricks/431-finding-text-strings-in-wireshark-captures

05 February 2021

Nyahkod (decode) packet capture by ids

 Biasanya IDS akan simpan packet dalam bentuk base64.


Utk lihat packet dalam bentuk asal:

1) decode base64 ke format HEX (eg: https://cryptii.com/pipes/base64-to-hex)

2) Parse hex dan display dalam proper network layer (eg: https://hpd.gasmi.net/ ,  http://packetor.com/)




Eg:

https://cryptii.com/pipes/base64-to-hex




https://hpd.gasmi.net/



01 December 2020

Pcap Header

Format pcap file 



Dalam Global Header, ada timzone info.

Dalam Packet Header ada timestamp.

Dalam Packet Data ada network traffic yg lalu (dihantar/diterima) NIC tersebut.


Packet vs Frame

Frame is refer to data link layer
Packet refer to network layer




Ref:

- https://www.elvidence.com.au/understanding-time-stamps-in-packet-capture-data-pcap-files/



30 November 2020

Edit Pcap guna Scapy

 Scapy adalah library python yang boleh digunakan untuk edit packet dalam dalam fail pcap.


Cara nak tukar timestamp pada setiap packet


from scapy.all import *

pkts = rdpcap(infile)
for p in pkts:
    p.time = p.time + tukar
    pmod=p
    cooked.append(pmod)

wrpcap("out.pcap", cooked) 

 



Cara nak tukar mac address

mac_asal = a
mac_baru = b

if ARP in p:
    if p[ARP].hwsrc == mac_asal
           p[ARP].hwsrc = mac_baru