-
Posts
18805 -
Joined
-
Last visited
-
Days Won
747
Everything posted by Nytro
-
In ultima perioada am citit Dan Brown - Simbolul pierdut si m-am apucat de Machine Learning and Security. Doar fizic, nu imi place sa citesc in format electronic, fie el PC sau Kindle.
-
Super. Si un Humble Bundle pentru Java, daca sunt persoane interesate: https://www.humblebundle.com/books/java-by-packt-books?partner=universalsci
- 1 reply
-
- 3
-
-
-
Daca sunteti in UK, puteti da niste exemple de salarii? De asemenea, o suma pentru cheltuieli lunare ar putea fi utila. Eu am avut mai demult o oferta de 2500-3000 de lire pe luna (net) si am refuzat. Chiria in zona 8 (periferie, zona de case) era in jur de 1200 de lire pe luna cu doua camere (sau 1 bedroom cum zic ei). Si nu mi s-a parut ca merita deloc. PS: Un prieten care livreaza pizza mi-a zis ca face 2000-2200 (cu tot cu tips).
-
Mai e putin pana la Defcamp.
-
Verificati asta: https://hashcat.net/forum/thread-7717.html
-
IT'S OFFICIAL: IBM is acquiring software company Red Hat for $34 billion
Nytro replied to mrgrj's topic in Stiri securitate
Da.- 1 reply
-
- 1
-
-
Linux/x86 - execve(/bin/cat /etc/ssh/sshd_config) Shellcode 44 Bytes
Nytro replied to Massaro's topic in Exploituri
execve cu cat in loc de open/read? Stupid. -
ribunalul Hunedoara a dispus marţi liberarea condiţionată din Penitenciarul Deva a hackerului Marcel Lehel Lazăr, cunoscut şi sub apelativele de "Guccifer" şi "Micul Fum", bărbatul fiind condamnat la 7 ani de închisoare pentru că a spart conturile de e-mail ale mai multor personalităţi din România şi SUA. Hackerul Guccifer va fi eliberat condiționat "Instanţa admite contestaţia formulată de condamnat împotriva sentinţei penale 974/2018 pronunţată de Judecătoria Deva în dosarul 6478/221/2018, desfiinţează integral sentinţa penală atacată şi, în rejudecare, admite cererea formulată de condamnat, în prezent deţinut în Penitenciarul Deva, şi dispune liberarea condiţionată a acestuia din pedeapsa de 7 ani închisoare aplicată prin sentinţa penală nr. 1667/2014 a Tribunalului Bucureşti, secţia Penală", a declarat, pentru AGERPRES, purtătorul de cuvânt al Tribunalului Hunedoara, Ildiko Glăman. Pe de altă parte, pe 10 septembrie, Curtea de Apel Alba Iulia a admis cererea de extrădare în Statele Unite ale Americii a hackerului Marcel Lehel Lazăr, predarea acestuia fiind amânată până la data punerii în libertate ca urmare a liberării condiţionate sau a executării până la termen a pedepsei de 7 ani închisoare pe care o are în România. Potrivit informaţiilor postate pe portalul instanţei, CA Alba Iulia a constatat că sunt întrunite condiţiile extrădării în ceea ce îl priveşte pe Lazăr şi a admis cererea formulată de autorităţile judiciare din SUA, înregistrată la Direcţia Drept Internaţional şi Cooperare Judiciară din cadrul Ministerului Justiţiei la data de 8 august. Marcel Lehel Lazăr, alias "Guccifer" sau "Micul Fum", a devenit celebru după ce a spart conturile de e-mail ale unor personalităţi din România şi America. În vârstă de 46 de ani, bărbatul a fost condamnat în septembrie 2016 la 52 de luni de închisoare de către un tribunal federal din oraşul Alexandria, statul american Virginia. "Guccifer" a pledat vinovat la acuzaţiile de furt de identitate cu circumstanţe agravante şi acces neautorizat la computere, după ce a fost extrădat din România în SUA. Lazăr a declarat în diverse interviuri că ar fi spart serverul privat al fostului secretar de stat american Hillary Clinton de la locuinţa acesteia din Chappaqua, New York, însă oficiali ai serviciilor de securitate naţională au respins afirmaţiile acestuia, pe care le-au calificat drept nefondate. Hackerul este bănuit că ar fi spart circa 100 de conturi de e-mail în perioada 2012-2014. Printre persoanele vizate s-ar număra fostul secretar de stat american Colin Powell, o rudă a fostului preşedinte american George W. Bush şi Sidney Blumenthal, un apropiat al lui Hillary Clinton. În România, Marcel Lazăr Lehel a primit, în 2014, o condamnare de 7 ani închisoare, el fiind acuzat că a accesat în mod repetat şi fără drept, prin încălcarea măsurilor de securitate, conturile de e-mail aparţinând unor persoane publice din România, cu scopul de a intra în posesia datelor confidenţiale aflate în poşta electronică. Printre persoanele ale căror e-mailuri ar fi fost sparte de "Guccifer" s-ar afla fostul director al SRI George Maior şi europarlamentarul Corina Creţu. Lehel este încarcerat în România din octombrie 2016, când a fost adus din SUA, iniţial fiind închis la Penitenciarul Rahova. Sursa: https://www.digi24.ro/stiri/actualitate/justitie/hackerul-guccifer-eliberat-conditionat-1018801?
-
- 2
-
-
Pentru cei care nu stiu, a inceput ECSC 2018, la Londra. E vorba de un concurs european, CTF, cu multe tari europene participante. In ultimii doi ani, Romania a luat locul II, sper ca anul acesta sa ia primul loc. Si sper ca la anul, cand Romania va organiza acest concurs, sa va inscrieti mai multi. Pagina echipei Romaniei, pentru a fi la curent cu ce se intampla: https://www.facebook.com/ECSC2018/
-
- 3
-
-
-
A fost publicata agenda completa: https://www.owasp.org/index.php/OWASP_Bucharest_AppSec_Conference_2018
-
Inteleg ce vrei sa zici, dar ai vazut pana la capat, nu?
-
Eu iti recomand o carte. Orice carte iti place (de PHP7).
-
https://9gag.com/gag/abYXQXr
-
Mai e putin pana la OWASP.
-
E posibil sa se mai caute la KPMG, dar sunt si alte firme care cauta ( @TheTime ). Vedeti bestjobs/Linkedin. Nu cred ca se angajeaza in Romania "remote". Nici in afara nu e atat de comuna aceasta practica.
-
Exista destule persoane care nu au luat singure OSCP-ul. De aceea, s-a introdus recent o verificare, iar cand dai examenul trebuie sa ai webcam-ul pornit, sa verifice ca esti tu la calculator si nu altcineva. https://www.offensive-security.com/offsec/proctoring/
-
Se castiga OK in security, depinde de la firma la firma. Ca in programare de exemplu, depinde de fiecare firma, in functie de ce se face acolo. Cerintele sunt simple: sa stii. Partea de facultate nu ar trebui sa fie relevanta, deoarece nu se face securitate in facultate, dar HR si anumite persoane tin cont de asta. Certificarile nu sunt obligatorii, dar daca ai OSCP, mai ales daca l-ai luat singur si nu ajutat de cineva, ai "puncte bonus". Ca sa nu mai zic ca nu o sa ai probleme la multe intrebari tehnice. Sunt destui de pe forum care lucreaza in domeniu in Romania, in mare pentru firme din strainatate, dar si ceva exemple locale. Se lucreaza cel mai des "remote". Daca ai de facut un pentest pe un site, nu trebuie sa te duci la sediul clientului sa faci asta. Insa din cand in cand se mai merge si la client, fie in tara, in alt oras, fie mai degraba in alta tara. Pentru perioade scurte de timp, de la cateva zile la maxim 2 saptamani as zice. Unii manageri romani ar putea sa fie batuti in cap, dar altii nu. Si la interviuri va recomand sa fiti atenti la manageri, deoarece multe lucruri depind de ei: mariri salariale, participari la training-uri sau conferinte, luat certificari etc.
-
Se castiga bine pe Java, trebuie sa alegi ceea ce iti place. Iti place mai mult partea de security? Treci pe security, chiar daca la inceput e mai greu. Daca nu esti sigur, ramai pe Java.
-
Face cineva un patch pentru kernel, prin care sa introduca un modul de inteligenta artificiala care sa invete cum se comporta user-ul in functie de system call-uri si daca ajunge sa streseze kernelul (poate cu prea multe IO) - sa introduca un delay de consolare, urmat de un halt in cazul in care nu se opreste? "Kernels have feelings too!"
-
Da... "apologizes for 'unprofessional and uncalled for' behavior" https://www.cnbc.com/2018/09/17/linux-creator-linus-torvalds-takes-time-off-apologizes-for-behavior.html Asta inseamna ca nu o sa mai avem asa ceva?
-
r2dec Converts asm to pseudo-C code. Software Requirements Requires radare2 version 2.9.0 or newer. Install Follow the following steps to install r2dec via r2pm r2pm init r2pm install r2dec done Usage open with radare2 your file analize the function you want to disassemble (af) run the plugin via pdd done. Arguments [0x00000000]> pdd? Usage: pdd [args] - core plugin for r2dec pdd - decompile current function pdd? - show this help pdda - decompile current function with side assembly pddb - decompile current function but shows only scopes pddu - install/upgrade r2dec via r2pm pddi - generates the issue data Environment R2DEC_HOME defaults to the root directory of the r2dec repo [0x00000000]> pdd --help r2dec [options] --help | this help message --assembly | shows pseudo next to the assembly --blocks | shows only scopes blocks --colors | enables syntax colors --casts | shows all casts in the pseudo code --debug | do not catch exceptions --html | outputs html data instead of text --issue | generates the json used for the test suite --paddr | all xrefs uses physical addresses instead of virtual addresses --xrefs | shows also instruction xrefs in the pseudo code Radare2 Evaluable vars You can use these in your .radare2rc file. r2dec.casts | if false, hides all casts in the pseudo code. r2dec.asm | if true, shows pseudo next to the assembly. r2dec.blocks | if true, shows only scopes blocks. r2dec.paddr | if true, all xrefs uses physical addresses compare. r2dec.xrefs | if true, shows all xrefs in the pseudo code. r2dec.theme | defines the color theme to be used on r2dec. e scr.html | outputs html data instead of text. e scr.color | enables syntax colors. Report an Issue open with radare2 your file analize the function you want to disassemble (af) give the data to the plugin via pddi or pdd --issue insert the JSON returned by the previous command into the issue (you can also upload the output) done. Supported Arch arm avr m68k (experimental) mips ppc sparc v850 wasm (partial) x86-64 (intel syntax) Developing on r2dec Read DEVELOPERS.md Example This example shows a possible dump of the plugin. Source Code #include <stdio.h> int main(int argc, char const *argv[]) { int var = 0; while(var < 0x90) { if(var < 0x10) { var += 0x50; } var += 0x10; } return 0; } radare2 view ╭ (fcn) main 50 │ main (int arg1, int arg2); │ ; var int local_20h @ rbp-0x20 │ ; var int local_14h @ rbp-0x14 │ ; var signed int local_4h @ rbp-0x4 │ ; DATA XREF from entry0 (0x1041) │ 0x00001119 55 push rbp │ 0x0000111a 4889e5 mov rbp, rsp │ 0x0000111d 897dec mov dword [local_14h], edi ; arg1 │ 0x00001120 488975e0 mov qword [local_20h], rsi ; arg2 │ 0x00001124 c745fc000000. mov dword [local_4h], 0 │ ╭─< 0x0000112b eb0e jmp 0x113b │ │ ; CODE XREF from main (0x1142) │ ╭──> 0x0000112d 837dfc0f cmp dword [local_4h], 0xf ; [0xf:4]=0x3e000300 │ ╭───< 0x00001131 7f04 jg 0x1137 │ │⋮│ 0x00001133 8345fc50 add dword [local_4h], 0x50 ; 'P' │ │⋮│ ; CODE XREF from main (0x1131) │ ╰───> 0x00001137 8345fc10 add dword [local_4h], 0x10 │ ⋮│ ; CODE XREF from main (0x112b) │ ⋮╰─> 0x0000113b 817dfc8f0000. cmp dword [local_4h], 0x8f ; [0x8f:4]=0x2a800 │ ╰──< 0x00001142 7ee9 jle 0x112d │ 0x00001144 b800000000 mov eax, 0 │ 0x00001149 5d pop rbp ╰ 0x0000114a c3 ret r2dec pseudo-C code /* r2dec pseudo C output */ #include <stdint.h> int32_t main (int32_t argc, char ** argv) { char ** local_20h; int32_t local_14h; int32_t local_4h; local_14h = edi; local_20h = rsi; local_4h = 0; while (local_4h <= 0x8f) { if (local_4h <= 0xf) { local_4h += 0x50; } local_4h += 0x10; } eax = 0; return eax; } Sursa: https://github.com/wargio/r2dec-js
-
- 2
-
-
Poking Around With 2 lsass Protection Options Welcome to my first post! I am a career blue teamer turned red teamer a few years back. My blue team background includes incident response, threat detection, malware analysis, and threat hunting in both Federal and Commercial sectors. Having spent a good amount of time analyzing malware and chasing attackers on networks, I now have an interest in helping to sharpen and challenge other fellow blue teamers. This was one of the reasons I decided to switch roles a bit and take on offensive security roles (red team) a while back (well that and I have always enjoyed looking ways to circumvent controls). And so I created this blog site to post observations along the way. I also plan to put content here that is very simple and has steps that blue teamers can follow if they want to become more familiar with certain tools/tactics. There are several red teamers and security experts leading the way with new research findings and releasing bleeding edge tools and techniques. The goal for this blog is to help other blue teamers become more familiar with the offensive security side of the house, and to do so with small achievable steps. This brief post is centered around looking at LSA Protection and Credential Guard against some of the commonly used mimikatz modules, as well as looking at workaround for erach. So…here we go! Testing Overview I have a very basic testing scenario: Testing host: Windows 10 Countermeasures tested: LSA Protection, Credential Guard Used mimikatz for credential dumping (note: there are tons of ways to run mimikatz — in memory, on disk, remotely as a .xsl file invoked via wmic, etc.; whatever method used, I am assuming you already have mimikatz running) Scenario 1: Windows 10 with LSA Protection First, I ran mimikatz without LSA Protection and validated that I was able to get credentials. I used the commonly used “sekurlsa::logonpasswords” mimikatz command to retrieve hashes and clear text passwords from lsass. Next, I enabled LSA Protection by following the steps posted at: https://docs.microsoft.com/en-us/windows-server/security/credentials-protection-and-management/configuring-additional-lsa-protection: Using regedit, I navigated to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa Then I set the value of the registry key to: “RunAsPPL”=dword:00000001 Added RunAsPPL with a dword of 1 to HKLM\SYSTEM\CurrentControlSet\Control\Lsa rebooted After reboot, I ran the same “sekurlsa::logonpasswords” mimikatz command and observed the output: mimikatz sekurlsa::logonpasswords after enabling LSA Protection The LSA Protection is preventing the mimikatz module above from working. I also tried the mimikatz modules below: lsadump::secrets: Still worked and I was able to get syskey information to decrypt secrets from from the registry on disk lsadump::sam: Still works, since it’s reading credentials from the SAM on disk lsadump::lsa: Did not work: returned for each local account sekurlsa::pth /user:<user> /domain:<domain> /ntlm:<ntlmhash>: Did not work: Lastly, I also tried the golden ticket and dcsync options with mimikatz and both successfully worked (note: I had already compromised the test environment domain and had domain admin level rights before this test): kerberos::golden /user:<user> /domain:<domain> /sid:<sid> /krbtgt:<krbtgt hash> /endin:<value> /renewmax:<value>: Successful lsadump::dcsync /domain:<domain> /user:<user>: Successful LSA Protection Bypass: Mimikatz has the mimidrv.sys driver that can bypass LSA Protection. I downloaded the mimikatz_trunk zip file from Ben Delpy’s mimikatz github repo, and copied the whole folder over, which included mimikatz.exe, mimidrv.sys, and mimilib.dll. I ran mimikatz.exe, and started the mimidrv.sys driver, and used that to remove LSA Protection from the lsass.exe process: In the same mimikatz session, I then ran sekurlsa::logonpasswords and then got clear text passwords and hashes, proving that the mimidrv.sys driver does effectively bypass and remove LSA Protection. This would be trivial for an attacker to do once they already have admin access to a system. In summary, LSA Protection seems to offer some protections against “out-of-the-box” mimikatz. However, as noted above the mimikatz driver bypasses LSA Protection settings allowing mimikatz to to steal clear text credentials and hashes. Also mimikatz and other credential dumpers can still dump hashes of local accounts since those hashes are on disk as opposed to in LSASS, where LSA Protection helps. Additionally, if an attacker has access to an LSA Protection-enabled system, the attacker can resort to keystroke logging or social engineering in order to get credentials. I would still recommend LSA Protection, as this would make an attacker take additional steps to dump credentials, but it is not a 100% bulletproof solution to credential dumping. Scenario 2: Windows 10 with Credential Guard I enabled Credential Guard by using the DG Readiness Powershell Script posted here: https://docs.microsoft.com/en-us/windows/security/identity-protection/credential-guard/credential-guard-manage I downloaded the ps script, set the execution policy to bypass, imported it, and ran it: .\DG_Readiness_Tool_v3.2.ps1 -Enable -AutoReboot Note: To disable run the same command but use -Disable instead. After rebooting I ran the “sekurlsa::logonpasswords” mimikatz command and received the following output: mimikatz sekurlsa::logonpasswords on system protected with Credential Guard Instead of the NTLM hash, Credential Guard returns an encrypted string. This is because Credential Guard isolates and protects secrets in an isolated lsass process using virtualization. The normal lsass process uses remote procedure calls to communicate with the isolated lsass process. Next I also tried the mimikatz modules below: lsadump::secrets: Still worked and I was able to get syskey information to decrypt secrets from from the registry on disk lsadump::sam: Still works, since it’s reading credentials from the SAM on disk lsadump::lsa: Did not work: returned for each local account sekurlsa::pth /user:<user> /domain:<domain> /ntlm:<ntlmhash>: Did not work: Lastly, I also tried the golden ticket and dcsync options with mimikatz and both successfully worked: kerberos::golden /user:<user> /domain:<domain> /sid:<sid> /krbtgt:<krbtgt hash> /endin:<value> /renewmax:<value> lsadump::dcsync /domain:<domain> /user:<user>: Successful Credential Guard Workaround: I followed steps outlined by Ben Delpy at: “https://twitter.com/gentilkiwi/status/942912600991465472?lang=en” In a nutshell, I first ensured that the mimikatz mimilib.dll binary was in the same directory as mimikatz.exe, started mimikatz.exe, validated that Credential Guard was enabled (encrypted strings returned from sekurlsa::logonpasswords command), and ran the mimikatz “misc::memssp” command: Now we have an SSP injected into memory. In essence, mimikatz is registering mimilib.dll as an SSP, allowing mimikatz to log the passwords of all users who login to c:\windows\system32\mimilsa.log. Next I hit ctrl-alt-del and selected “Lock” and then logged in. After logging in, I opened a cmd prompt and typed “type c:\windows\system32\mimilsa.log” and verified that my clear text credentials there. In summary, Credential Guard seems to offer some protections against “out-of-the-box” mimikatz, as does LSA Protection. However, mimikatz has the ability to register a dll as SSP and obtain clear text credentials of all users who login. Also mimikatz and other credential dumpers can still dump hashes of local accounts since those hashes are on disk as opposed to in lsass. Additionally, just as with LSA Protection-enabled systems, attackers can resort to keylogging or social engineering to get credentials. I would still recommend Credential Guard, but know that it is not a 100% bulletproof solution to credential dumping. I would recommend looking into additional detections such as looking for “mimilsa.log” on systems. References “https://microsoftrnd.co.il/Press%20Kit/BlueHat%20IL%20Decks/BenjaminDelpy.pdf” “https://adsecurity.org/?page_id=1821” ““https://twitter.com/gentilkiwi/status/942912600991465472?lang=en” “https://blog.stealthbits.com/stealing-credentials-with-a-security-support-provider-ssp/” “http://blog.jpcert.or.jp/2016/10/verification-of-ad9d.html” “http://www.thesecurityblogger.com/understanding-powersploit-mimikatz-and-defense/mimikatz-driver-remove-lsass-protection/” “https://docs.microsoft.com/en-us/windows-server/security/credentials-protection-and-management/configuring-additional-lsa-protection” “https://docs.microsoft.com/en-us/windows/security/identity-protection/credential-guard/credential-guard-manage” Sursa: https://medium.com/red-teaming-with-a-blue-team-mentaility/poking-around-with-2-lsass-protection-options-880590a72b1a
-
VLAN Hopping and Mitigation September 10, 2018 | Pam X Get the latest security news in your inbox. Labs Research Security Essentials All Blogs No thanks. Close this now. Twitter LinkedIn Facebook Google Plus Reddit We’ll start with a few concepts: VLAN A VLAN is used to share the physical network while creating virtual segmentations to divide specific groups. For example, a host on VLAN 1 is separated from any host on VLAN 2. Any packets sent between VLANs must go through a router or other layer 3 devices. Security is one of the many reasons network administrators configure VLANs. However, with an exploit known as 'VLAN Hopping', an attacker is able to bypass these security implementations. Learn more about network segmentation and VLANs here. VLAN Hopping This type of exploit allows an attacker to bypass any layer 2 restrictions built to divide hosts. With proper switch port configuration, an attacker would have to go through a router and any other layer 3 devices to access their target. However, many networks either have poor VLAN implementation or have misconfigurations which will allow for attackers to perform said exploit. In this article, I will go through the two primary methods of VLAN hopping, known as 'switched spoofing', and 'double tagging'. I will then discuss mitigation techniques. Switched Network It is crucial we understand how switches operate if we would like to find and exploit their vulnerabilities. We are not necessarily exploiting the device itself, but rather the protocols and configurations instructing how they operate. On a switch, a port is either configured as an access port or a trunking port. An access port is typically used when connecting a host to a switch. With the implementation of VLANs, each access port is assigned to only one VLAN. A trunking port is used when connecting two switches or a switch and a router together. Trunking ports allow for traffic from multiple VLANs. A trunk port can be configured manually or created dynamically using Dynamic Trunking Protocol (DTP). DTP is a Cisco proprietary protocol where one use is to dynamically establish a trunk link between two switches. Switched Spoofing VLAN Attack An attacker acts as a switch in order to trick a legitimate switch into creating a trunking link between them. As mentioned before, packets from any VLAN are allowed to pass through a trunking link. Once the trunk link is established, the attacker then has access to traffic from any VLAN. This exploit is only successful when the legitimate switch is configured to negotiate a trunk. This occurs when an interface is configured with either "dynamic desirable", "dynamic auto" or "trunk" mode. If the target switch has one of those modes configured, the attacker then can generate a DTP message from their computer and a trunk link can be formed. Double Tagging Double tagging occurs when an attacker adds and modifies tags on an Ethernet frame to allow the sending of packets through any VLAN. This attack takes advantage of how many switches process tags. Most switches will only remove the outer tag and forward the frame to all native VLAN ports. With that said, this exploit is only successful if the attacker belongs to the native VLAN of the trunk link. Another important point is, this attack is strictly one way as it is impossible to encapsulate the return packet. VLAN Hopping Exploit Scenario 1 - Switch Spoofing Attack In this scenario there exists the attacker, a switch, and the target server. The attacker is attached to the switch on interface FastEthernet 0/12 and the target server is attached to the switch on interface FastEthernet 0/11 and is a part of VLAN 2. Take a look at the following topology. Once you are familiar with the topology, take a look at a few of the configurations set for the switch: interface FastEthernet0/11 switchport mode access switchport mode nonegotiate switchport access vlan 2 ! interface FastEthernet0/12 switchport mode dynamic auto Hopefully, you can see the configuration issue with interface fa0/12. This port is set to accept incoming negotiations to determine whether the port is for access or trunking. Which means an attacker is able to perform a Switch Spooking attack. Once the attacker connects to the port they can then send a DTP message and a trunking link will be established. An attacker can use the program Yersinia to craft and send a DTP message. Yersinia is a penetration testing framework built to attack many protocols that reside on layer 2. It comes pre-installed with kali Linux and has an easy to use graphical user interface (GUI). Yersinia Homepage - http://www.yersinia.net/ To launch Yersinia: yersinia -G Here is a quick look at the GUI: Now to send a DTP message is as simple as the following 4 steps: click "Launch attack" click the tab "DTP" click "enable trunking" click "ok" Yersinia will the send out a DTP message and within a few seconds, a trunking link will be established. In our scenario, the attacker will then have access to all traffic flowing through VLAN 2 and can directly attack without going through any layer 3 devices. Scenario 2 - Double Tagging Attack In this scenario, there exists an attacker, 2 switches, and a target server. The attacker is attached to switch 1. Switch 1 is attached to switch 2 and finally, our target is attached to switch 2. Take a look at the following topology. Once you are familiar with the topology, take a look at a few of the configurations set for switch 1. interface FastEthernet0/12 switchport mode access switchport nonegotiate switchport access vlan 1 ! interface FastEthernet0/11 switchport trunk encapsulation dot1q switchport mode trunk switchport nonegotiate switchport trunk native vlan 1 From these configurations, we see that an attacker would be unable to perform a switch spoofing attack. However, we see that the attacker belongs to the native VLAN of the trunk port. Which means this topology is vulnerable to a Double Tagging attack. An attacker can use the program Scapy, to create the specially crafted frames needed for processing this attack. Scapy is a Python program created to manipulate packets. Scapy Homepage - https://scapy.net/ Scapy Documentation - http://scapy.readthedocs.io/en/latest/usage.html Start Scapy: sudo ./scapy Using the sendp() function to craft a packet: >>>sendp(Ether()/Dot1Q(vlan=1)/Dot1Q(vlan=2)/IP(dst='<destination IP', src='<source IP>')/ICMP()) This will generate a double 802.1q encapsulated packet for the target on VLAN 2. Take a look at the following topology to view how the switches manage this frame. From the picture, we can see that switch 1 reads and removes only the outside tag. It checks that the host is part of the stated VLAN and forwards the packet to all native VLAN ports (VLAN 1). Switch 2 then receives the packet with only one header left. It assumes the frame belongs to the stated VLAN on this tag (VLAN 2) and forwards to all ports configured for VLAN 2. The target then receives the packet sent by the attacker. VLAN = HOPPED. Due to the nature of this attack, it is strictly one way. Please also note that this attack may not work on new switches as documented here. Mitigation for VLAN Hopping Switched Spoofing To prevent a Switched Spoofing attack, there are a few steps you should take: Do not configure any access points with either of the following modes: "dynamic desirable", "dynamic auto", or "trunk". Manually configure access ports and disable DTP on all access ports. switchport mode access switchport mode nonegotiate Manually configure all trunk ports and disable DTP on all trunk ports. switchport mode trunk switchport mode nonegotiate Shutdown all interfaces that are not currently in use. Double Tagging To prevent a Double Tagging attack, keep the native VLAN of all trunk ports different from user VLANs. Final Note Switches were not built for security. However, it is important to utilize security measures at every level. If you are to take the time to segment your network, make sure it is done properly and securely. Be diligent when configuring your network. Sursa: https://www.alienvault.com/blogs/security-essentials/vlan-hopping-and-mitigation
-
- 2
-
-