
Raccogli un elenco di appliance Citrix in una coppia paese/stato e verifica se sono vulnerabili a CVE-2019-19781
Raccoglie un elenco di appliance Citrix in una coppia paese / stato e verifica se sono vulnerabili a CVE-2019-19781. I risultati vengono emessi come JSON, che può essere elaborato facilmente in un report PowerBI significativo.
Lo fa interrogando Shodan per tutti i risultati in un determinato paese che corrispondono a una stringa di ricerca. Per impostazione predefinita, cerca country:AU has_ssl:true con la stringa di ricerca "Set-Cookie: pwcount=0"
Per verificare la vulnerabilità, controlliamo se una richiesta HEAD per https://<HOST>/vpn/%2E%2E/vpns/cfg/smb.conf restituisce uno stato 200. Questo significa che il directory traversal è consentito e che la patch o la soluzione alternativa non è stata applicata all'host.
Dovrai scaricare i database GeoLite2 ASN e City, che risolveranno i dettagli sugli host scoperti. Puoi trovare i download qui: https://dev.maxmind.com/geoip/geoip2/geolite2/
Posiziona i file .mmdb in una cartella chiamata geolite nella directory in cui hai estratto shitsniffer.py
usage: shitsniffer.py [-h] [-t TARGETHOST] [-f RESULTSFILE] [-d DATAFILE]
[-a APIKEY] [-c COUNTRY] [-s SEARCHSTRING] [-n]
[-l LIMIT]
OPTIONS:
-h, --help show this help message and exit
-t TARGETHOST, --targethost TARGETHOST
Host to check, will scan shodan if not specified
-f RESULTSFILE, --resultsfile RESULTSFILE
Where to save the scanner output json file
-d DATAFILE, --datafile DATAFILE
Path to save/load shodan data file (saves query
credits)
-a APIKEY, --apikey APIKEY
Your shodan.io API key
-c COUNTRY, --country COUNTRY
Country to search
-s SEARCHSTRING, --searchstring SEARCHSTRING
Additional search arguments
-n, --no-color Output without color
-l LIMIT, --limit LIMIT
Process this many hosts from shodan data
Example: python shitsniffer.py -a <API key> -d shodan-DDMMYY.json -f output-DDMMYY.json
Un ringraziamento va a Diverse Services per avermi concesso il tempo di dedicarmi a questa impresa.