Skip to content
KitploitKITPLOIT
StrumentiBlog
Invia
StrumentiBlog
Invia

Strumenti di Hacking, PenTest e Cybersecurity per il tuo Arsenale di Sicurezza!

Kitploit è una directory di strumenti di hacking, cybersecurity e pentesting. Scopri gli ultimi aggiornamenti dei progetti per trovare vulnerabilità, analizzare sistemi, automatizzare i test e rafforzare la tua sicurezza.

··Feed·Contatto·Privacy·© 2026 Kitploit

Directory degli strumenti

Categorie

Vedi tutte le categorie
Loading categories
flowinspect — Uno strumento di ispezione di rete. | Kitploit
Strumenti/GitHubGitHub/7h3ram/flowinspect
Sniffing e Analisi dei PacchettiAnalisi delle VulnerabilitàShellcodeInformatica ForenseFuzzingSicurezza di ReteAnalisi MalwareRilevamento Intrusioni
GitHub7h3ram/flowinspect

flowinspect

Uno strumento di ispezione di rete.

Vedi Repository
82248 anni faRevisionato da Kitploit

Più Popolari

Vedi tutti →

Scopri gli strumenti più utilizzati dalla nostra community.

Esplora tutti gli strumenti

Sfoglia la nostra collezione di strumenti

Vedi tutti gli strumenti →
Condividi

flowinspect

Uno strumento di ispezione del traffico di rete

Description:

Utilizza libnids (tramite i suoi binding Python di Jon Oberheide: pynids) per deframmentare IP e riassemblare i pacchetti TCP (l'UDP viene ispezionato su base pacchetto singolo) per generare flussi di rete. Questi flussi vengono poi ispezionati usando una delle quattro modalità di ispezione:

  • regex (re2 - binding Python: pyre2)
  • corrispondenza fuzzy di stringhe (fuzzywuzzy)
  • libemu (binding Python: pylibemu)
  • yara (binding Python: yara-python)

Le corrispondenze regex vengono eseguite usando la libreria re2 e i suoi binding Python, pyre2, che supporta PCRE, corrispondenze case-insensitive, invertite e multilinea, ecc. Ha enormi guadagni di prestazioni rispetto al modulo re integrato in Python (che viene usato come fallback nel caso re2 non sia installato).

Le funzionalità di corrispondenza fuzzy di stringhe sono realizzate tramite il modulo fuzzywuzzy. Aiuta a eseguire sia una corrispondenza esatta che relativa delle stringhe. Una soglia di corrispondenza predefinita di 75 viene usata come default e può essere sovrascritta tramite cli.

Libemu e i suoi binding Python, pylibemu, sono usati per il rilevamento di shellcode. L'euristica GetPC usata da libemu fornisce un discreto tasso di rilevamento. Ci sono alcuni casi in cui libemu semplicemente fallisce, ma per la maggior parte dei casi d'uso è abbastanza buono.

Yara è uno strumento di identificazione e classificazione dei malware basato su firme. I suoi binding yara-python forniscono un'API per usare file di firme esistenti/personalizzati su un buffer di input che in questo caso è un flusso di rete.

L'ispezione può essere richiesta per una qualsiasi delle direzioni CTS/STC/ANY o loro combinazioni. I buffer di ispezione vengono popolati man mano che il traffico di rete arriva e quindi le corrispondenze CTS (CTS o ANY) avvengono per prime. Se viene richiesta più di una modalità di ispezione, i flussi vengono ispezionati nel seguente ordine: regex, fuzzy, libemu e infine yara. Per TCP, se una qualsiasi delle modalità di ispezione riesce, il flusso corrispondente non verrà ispezionato ulteriormente. Questo è un approccio ottimistico ed è abilitato per impostazione predefinita. Tuttavia, se per un determinato caso d'uso un flusso TCP deve essere ispezionato più volte, può essere richiesto esplicitamente tramite cli.

L'ispezione può essere completamente disabilitata, se necessario, tramite l'opzione cli linemode. Questa modalità è davvero utile e, se combinata con un outmode adatto, aiuta a osservare la comunicazione di rete così com'è mentre avviene sul filo. Linemode viene abilitato automaticamente come fallback se nessuna modalità di ispezione viene fornita tramite cli.

Per UDP, le corrispondenze avvengono su base pacchetto singolo e quindi i pacchetti successivi verranno testati anche dopo che una corrispondenza è già stata trovata su un flusso UDP. Poiché vengono ispezionati solo i pacchetti successivi e il loro contenuto, ciò garantisce che i dati già corrispondenti durante i cicli di ispezione precedenti non vengano ispezionati di nuovo.

L'ambito di corrispondenza può essere limitato tramite espressioni BPF, modificatori di contenuto offset-depth simili a Snort o tramite opzioni cli di limite di ispezione di pacchetti/flussi. Per TCP, i flussi corrispondenti possono anche essere terminati se necessario. I flussi possono anche essere registrati su file oltre che essere scaricati su stdout. Alcune modalità di output utili (quite, meta, hex, print, raw) aiutano con ulteriori analisi. La modalità di output meta è particolarmente utile perché mostra alcuni dettagli davvero importanti specifici della corrispondenza, come la dimensione totale del contenuto corrispondente, l'offset dell'inizio di una corrispondenza nel flusso di rete, gli ID dei pacchetti su cui si estende una corrispondenza, la direzione del pacchetto su cui è avvenuta una corrispondenza, ecc.

È supportata anche la generazione di pcap per i flussi corrispondenti. Se abilitata, scaricherà tutti i pacchetti dall'inizio fino alla fine del flusso. I flussi TCP corrispondenti vengono scaricati non appena viene visto un close/reset, e per quei flussi in cui non vediamo un close/reset, vengono scaricati prima che lo strumento esca. Per UDP, poiché non ci sono informazioni di stato simili a close/reset disponibili, vengono scaricati solo quando lo strumento esce. Ciò garantisce che tutti i pacchetti, anche quelli che arrivano dopo la corrispondenza, vengano catturati nella pcap del flusso. Eccetto per l'header globale pcap personalizzato, l'header pcap per pacchetto e l'header L2 Ethernet II (che non è visto da flowinspect), tutto il resto rimane invariato nelle catture di pacchetti scaricate.

HELP: -----```c ______ _ __ / / /_ _ () _________ ___ / / / // / __ \ | /| / / / __ / / __ / _ / / __/ / __/ / // / |/ |/ / / / / ( ) // / / // / // //_/|/|/// /// ._/_/___/_/ //

flowinspect v0.2 - A network inspection tool Ankur Tyagi (7h3rAm [at] gmail [dot] com)

usage: flowinspect.py [-h] (-p --pcap | -d --device) [-c --cregex] [-s --sregex] [-a --aregex] [-i] [-m] [-G --cfuzz] [-H --sfuzz] [-I --afuzz] [-r fuzzminthreshold] [-C --cdfa] [-S --sdfa] [-A --adfa] [-l] [-X --dfaexpr] [-g [graphdir]] [-P --cyararules] [-Q --syararules] [-R --ayararules] [-M] [-y] [-Y --emuprofileoutsize] [-O --offset] [-D --depth] [-T --maxinspstreams] [-U --maxinsppackets] [-t --maxdispstreams] [-u --maxdisppackets] [-b --maxdispbytes] [-w [logdir]] [-o {quite,meta,hex,print,raw}] [-f --bpf] [-v] [-V] [-e] [-k] [-j] [-Z] [-n] [-L]

optional arguments: -h, --help show this help message and exit -p --pcap input pcap file -d --device listening device

RegEx per Direction: -c --cregex regex to match against CTS data -s --sregex regex to match against STC data -a --aregex regex to match against ANY data

RegEx Options: -i ignore case -m disable multiline match

Fuzzy Patterns per Direction: -G --cfuzz string to fuzzy match against CTS data -H --sfuzz string to fuzzy match against STC data -I --afuzz string to fuzzy match against ANY data

Fuzzy Options: -r fuzzminthreshold threshold for fuzzy match (1-100) - default 75

DFAs per Direction ('m[0-9][1-9]='): -C --cdfa DFA expression to match against CTS data -S --sdfa DFA expression to match against STC data -A --adfa DFA expression to match against ANY data

DFA Options: -l switch default boolean operator to 'or' -X --dfaexpr expression to test chain members -g [graphdir] generate DFA transitions graph

Yara Rules per Direction: -P --cyararules Yara rules to match on CTS data -Q --syararules Yara rules to match on STC data -R --ayararules Yara rules to match on ANY data

Shellcode Detection: -M enable shellcode detection -y generate emulator profile for detected shellcode -Y --emuprofileoutsize emulator profile memory size (default 1024K | max: 10240K)

Content Modifiers: -O --offset bytes to skip before matching -D --depth bytes to look at while matching (starting from offset)

Inspection Limits: -T --maxinspstreams max streams to inspect -U --maxinsppackets max packets to inspect

Display Limits: -t --maxdispstreams max streams to display -u --maxdisppackets max packets to display -b --maxdispbytes max bytes to display

Output Options: -w [logdir] write matching packets/streams -o {quite,meta,hex,print,raw} match output modes

Misc. Options: -f --bpf BPF expression -v invert match -V verbose output -e highlight CTS/STC matches -k kill matching TCP stream -j enable TCP multi match mode -Z write matching flows to pcap -n confirm before initializing NIDS -L enable linemode (disables inspection)

root@kitploit:~
ESEMPI:
---------
__Guarda le sessioni HTTP in tempo reale__:```c
./flowinspect.py -d eth0 -c "^(GET|POST|HEAD|PUT).*" -f "tcp and port 80" -o print

GET / HTTP/1.1
User-Agent: curl/7.22.0 (i686-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
Host: www.google.com
Accept: */*

[U] Processed: 0 | Matches: 0 | Shortest: 0B (#0) | Longest: 0B (#0)
[T] Processed: 1 | Matches: 1 | Shortest: 164B (#1) | Longest: 164B (#1)

Ispeziona i flussi HTTP per l'exploit Metasploit ie_cgenericelement_uaf (CVE-2013-1347):```c ./flowinspect.py -p cgenericelement.pcap -s 'CollectGarbage().*mstime_malloc({shellcode:' -b32

[MATCH] (00000006/00000001) [TCP#00000002] 10.204.136.200:39771 - 10.204.138.121:8080 matches regex: 'CollectGarbage\(\).*mstime_malloc\({shellcode:' [MATCH] (00000006/00000001) [TCP#00000002] match @ STC[39105:39335] - 230B | packet[5] - packet[5] 00000000: 43 6f 6c 6c 65 63 74 47 61 72 62 61 67 65 28 29 |CollectGarbage()| 00000010: 3b 0a 09 66 31 2e 61 70 70 65 6e 64 43 68 69 6c |;..f1.appendChil| 00000020: 64 28 64 6f 63 75 6d 65 6e 74 2e 63 72 65 61 74 |d(document.creat| 00000030: 65 45 6c 65 6d 65 6e 74 28 27 74 61 62 6c 65 27 |eElement('table'| 00000040: 29 29 3b 0a 09 74 72 79 20 20 20 20 20 20 7b 20 |));..try { | 00000050: 66 30 2e 6f 66 66 73 65 74 50 61 72 65 6e 74 3d |f0.offsetParent=| 00000060: 6e 75 6c 6c 3b 7d 0a 09 63 61 74 63 68 28 65 29 |null;}..catch(e)| 00000070: 20 7b 20 7d 0a 09 66 32 2e 69 6e 6e 65 72 48 54 | { }..f2.innerHT| 00000080: 4d 4c 20 3d 20 22 22 3b 0a 09 66 31 2e 69 6e 6e |ML = "";..f1.inn| 00000090: 65 72 48 54 4d 4c 20 3d 20 22 22 3b 0a 09 66 30 |erHTML = "";..f0| 000000a0: 2e 61 70 70 65 6e 64 43 68 69 6c 64 28 64 6f 63 |.appendChild(doc| 000000b0: 75 6d 65 6e 74 2e 63 72 65 61 74 65 45 6c 65 6d |ument.createElem| 000000c0: 65 6e 74 28 27 68 72 27 29 29 3b 0a 09 6d 73 74 |ent('hr'));..mst| 000000d0: 69 6d 65 5f 6d 61 6c 6c 6f 63 28 7b 73 68 65 6c |ime_malloc({shel| 000000e0: 6c 63 6f 64 65 3a |lcode:|

[U] Processed: 0 | Matches: 0 | Shortest: 0B (#0) | Longest: 0B (#0) [T] Processed: 2 | Matches: 1 | Shortest: 230B (#2) | Longest: 230B (#2)

root@kitploit:~
__Scansione dei messaggi SIP INVITE tramite corrispondenza fuzzy di stringhe (inite come stringa di query e soglia minima di corrispondenza del 50%)__:```c
./flowinspect.py -p metasploit-sip-invite-spoof.pcap -H 'inite' -r 50

[MATCH] (00000002/00000001) [UDP#00000002] 10.0.1.45:10270 < 10.0.1.199:5060 
[MATCH] (00000002/00000001) [UDP#00000002] match @ STC[0:269] - 269B
00000000:  53 49 50 2f 32 2e 30 20 31 38 30 20 52 69 6e 67   |SIP/2.0 180 Ring|
00000010:  69 6e 67 0d 0a 56 69 61 3a 20 53 49 50 2f 32 2e   |ing..Via: SIP/2.|
00000020:  30 2f 55 44 50 20 31 30 2e 30 2e 31 2e 34 35 3b   |0/UDP 10.0.1.45;|
00000030:  72 65 63 65 69 76 65 64 3d 31 30 2e 30 2e 31 2e   |received=10.0.1.|
00000040:  31 39 39 0d 0a 43 6f 6e 74 61 63 74 3a 20 3c 73   |199..Contact: <s|
00000050:  69 70 3a 31 32 37 2e 30 2e 30 2e 31 3e 0d 0a 54   |ip:127.0.0.1>..T|
00000060:  6f 3a 20 3c 73 69 70 3a 31 30 2e 30 2e 31 2e 34   |o: <sip:10.0.1.4|
00000070:  35 3e 3b 74 61 67 3d 32 30 64 37 30 36 37 33 0d   |5>;tag=20d70673.|
00000080:  0a 46 72 6f 6d 3a 20 22 74 65 73 74 74 65 73 74   |.From: "testtest|
00000090:  22 3c 73 69 70 3a 31 30 2e 30 2e 31 2e 31 39 39   |"<sip:10.0.1.199|
000000a0:  3e 0d 0a 43 61 6c 6c 2d 49 44 3a 20 31 34 38 31   |>..Call-ID: 1481|
000000b0:  30 2e 30 2e 31 2e 34 35 0d 0a 43 53 65 71 3a 20   |0.0.1.45..CSeq: |
000000c0:  31 20 49 4e 56 49 54 45 0d 0a 55 73 65 72 2d 41   |1 INVITE..User-A|
000000d0:  67 65 6e 74 3a 20 58 2d 4c 69 74 65 20 72 65 6c   |gent: X-Lite rel|
000000e0:  65 61 73 65 20 31 30 30 39 72 20 73 74 61 6d 70   |ease 1009r stamp|
000000f0:  20 33 38 39 36 34 0d 0a 43 6f 6e 74 65 6e 74 2d   | 38964..Content-|
00000100:  4c 65 6e 67 74 68 3a 20 30 0d 0a 0d 0a            |Length: 0....|

[U] Processed: 2 | Matches: 1 | Shortest: 269B (#2) | Longest: 269B (#2)
[T] Processed: 0 | Matches: 0 | Shortest: 0B (#0) | Longest: 0B (#0)

Scansiona alla ricerca di shellcode in un flusso di rete (attualmente solo in QUALSIASI direzione):```c ./flowinspect.py -p shellcodepcaps/millenium.pcap -M

[MATCH] (00000004/00000001) [TCP#00000001] 10.204.136.200:32822 - 10.204.138.121:8080 contains shellcode (Offset: 4034) [MATCH] (00000004/00000001) [TCP#00000001] match @ STC[4034:4350] - 316B | packet[4] - packet[4] 00000000: d9 eb d9 74 24 f4 bd 43 21 8a 8a 5f 2b c9 b1 46 |...t$..C!..+..F| 00000010: 83 c7 04 31 6f 13 03 2c 32 68 7f 33 f0 38 72 cc |...1o..,2h.3.8r.| 00000020: 06 19 99 a9 20 ee 7a 39 e3 dd 31 b6 35 2b 51 b3 |.... .z9..1.5+Q.| 00000030: 47 9b 11 b5 ab 50 53 25 3f 20 94 de 41 8d 2f d6 |G....PS%? ..A./.| 00000040: 85 82 37 63 05 45 49 5a 16 97 29 d7 85 7c 8e 6c |..7c.EIZ..)..|.l| 00000050: 10 41 45 26 b3 c1 58 2c 48 7b 43 3b 15 5c 72 d0 |.AE&..X,H{C;..r.| 00000060: 49 a8 3d ad ba 5a bc 5f f3 a3 8e 5f 08 f7 75 9f |I.=..Z...._..u.| 00000070: 85 0f b7 d0 6b 11 f0 05 87 2a 82 fd 40 38 9b 76 |....k....*[email protected]| 00000080: ca e6 5a 63 8d 6d 50 38 d9 28 75 bf 36 47 81 34 |..Zc.mP8.(u.6G.4| 00000090: c9 b0 03 0e ee 5c 75 4d 5c 54 5c 85 28 80 17 e7 |......uM.T..(...| 000000a0: 43 c5 66 e9 7f 8b 9e 6a 80 d3 a0 1d 3a 28 e4 63 |C.f....j....:(.c| 000000b0: 1d d2 69 1c 81 37 dc ca 34 c8 1f f5 c0 72 e8 61 |..i..7..4....r.a| 000000c0: bf 10 c8 30 57 da 3a 9c c3 74 4e 93 6e f7 38 0f |...0W.:..tN.n.8.| 000000d0: 55 fd b1 49 c3 fe 97 91 65 c2 48 22 dd 61 25 e8 |U..I....e.H".a%.| 000000e0: 99 7a 92 42 4e e3 25 9d 71 8c b6 19 d6 6d 21 b8 |.z.BN.%.q....m!.| 000000f0: 81 08 f3 52 03 b6 80 d1 aa e3 ef 49 e9 19 79 92 |...R.......I..y.| 00000100: 99 45 59 74 7a 1e d4 27 3c ff 8e b5 af 92 6e 51 |.EYtz..'<.....nQ| 00000110: 5f 41 4f c7 f7 d1 ea 6b 64 d3 3d fb 38 37 ae 72 |_AO....kd.=.87.r| 00000120: 21 06 1c d6 f1 38 f2 29 25 8b 32 85 39 b9 ba eb |!....8.)%.2.9...| 00000130: 06 13 ed 93 55 01 10 e9 ec ef ff ff |....U.......|

[U] Processed: 0 | Matches: 0 | Shortest: 0B (#0) | Longest: 0B (#0) [T] Processed: 1 | Matches: 1 | Shortest: 316B (#1) | Longest: 316B (#1)

root@kitploit:~
__Usa una firma Yara per cercare binari impacchettati con UPX nella direzione STC__:```c
./flowinspect.py -p e03a7f89a6cbc45144aafac2779c7b6d.pcap -R upx.yara

[MATCH] (00000156/00000001) [TCP#00000001] 111.110.77.53:54159 - 79.115.117.66:80 matches rule: 'UPX' from upx.yara
[MATCH] (00000156/00000001) [TCP#00000001] match @ STC[185362:185401] - 39B | packet[156] - packet[156]
00000000:  ff d5 8d 87 1f 02 00 00 80 20 7f 80 60 28 7f 58   |......... ..`(.X|
00000010:  50 54 50 53 57 ff d5 58 61 8d 44 24 80 6a 00 39   |PTPSW..Xa.D$.j.9|
00000020:  c4 75 fa 83 ec 80 e9                              |.u.....|

[U] Processed: 0 | Matches: 0 | Shortest: 0B (#0) | Longest: 0B (#0)
[T] Processed: 1 | Matches: 1 | Shortest: 39B (#1) | Longest: 39B (#1)

multimatch Demo: Prima testiamo un pcap nella modalità firstmatch predefinita:```c ./flowinspect.py -p ../testfiles/pcaps/http.cap -s '.*' -b32

[MATCH] (00000001/00000001) [TCP#00000001] 145.254.160.237:3372 < 65.208.228.223:80 matches regex: '.*' [MATCH] (00000001/00000001) [TCP#00000001] match @ STC[0:1380] - 1380B | packet[1] - packet[1] 00000000: 48 54 54 50 2f 31 2e 31 20 32 30 30 20 4f 4b 0d |HTTP/1.1 200 OK.| 00000010: 0a 44 61 74 65 3a 20 54 68 75 2c 20 31 33 20 4d |.Date: Thu, 13 M|

[MATCH] (00000001/00000001) [UDP#00000001] 145.253.2.203:53 < 145.254.160.237:3009 matches regex: '.*' [MATCH] (00000001/00000001) [UDP#00000001] match @ STC[0:146] - 146B 00000000: 00 23 81 80 00 01 00 04 00 00 00 00 07 70 61 67 |.#...........pag| 00000010: 65 61 64 32 11 67 6f 6f 67 6c 65 73 79 6e 64 69 |ead2.googlesyndi|

[U] Processed: 1 | Matches: 1 | Shortest: 146B (#1) | Longest: 146B (#1) [T] Processed: 1 | Matches: 1 | Shortest: 1380B (#1) | Longest: 1380B (#1) [+] Flowsrch session complete. Exiting.

root@kitploit:~
C'è esattamente 1 corrispondenza per entrambi i flussi UDP e TCP nel pcap di input. Anche il numero di flussi elaborati è 1. Dato che la regex era un `.*` che ovviamente corrisponderebbe a qualsiasi dato in un flusso, ciò significa che o il pcap ha solo 2 flussi o solo due flussi contengono dati. Testiamo ora lo stesso pcap usando la regex `.*` in modalità multimatch:```c
./flowinspect.py -p ../testfiles/pcaps/http.cap -s '.*' -b32 -j

[MATCH] (00000001/00000001) [TCP#00000001] 145.254.160.237:3372 < 65.208.228.223:80 matches regex: '.*'
[MATCH] (00000001/00000001) [TCP#00000001] match @ STC[0:1380] - 1380B | packet[1] - packet[1]
00000000:  48 54 54 50 2f 31 2e 31 20 32 30 30 20 4f 4b 0d   |HTTP/1.1 200 OK.|
00000010:  0a 44 61 74 65 3a 20 54 68 75 2c 20 31 33 20 4d   |.Date: Thu, 13 M|

[MATCH] (00000002/00000002) [TCP#00000001] 145.254.160.237:3372 < 65.208.228.223:80 matches regex: '.*'
[MATCH] (00000002/00000002) [TCP#00000001] match @ STC[1380:2760] - 1380B | packet[2] - packet[2]
00000000:  20 20 20 20 20 20 20 20 20 20 3c 61 20 68 72 65   |          <a hre|
00000010:  66 3d 22 73 65 61 72 63 68 2e 68 74 6d 6c 22 3e   |f="search.html">|

[MATCH] (00000003/00000003) [TCP#00000001] 145.254.160.237:3372 < 65.208.228.223:80 matches regex: '.*'
[MATCH] (00000003/00000003) [TCP#00000001] match @ STC[2760:4140] - 1380B | packet[3] - packet[3]
00000000:  33 36 32 39 22 3b 0a 67 6f 6f 67 6c 65 5f 61 64   |3629";.google_ad|
00000010:  5f 77 69 64 74 68 20 3d 20 34 36 38 3b 0a 67 6f   |_width = 468;.go|

[MATCH] (00000004/00000004) [TCP#00000001] 145.254.160.237:3372 < 65.208.228.223:80 matches regex: '.*'
[MATCH] (00000004/00000004) [TCP#00000001] match @ STC[4140:5520] - 1380B | packet[4] - packet[4]
00000000:  22 66 74 70 3a 2f 2f 66 74 70 2e 70 6c 61 6e 65   |"ftp://ftp.plane|
00000010:  74 6d 69 72 72 6f 72 2e 63 6f 6d 2f 70 75 62 2f   |tmirror.com/pub/|

[MATCH] (00000005/00000005) [TCP#00000001] 145.254.160.237:3372 < 65.208.228.223:80 matches regex: '.*'
[MATCH] (00000005/00000005) [TCP#00000001] match @ STC[5520:6900] - 1380B | packet[5] - packet[5]
00000000:  65 74 68 65 72 65 61 6c 2f 77 69 6e 33 32 2f 22   |ethereal/win32/"|
00000010:  3e 4d 61 69 6e 20 73 69 74 65 3c 2f 61 3e 0a 3c   |>Main site</a>.<|

[MATCH] (00000006/00000006) [TCP#00000001] 145.254.160.237:3372 < 65.208.228.223:80 matches regex: '.*'
[MATCH] (00000006/00000006) [TCP#00000001] match @ STC[6900:8280] - 1380B | packet[6] - packet[6]
00000000:  72 65 74 61 70 70 65 64 2e 6e 65 74 2f 70 75 62   |retapped.net/pub|
00000010:  2f 73 65 63 75 72 69 74 79 2f 70 61 63 6b 65 74   |/security/packet|

[MATCH] (00000001/00000001) [UDP#00000001] 145.253.2.203:53 < 145.254.160.237:3009 matches regex: '.*'
[MATCH] (00000001/00000001) [UDP#00000001] match @ STC[0:146] - 146B
00000000:  00 23 81 80 00 01 00 04 00 00 00 00 07 70 61 67   |.#...........pag|
00000010:  65 61 64 32 11 67 6f 6f 67 6c 65 73 79 6e 64 69   |ead2.googlesyndi|

[MATCH] (00000007/00000007) [TCP#00000001] 145.254.160.237:3372 < 65.208.228.223:80 matches regex: '.*'
[MATCH] (00000007/00000007) [TCP#00000001] match @ STC[8280:9660] - 1380B | packet[7] - packet[7]
00000000:  72 65 2f 65 74 68 65 72 65 61 6c 2f 73 6f 6c 61   |re/ethereal/sola|
00000010:  72 69 73 2f 22 3e 41 75 73 74 72 61 6c 69 61 3c   |ris/">Australia<|

[MATCH] (00000008/00000008) [TCP#00000001] 145.254.160.237:3372 < 65.208.228.223:80 matches regex: '.*'
[MATCH] (00000008/00000008) [TCP#00000001] match @ STC[9660:11040] - 1380B | packet[8] - packet[8]
00000000:  20 20 20 3c 61 20 68 72 65 66 3d 22 68 74 74 70   |   <a href="http|
00000010:  3a 2f 2f 70 61 63 6b 61 67 65 73 2e 64 65 62 69   |://packages.debi|

[MATCH] (00000009/00000009) [TCP#00000001] 145.254.160.237:3372 < 65.208.228.223:80 matches regex: '.*'
[MATCH] (00000009/00000009) [TCP#00000001] match @ STC[11040:12420] - 1380B | packet[9] - packet[9]
00000000:  69 63 61 3c 2f 61 3e 0a 20 20 20 20 3c 62 72 3e   |ica</a>.    <br>|
00000010:  28 6d 6f 72 65 20 6d 69 72 72 6f 72 73 20 61 72   |(more mirrors ar|

[MATCH] (00000010/00000010) [TCP#00000001] 145.254.160.237:3372 < 65.208.228.223:80 matches regex: '.*'
[MATCH] (00000010/00000010) [TCP#00000001] match @ STC[12420:13800] - 1380B | packet[10] - packet[10]
00000000:  6b 67 73 72 63 2f 6e 65 74 2f 65 74 68 65 72 65   |kgsrc/net/ethere|
00000010:  61 6c 2f 52 45 41 44 4d 45 2e 68 74 6d 6c 22 3e   |al/README.html">|

[MATCH] (00000011/00000011) [TCP#00000001] 145.254.160.237:3372 < 65.208.228.223:80 matches regex: '.*'
[MATCH] (00000011/00000011) [TCP#00000001] match @ STC[13800:15180] - 1380B | packet[11] - packet[11]
00000000:  76 65 6e 22 3e 0a 20 20 3c 74 64 20 76 61 6c 69   |ven">.  <td vali|
00000010:  67 6e 3d 22 74 6f 70 22 3e 53 47 49 3a 3c 62 72   |gn="top">SGI:<br|

[MATCH] (00000012/00000012) [TCP#00000001] 145.254.160.237:3372 < 65.208.228.223:80 matches regex: '.*'
[MATCH] (00000012/00000012) [TCP#00000001] match @ STC[15180:16560] - 1380B | packet[12] - packet[12]
00000000:  77 77 2e 73 75 73 65 2e 63 6f 6d 2f 75 73 2f 70   |ww.suse.com/us/p|
00000010:  72 69 76 61 74 65 2f 64 6f 77 6e 6c 6f 61 64 2f   |rivate/download/|

[MATCH] (00000013/00000013) [TCP#00000001] 145.254.160.237:3372 < 65.208.228.223:80 matches regex: '.*'
[MATCH] (00000013/00000013) [TCP#00000001] match @ STC[16560:17940] - 1380B | packet[13] - packet[13]
00000000:  65 2e 0a 3c 2f 70 3e 0a 3c 68 34 3e 44 6f 63 75   |e..</p>.<h4>Docu|
00000010:  6d 65 6e 74 61 74 69 6f 6e 3c 2f 68 34 3e 0a 3c   |mentation</h4>.<|

[MATCH] (00000014/00000014) [TCP#00000001] 145.254.160.237:3372 < 65.208.228.223:80 matches regex: '.*'
[MATCH] (00000014/00000014) [TCP#00000001] match @ STC[17940:18364] - 424B | packet[14] - packet[14]
00000000:  65 6e 64 20 73 75 70 70 6f 72 74 20 71 75 65 73   |end support ques|
00000010:  74 69 6f 6e 73 20 61 62 6f 75 74 20 45 74 68 65   |tions about Ethe|

[U] Processed: 1 | Matches: 1 | Shortest: 146B (#1) | Longest: 146B (#1)
[T] Processed: 1 | Matches: 14 | Shortest: 424B (#1) | Longest: 1380B (#1)
[+] Flowsrch session complete. Exiting.

Questa volta vediamo un totale di 14 corrispondenze per il flusso TCP e 1 corrispondenza per il flusso UDP. Poiché il conteggio elaborato è ancora 1, l'unico flusso TCP è stato ispezionato più volte e la regex .* è passata in ogni occasione. Nota che gli offset di tutte le 14 corrispondenze sono diversi. Ciò implica che per ogni ciclo di ispezione, il contenuto che è stato confrontato in precedenza non viene ispezionato di nuovo, garantendo corrispondenze assolutamente uniche per la regex di input anche quando un flusso viene ispezionato più volte.

Scrivi i flussi corrispondenti in un pcap:```c ./flowinspect.py -p ../testfiles/pcaps/http.cap -s '.*' -b32 -Z

[MATCH] (00000001/00000001) [TCP#00000001] 145.254.160.237:3372 < 65.208.228.223:80 matches regex: '.*' [MATCH] (00000001/00000001) [TCP#00000001] match @ STC[0:1380] - 1380B | packet[1] - packet[1] 00000000: 48 54 54 50 2f 31 2e 31 20 32 30 30 20 4f 4b 0d |HTTP/1.1 200 OK.| 00000010: 0a 44 61 74 65 3a 20 54 68 75 2c 20 31 33 20 4d |.Date: Thu, 13 M|

[MATCH] (00000001/00000001) [UDP#00000001] 145.253.2.203:53 < 145.254.160.237:3009 matches regex: '.*' [MATCH] (00000001/00000001) [UDP#00000001] match @ STC[0:146] - 146B 00000000: 00 23 81 80 00 01 00 04 00 00 00 00 07 70 61 67 |.#...........pag| 00000010: 65 61 64 32 11 67 6f 6f 67 6c 65 73 79 6e 64 69 |ead2.googlesyndi|

[U] Processed: 1 | Matches: 1 | Shortest: 146B (#1) | Longest: 146B (#1) [T] Processed: 1 | Matches: 1 | Shortest: 1380B (#1) | Longest: 1380B (#1) [+] Flowsrch session complete. Exiting.

ls -l *.pcap

-rw-r--r-- 1 root root 21263 Oct 1 10:25 TCP-00000001-145.254.160.237.3372-65.208.228.223.80.pcap -rw-r--r-- 1 root root 333 Oct 1 10:25 UDP-00000001-145.254.160.237.3009-145.253.2.203.53.pcap

capinfos TCP-00000001-145.254.160.237.3372-65.208.228.223.80.pcap

File name: TCP-00000001-145.254.160.237.3372-65.208.228.223.80.pcap File type: Wireshark/tcpdump/... - libpcap File encapsulation: Ethernet Packet size limit: file hdr: 65535 bytes Number of packets: 34 File size: 21263 bytes Data size: 20695 bytes Capture duration: 0 seconds Start time: Tue Jan 15 18:25:57 2013 End time: Tue Jan 15 18:25:57 2013 Data byte rate: 334156.35 bytes/sec Data bit rate: 2673250.78 bits/sec Average packet size: 608.68 bytes Average packet rate: 548.99 packets/sec SHA1: 23e0883082f69aa70dde186262f72b938130d597 RIPEMD160: 26105199653b9d93d253e0c0ad539adaed1cb6f6 MD5: 9c8c0d0ca5bc27d726d8935da079af6e Strict time order: True

tshark -q -z conv,ip -r TCP-00000001-145.254.160.237.3372-65.208.228.223.80.pcap

OOPS: dissector table "sctp.ppi" doesn't exist Protocol being registered is "Datagram Transport Layer Security" Running as user "root" and group "root". This could be dangerous.

IPv4 Conversations Filter: | <- | | -> | | Total | Rel. Start | Duration | | Frames Bytes | | Frames Bytes | | Frames Bytes | | | 145.254.160.237 <-> 65.208.228.223 18 19344 16 1351 34 20695 0.000000000 0.0619

capinfos UDP-00000001-145.254.160.237.3009-145.253.2.203.53.pcap

File name: UDP-00000001-145.254.160.237.3009-145.253.2.203.53.pcap File type: Wireshark/tcpdump/... - libpcap File encapsulation: Ethernet Packet size limit: file hdr: 65535 bytes Number of packets: 2 File size: 333 bytes Data size: 277 bytes Capture duration: 0 seconds Start time: Tue Jan 15 18:25:57 2013 End time: Tue Jan 15 18:25:57 2013 Data byte rate: 98193.22 bytes/sec Data bit rate: 785545.78 bits/sec Average packet size: 138.50 bytes Average packet rate: 708.98 packets/sec SHA1: ea17a52d3f7b95543c36a726c67ad1b31f03c978 RIPEMD160: 47604bc8244c07e5946102afa8b84747263b834c MD5: 2ae39fee3f39098f8fdf0f7560ece8e4 Strict time order: True

tshark -q -z conv,ip -r UDP-00000001-145.254.160.237.3009-145.253.2.203.53.pcap

OOPS: dissector table "sctp.ppi" doesn't exist Protocol being registered is "Datagram Transport Layer Security" Running as user "root" and group "root". This could be dangerous.

IPv4 Conversations Filter: | <- | | -> | | Total | Rel. Start | Duration | | Frames Bytes | | Frames Bytes | | Frames Bytes | | | 145.254.160.237 <-> 145.253.2.203 1 188 1 89 2 277 0.000000000 0.0028

root@kitploit:~
INSTALLAZIONE:
-------------

1. Assicurati di avere un'installazione funzionante di Python 2.7.
2. Ottieni e installa pynids. Per chi usa Ubuntu, assicurati di avere i pacchetti libpcap-dev, libnet1, libnet1-dev e libglib2.0-dev preinstallati prima di installare pynids. Inoltre, potresti dover installare manualmente libnids, incluso con pynids, usando il solito processo configure && make && make install.

Per le quattro modalità di ispezione, devi avere installati e configurati correttamente i rispettivi pacchetti Python (). Contattaci se hai bisogno di aiuto per configurarli o per qualsiasi altra domanda.


STATO:
-------
Alcuni [problemi](https://github.com/7h3rAm/flowinspect/blob/master/issues) sono stati riscontrati attraverso alcuni test di base effettuati durante lo sviluppo iniziale. Ci stiamo lavorando. Sentiti libero di usare flowinspect e fammi sapere se ne trovi altri. C'è anche una lista [todo](https://github.com/7h3rAm/flowinspect/blob/develop/todo) che potrebbe essere utile se sei disposto a contribuire.


LICENZA:
--------
![CC-BY-NC-SA](https://assets.kitploit.com/production/public/readmes/placeholders/f0fc86cfe65f76d40e15aaec61704ec8220a56dc89d4be03c46f67cb31b9fa8c.svg)
Quest'opera è distribuita con licenza Creative Commons Attribuzione - Non commerciale - Condividi allo stesso modo 4.0 Internazionale.


[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/7h3rAm/flowinspect/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
Scarica lo strumento