Author Topic: tcpreplay ใช้งานยังไง  (Read 3713 times)

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2140
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
tcpreplay ใช้งานยังไง
« on: มิถุนายน 19, 2018, 10:20:33 AM »
ปกติแล้วเราสามารถใช้งาน คำสั่ง tcpreplay ในการ generate traffic เข้ามายังระบบได้ หลักการคือระบุ จำนวนท่อ ของ link ในที่นี้คือ M1 = 1Mbps , -i interface ที่จะส่ง packet เข้ามา , สุดท้ายคือเอาข้อมูลที่เป็น pcap จากไฟล์ไหน import เข้ามา

ในส่วนของ security onion จะมี sample ของไฟล์ pcap ให้
เราสามารถ download พวก malware analysis packet ได้จาก
https://www.malware-traffic-analysis.net/index.html

เลือกมาที่เป็น .pcap นะครับเช่น

#cd /opt/samples
#wget https://www.malware-traffic-analysis.net/2018/09/06/2018-09-06-infection-traffic-from-password-protected-Word-doc.pcap.zip
#unzip 2018-09-06-infection-traffic-from-password-protected-Word-doc.pcap.zip
#tcpreplay -M1 -i ens192 example.com-*
#tcpreplay -M1 -i ens192 example.com.pcap
#tcpreplay -M1 -i eth0 2018-09-06-infection-traffic-from-password-protected-Word-doc.pcap
« Last Edit: กันยายน 21, 2018, 04:52:52 PM by golfreeze »

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2140
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
Re: tcpreplay ใช้งานยังไง
« Reply #1 on: กรกฎาคม 26, 2018, 07:41:41 PM »
How to fixed sensor count show 0 in Security onion system

Problem information : when login in  Kibana https://packetlove.com/app/kibana#
then see Sensors -Count show as “0” nodes.


Root Cause of Problem : Due to current situation not have live log running via sensor node for long times more than 35 days.

###How to fixed : Access to shell terminal at sensor01 and sensor02 node.
Focus on ens192 interface because use this interface to receive log for analyse.
ens192 is "iface manual" type when see in interface script
sensor01$sudo ifconfig
sensor01$sudo tcpreplay -M1 -i ens192 /opt/samples/*.pcap

###Do again on sensor02 node.
sensor02$sudo ifconfig
sensor02$sudo tcpreplay -M1 -i ens192 /opt/samples/*.pcap

Waiting until finished and show result


After that please kindly recheck on kibana website
https://packetlove.com/app/kibana#/

Show sensor count as 2 nodes .
This is normal situation.

อ่านรายละเอียดเพิ่มเติมได้ที่นี่ครับ
https://www.packetlove.com/th/portfolio/csoc-system-for-detect-and-monitoring-security-event-and-event-management/
« Last Edit: กันยายน 21, 2018, 04:50:33 PM by golfreeze »