WEBVTT

00:00.000 --> 00:01.840
Okay, thank you everyone.

00:01.840 --> 00:04.220
So let's start the talk.

00:04.400 --> 00:07.320
Hi, I'm Su Hao from Taiwan.

00:07.640 --> 00:17.880
This is my first time to present at DEF CON, and also my first time at DEF CON, and also my first time at Lagos, and not my first time in US.

00:18.760 --> 00:22.860
Okay, so thank you all for joining my session.

00:23.140 --> 00:31.440
So I'm excited to share some practical Red Team networking techniques with you today.

00:31.600 --> 00:35.160
So I guess we can get started.

00:37.130 --> 00:38.650
Okay.

00:39.250 --> 00:48.370
So now let me take you into a typical day in my IT life, seeing my intranet LDAP server log.

00:48.370 --> 00:51.490
And there's a login from Frank.

00:52.370 --> 00:55.850
And there's a login from Bob.

00:56.790 --> 01:02.950
And then, wow, there's an invalid login from a public IP, 9.9.9.9.

01:04.830 --> 01:09.110
And how and why this can happen?

01:09.110 --> 01:13.630
This is an intranet server without no destination NAT.

01:14.430 --> 01:19.670
So, okay, as an IT, I'll ban that bad IP.

01:21.190 --> 01:26.790
But a second later, there's another IP attacking my server again.

01:26.790 --> 01:28.990
So how is that possible?

01:28.990 --> 01:35.210
That someone can use a public IP address to attack our intranet server.

01:35.210 --> 01:39.530
This is a key point that we are going to discuss in this talk.

01:39.530 --> 01:47.050
This presentation will explore ways of lower-level network penetration through virus of internal protocol.

01:47.190 --> 01:58.910
This technique can be used for advanced Red Team exercise or can be blocked before they are abused by malicious attackers in your corporate networks.

01:58.930 --> 02:04.050
Before we dive into the details, let me briefly introduce myself.

02:04.310 --> 02:07.910
Hi, I'm Su Hao Tao from Taiwan.

02:07.910 --> 02:12.230
And I now is a Red Teamer Trade Researcher at Tremyco.

02:12.230 --> 02:18.230
And I graduated from Tsinghua University in Taiwan and a former HAC-SERC president.

02:18.230 --> 02:24.270
I love to play something with networks and network protocols.

02:24.270 --> 02:33.570
I started this research for fun and it turned out that it is of great importance to general network security.

02:33.630 --> 02:41.350
So I'm sharing my GitHub account here where you can find all the tools and materials of this research.

02:42.210 --> 02:45.010
So this is today's agenda.

02:45.010 --> 02:54.170
First, I will share some new Red Team techniques using IP spoofing and how we can use that for initial access.

02:54.170 --> 03:05.410
Then, I will reveal the nightmare of VXLAN, including internal hijacking and how buggy routing protocols can lead to IP hijacking and even domain compromise.

03:05.550 --> 03:10.930
And finally, I will wrap up with some key takeaways before we move on to the Q&A.

03:11.830 --> 03:19.910
So first, I want to talk about some spoofing source IP in the public network, also known as WAN.

03:20.790 --> 03:27.830
We all know that even in recent years, package spoofing is still possible on public networks.

03:27.930 --> 03:35.210
Please know that all the IP addresses are example IP addresses, not any common or public IPs.

03:35.210 --> 03:44.290
An attacker with the IP address 2.2.2.2 can send a DNS request with a source IP of 3.3.3.3.

03:44.290 --> 03:46.930
That does not belong to itself.

03:49.860 --> 04:00.720
And WAN.1.1 will receive the package and it has no way to verify whether the package is a spoofed package or a valid one.

04:00.720 --> 04:06.260
And it will send a DNS response to the 3.3.3.3.

04:07.020 --> 04:13.900
So the 3.3.3.3 will receive the DNS response with our making a request.

04:13.900 --> 04:17.660
This is a typical DDoS, DNS amplification attack.

04:17.660 --> 04:19.720
And it still works nowadays.

04:20.460 --> 04:25.200
Next, I want to dive into the company network infrastructure.

04:25.200 --> 04:32.340
How IT will block a computer from accessing the public network for security purposes.

04:32.340 --> 04:43.580
So, for the best practice, when a package is sent from a crucial server to a public IP, it will arrive to the firewall.

04:43.580 --> 04:46.160
And the firewall will drop the package.

04:47.040 --> 04:53.160
However, we see some IT just disabled the NAT mechanism on the router.

04:53.300 --> 04:58.360
So the package will still forward out to the wide area network.

04:58.360 --> 05:07.820
And the remote server will see and receive that package and see that source IP is not valid.

05:08.200 --> 05:12.560
So it will either drop that package or respond to an unknown address.

05:12.560 --> 05:15.200
And the client will not receive the message.

05:16.520 --> 05:20.180
So when your code is completed, it's a mess, but it still works.

05:20.180 --> 05:23.220
Because the client still does not receive any response.

05:23.220 --> 05:26.520
So the client is not connected to the internet.

05:27.420 --> 05:36.980
So, if we consider both situations together, what would happen if we spoofed a source IP address on the intranet?

05:38.220 --> 05:41.620
Imagine a rating scenario.

05:41.620 --> 05:48.540
The right attacker hacked a company's device, like .1, .3.

05:48.820 --> 05:53.880
It can create a tunnel between the C2 server and the compromised device.

05:53.880 --> 06:03.440
After that, it can create a DNS request through the tunnel, which source IP is the attacker public IP, which is 9.9.9.9.

06:04.600 --> 06:11.780
When the package arrives the compromised device, it will forward the package to the company intranet router.

06:14.160 --> 06:23.080
After the router will receive the package, it will look up its routing table and forward the package to the second victim.

06:25.220 --> 06:38.620
As we know, if there is no firewall for the second victim, .1, .2, the response package will send back to the attacker through the public intranet.

06:39.760 --> 06:47.460
Then, the attacker will receive the package, when there is no evidence that the package comes from .1, .3.

06:47.460 --> 06:57.580
The entire TCP or UDB string only shows the IP source, IP is 9.9.9, and IP source 192.168.1.2.

06:58.580 --> 07:00.980
So, why IR is hard?

07:00.980 --> 07:10.280
In typical lateral movement attacks, the attacker used the IP address for previous compromised machine to target to the next system.

07:10.280 --> 07:22.360
This means, when the alarm being triggered, an IR team could simply use network log to trace the attacker path from one compromised machine to the previous one.

07:23.700 --> 07:32.460
The IR team could find the relevant log on the previous compromised machine and identify the initial access point.

07:33.700 --> 07:38.600
And then, the IR team will shut down the entire attack chain step by step.

07:40.300 --> 07:47.520
However, when spoofing techniques are involved, the source IP in the log will not be the previous compromised machine.

07:48.540 --> 07:52.820
So, the IR team will not be able to find the attacker path.

07:52.820 --> 07:57.480
They could only see a public IP is attacking their domain controller.

07:58.940 --> 08:13.780
Thus, the previous compromised machine will not be caught even if the alarm has triggered and it can change to another public source IP to continue the attack chain if the source IP is banded.

08:15.860 --> 08:25.660
Overlooking the attack path, the malicious package source and destination IPs only shows 9.9.9.9 and private IP 192.

08:25.660 --> 08:31.940
Thus, no one will know the previous compromised machine is .1.3.

08:33.100 --> 08:41.140
On the other hand, the terminal IP is HTTP traffic with a source IP of 7.7.7.7.

08:41.320 --> 08:53.280
So, if the 9.9.9 is banded, the attacker can simply switch to another public IP and attack the same target or different target.

08:53.280 --> 09:02.020
The IR team would need to check every router for layer 2 port locks in order to identify the compromised machine.

09:02.260 --> 09:07.420
Also, the source MAC address can also be forged at the first hop.

09:10.800 --> 09:18.160
So, what if the ISP filter package with a private source IP address?

09:18.600 --> 09:25.040
We can use H.323 NAT pathway to enable a temporary destination NAT.

09:26.180 --> 09:33.380
The attacker can send a special package to 9.9.9.9, which is its C2 server.

09:34.000 --> 09:46.520
The NAT router will then create a temporary destination NAT rule for a private IP 1.3.4.4.5 and open to its public IP port 4.4.5.

09:47.260 --> 09:54.820
This allows attackers to access private IP 1.3 on port 4.4.5 via 9.9.9.9.

09:56.240 --> 09:58.860
So, here's a quick demo.

09:59.360 --> 10:04.440
We can see that DAW 241 has a web server at 8080.

10:04.440 --> 10:12.340
Initially, the attacker DAW 142 could not access the intranet web server via the public IP.

10:12.540 --> 10:23.320
After we create a server and send a H.323 package from the compromised machine, we receive a package from the victim routers.

10:23.320 --> 10:32.500
And we know that the router gives me a NAT port to connect to the intranet web server.

10:32.960 --> 10:39.620
Also, we can see that the weblog source IP is from a public IP rather than a private IP.

10:39.620 --> 10:43.520
So, let's create a breakpoint for the attack chain.

10:45.260 --> 10:56.240
Another method discovered by Jimmy Cai involves spoofing a fake TCP sync package from the compromised device.

10:56.300 --> 11:07.880
Using the next target IP as the source IP address, which is .1.3 for now, and sending it to the attacker's server.

11:07.880 --> 11:15.040
The SNAT mechanism can be abused as a destination NAT to connect an intranet service.

11:16.400 --> 11:20.120
So, this is a second quick demo.

11:20.940 --> 11:27.220
We can see that the device at .35 has a web server running at 8080.

11:27.220 --> 11:35.660
Initially, the attacker at .131 could not access the intranet web server via the public IP.

11:35.660 --> 11:48.360
After we spoof a sync, sync package from the compromised device, using the next target IP and the port as source, and send it to the attacker's server.

11:48.500 --> 12:00.040
The router will create a source destination NAT, but we can abuse this route as a de- uh, destination NAT.

12:00.040 --> 12:09.020
So, we can, the SNAT mechanism will allow us to connect to the intranet web server.

12:09.020 --> 12:16.720
Additionally, we can see that the web server log shows the source IP as a public IP, rather than the private one.

12:16.720 --> 12:20.300
So, this also creates a breakpoint in the attack chain.

12:26.100 --> 12:33.800
So, next, can we replace the tunnel with, uh, official VPN?

12:33.800 --> 12:36.740
The answer is yes, in some cases.

12:37.160 --> 12:43.010
There are many commercial SSL VPN solutions that can spoof the source IP from the client.

12:43.400 --> 12:52.140
As shown in the diagram, commercial SSL VPN like those discussed at CyberSec 2025 may allow this behavior.

12:52.660 --> 13:02.180
On the other hand, whether open source VPN solutions like WireGuard or OpenVPN are affected depends on their configuration.

13:04.640 --> 13:07.380
So, where's the initial access?

13:07.640 --> 13:12.080
Do we have a chance to do this without an initial foothold in intranet?

13:12.080 --> 13:15.060
Can we use any existing tunnel?

13:16.380 --> 13:18.520
The answer is yes.

13:18.520 --> 13:23.380
On the internet exchange, everyone is on the same layer 2 network.

13:23.420 --> 13:30.960
Attacker can set a private network range as the next hop to the router of the company you want to attack.

13:30.960 --> 13:38.700
Also, the second method, we can abuse an existing tunnel such as GRE, IPIP, or SIP tunnel.

13:38.700 --> 13:42.980
But again, a good firewall configuration could cause this fail.

13:43.840 --> 13:59.180
So, in the intranet exchange, if we compromise a router at an intranet exchange, or we can just rent an IXP VM to assess an intranet exchange.

13:59.180 --> 14:05.780
We can force a private subnet as the next hop to the victim company router.

14:05.780 --> 14:16.540
And then, we can create a connection using our own public IP as the source IP and a private subnet as a destination.

14:16.540 --> 14:34.800
The victim router will forward the package to its intranet via its routing table and the intranet target will respond to the attacker to its public IP because the package source IP is a public one.

14:36.060 --> 14:41.240
On the other hand, we can abuse existing tunnel like GRE.

14:41.560 --> 14:43.750
So first, what is a GRE?

14:45.330 --> 14:48.930
GRE is a stateless layer 3 tunnel.

14:49.090 --> 15:00.890
This is widely used because it is easy to set up by only setting its protocol GRE public IP and GRE interface IP and its routing table, which is the next hop.

15:02.350 --> 15:06.410
Nowadays, there are still a lot of companies that use GRE.

15:06.410 --> 15:10.330
Like Cloudflare, Magic Transcend, and its customer.

15:10.330 --> 15:14.630
They can choose between IPsec or GRE, and IPsec is safer.

15:15.350 --> 15:24.630
And AWS Transit Gateway also supports GRE tunnel, but sadly, it's used for internal networking only.

15:24.910 --> 15:35.490
Also, Security Week reports that APT groups like Salt Typhoon create GRE tunnels to collect traffic from compromised devices.

15:35.490 --> 15:39.930
Last, a lot of companies also use GRE tunnel, but we don't know.

15:41.650 --> 15:43.730
So how does GRE work?

15:44.010 --> 15:53.210
When a package wants to go through a GRE tunnel, the kernel will pack the packet with a GRE header and send it over the public internet.

15:53.690 --> 16:02.090
At the receiver side, the GRE packet is unpacked and the inner packet is forward according to its routing table.

16:02.090 --> 16:12.590
GRE is stateless and doesn't provide any encryption, which means it's possible for everyone can spoof a GRE packet via a public network.

16:13.710 --> 16:24.430
For example, a private IP 1.2 wants to send a packet to another site, .2.2.

16:24.430 --> 16:27.970
The packet will send to its default gateway.

16:29.770 --> 16:40.190
And because it is a GRE tunnel, the gateway router will add a GRE header to the packet and then send it through the public internet.

16:41.330 --> 16:52.170
After a GRE packet arrives at 2.2.2, it will remove the GRE header and forward the inner packet according to its routing table.

16:55.350 --> 16:59.790
And then the 2.2.2 receives the packet.

16:59.790 --> 17:05.410
And if it wants to respond to the packet, the vice versa.

17:06.230 --> 17:21.950
The packet will send back to its default gateway and add the GRE header and send back to the 1.1.1 router and remove the GRE header and send it back to the 1.2.

17:24.170 --> 17:30.170
So, how do we find a GRE tunnel?

17:30.630 --> 17:32.730
We can use OSINT techniques.

17:32.730 --> 17:42.390
For example, we can search for a net floor dashboard like a photo on Google and filter for GRE traffic.

17:42.770 --> 17:47.830
This way we can obtain the IP address on both ends of the tunnel.

17:48.170 --> 17:50.810
Other OSINT techniques can also help too.

17:53.130 --> 18:01.390
Also, we can use GRE spoofing techniques to scan for existing GRE tunnels.

18:01.770 --> 18:08.050
First, we can create a GRE tunnel using the command provided above.

18:08.930 --> 18:20.340
Then we can craft a GRE packet with a spoofed source IP address that does not belong to us and send it over the public network to the victim.

18:20.340 --> 18:37.520
If the victim has a GRE peer conflict with the GRE packet source IP, for example, 1.1.1, it will decapsulate the inner packet and process it according to its routing table and forward to the inner packet.

18:38.920 --> 18:47.540
So, we can create and send many packets with different source IP addresses to proof of the correct victim peer.

18:49.300 --> 18:57.520
If the victim does not recognize the source IP as a known peer, it will drop the packet.

18:58.220 --> 19:13.000
On the other hand, if the source IP matches one of the victim known peers, the victim will accept the GRE packet and forward the inner packet according to its routing table.

19:13.900 --> 19:20.400
For scanning purpose, we set the destination of the inner packet to the victim itself.

19:20.760 --> 19:33.400
So, the victim will immediately reply the inner packet with an ICMP response and send it back to the attacker.

19:33.400 --> 19:44.730
Then, we can identify the victim GRE internal peer IP address by its ID finder and sequence.

19:45.060 --> 20:01.610
We can encode the information into ICMP ID finder and sequence field, which together can represent all 255 to the part of four possible IPv4 addresses.

20:04.530 --> 20:07.790
We also create a scanner script on GitHub.

20:07.790 --> 20:16.950
As you can see, when a GRE source address matches the remote GRE peer address, we can get an ICMP reply.

20:25.410 --> 20:29.930
Then, we can put everything together to get an initial access.

20:30.970 --> 20:37.850
Let's imagine a scenario the victim 1.1.1 has a GRE internal with 2.2.2.

20:37.850 --> 20:45.590
An attacker can forge a GRE packet that appears to be sent from 2.2.2.

20:45.590 --> 20:55.050
The inner packet is a DNS request sent from the provider IP 3.3.3 to an internal network IP.

20:58.800 --> 21:08.940
When the packet arrives, the victim will trust and use the GRE packet because it can claim to come from 2.2.2.2.

21:08.940 --> 21:20.320
Then, the victim will unpack the GRE packet and discover that it contains a DNS request whose destination is a private network IP.

21:20.320 --> 21:29.240
The victim will then forward the packet to its company intranet based on its routing table.

21:32.810 --> 21:45.250
Then, when the internal DNS server receives the DNS packet, it will respond and send a reply through the public internet to the attacker server.

21:48.790 --> 21:56.070
Thus, the attacker can interact with services on the victim intranet, including those using the TCP protocol.

21:58.010 --> 22:00.110
We have created a demo lab.

22:00.110 --> 22:03.230
The architecture is illustrated in the diagram.

22:03.230 --> 22:09.430
We have a target router whose GRE peer is 1.1.1.

22:09.430 --> 22:15.290
And there is an intranet waste server whose public network is 1.2.

22:16.530 --> 22:26.470
The waste server is hosted on 1.2 and the server can access the public network via SNAT.

22:29.850 --> 22:38.910
On the other hand, the router has a GRE internal and it can directly access the intranet waste server.

22:39.070 --> 22:47.690
And also, he has a public IP and we can see that there is a GRE internal.

22:47.690 --> 22:51.070
The peer is 1.1.1.1.

22:51.070 --> 23:07.610
So, initially, the attacker at IP address .142 cannot access the private network 192.168.1.2.

23:07.610 --> 23:25.030
Then, the attacker can create a spoofed GRE internal via the command shown above to the victim router and directly send traffic to the private address 1.2 through the fake internal.

23:25.610 --> 23:31.670
Then, the attacker can direct access and interact with the internal waste server.

23:33.520 --> 23:46.020
Similarly, if the layer 2 internal like GRE tab, also, if we can leak the victim MAC address, we can also exploit this in the same way.

23:46.020 --> 23:50.940
It is common to use the SNMP protocol to obtain this.

23:52.700 --> 24:10.180
For a short TLDR summary, when a company does not configure its firewall and use database on encrypted internal, even if it is a legacy configuration, an attacker can exploit this internal for initial access to the intranet.

24:12.080 --> 24:17.780
So, then, we will reveal a nightmare of default configuration of VXLAN.

24:18.920 --> 24:20.860
So, what is a VXLAN?

24:21.860 --> 24:27.080
VXLAN is a stateless and unencrypted layer 2 internal.

24:27.980 --> 24:33.980
It packs layer 2 Ethernet frame into a layer 4 UDP packet.

24:34.680 --> 24:41.060
Each subnet is uniquely identified by a name called VNI.

24:43.020 --> 24:54.880
We can configure VXLAN internal similar to the GRE by giving the remote IP, local IP, and destination port and VNI.

24:54.880 --> 24:58.380
However, this configuration is vulnerable.

25:00.520 --> 25:07.980
Based on the previous configuration, set up a standard VXLAN peer is easy as usual.

25:08.680 --> 25:11.300
How about hijacking a VXLAN internal?

25:13.740 --> 25:16.420
Yes, here's the only difference.

25:16.420 --> 25:21.220
The only thing you have to change is your local IP argument.

25:22.600 --> 25:24.980
So, why does this happen?

25:24.980 --> 25:32.140
Does the Linux kernel doesn't check the source IP for VXLAN packet?

25:32.140 --> 25:40.140
How does it accept VXLAN packet with a valid VNI import even if the source IP is not configured?

25:42.690 --> 25:48.990
After looking at the Linux memo, you will see that this is a feature but not a bug.

25:49.630 --> 25:54.910
But this feature is insecure and it turned on by default.

25:55.250 --> 25:59.930
Before reporting, router OS couldn't turn this feature down.

25:59.930 --> 26:04.270
Now, you can change the setting to off but it's still on by default.

26:06.730 --> 26:11.990
So, what happens when learning is enabled in VXLAN?

26:13.670 --> 26:29.910
Normally, when a configured peer sends a VXLAN packet, the kernel will add its MAC address to the FDB, also known as forwarding database table, shown at the bottom on the slide.

26:30.710 --> 26:48.250
The next time a packet needed to be sent to the destination MAC address that is listed in the FDB table, the kernel will pack and send the packet to the remote location using the information from the FDB table.

26:53.650 --> 27:03.710
Similarly, when learning mode is enabled, any VXLAN packet with a valid VNI import will be added to the FDB table.

27:04.930 --> 27:11.290
Also, the remote IP could be any IP on the internet.

27:13.230 --> 27:25.510
Thus, an attacker 9.9.9.9 can create a VXLAN packet with a MAC address which is broadcast address FFFFF.

27:25.510 --> 27:30.890
And the Linux kernel will add this MAC address to the list.

27:31.930 --> 27:46.180
Then, when the kernel wants to send a broadcast package on the VXLAN interface, it will look up the FDB table and then send it to the attacker server, which is 9.9.9.9.

27:50.550 --> 27:55.790
So, we know how VXLAN works.

27:56.070 --> 28:01.250
How do we get the information that we can hijack a VXLAN?

28:01.250 --> 28:13.530
We know our own IP, but we don't know the victim's IP, or VNI, or VXLAN inner subnet.

28:13.770 --> 28:18.450
However, all this information can be obtained by a simple scan.

28:19.690 --> 28:26.190
An attacker can discover the victim IP port and VNI by sending numerous packets.

28:27.190 --> 28:33.590
So, let's focus on how to determine the VXLAN inner subnet range.

28:34.610 --> 28:46.810
We can gather information by sending a single VXLAN packet where both the source and destination MAC address are set to the broadcast address LAN.

28:46.850 --> 28:54.570
When an ARP request is sent from the VXLAN interface, they will also send a copy to the attacker.

28:57.540 --> 29:03.900
Another method involves sending a neighbor-discovered protocol packet.

29:03.900 --> 29:16.960
When a router always receives a broadcast neighbor-discovered protocol, NDP, message, it will respond to the broadcasting MAC address with its own IP and MAC address.

29:19.830 --> 29:26.210
Thus, we can send numerous VXLAN packets with different VNI and port configurations.

29:26.210 --> 29:37.230
Each contains an inner NDP packet where both the source and destination MAC address are set to the broadcast address.

29:40.840 --> 29:52.240
When the VNI and port matches the victim configuration, the victim device will add the attacker's IP to its FDB table.

29:53.160 --> 30:00.000
Then, the victim unpacks the VXLAN package and sees that it is an NDP request.

30:00.000 --> 30:08.180
The victim router replies to the NDP packet and tries to send a response to the broadcast MAC address.

30:08.180 --> 30:17.640
It checks the FDB table and finds that the destination is 9.9.9.9, which is the attacker IP.

30:19.380 --> 30:24.880
So, the router will send the packet to the attacker.

30:27.300 --> 30:31.260
Then, the attacker has everything to hijack the terminal.

30:34.250 --> 30:36.050
We create a scanner.

30:36.050 --> 30:41.790
We can discover the victim IP port and VNI by sending numerous packets.

30:41.790 --> 30:49.530
VXLAN has default ports 4789 and 8472, and VNI is usually smaller than 100.

30:49.530 --> 30:51.370
Here's a scanner link.

30:54.510 --> 31:03.690
We have also created a lab for VXLAN scanner demonstration, which includes a router and a web server.

31:05.230 --> 31:12.790
So, for demo, we can see that the scanner aims to scan the target at .200.

31:12.790 --> 31:17.690
The scanner sends numerous packets with different default ports and different VNIs.

31:17.690 --> 31:24.930
Later, we can receive an NDP reply with VNI 42 and port 8472.

31:24.930 --> 31:28.590
The inerts are made in 10.0.0.1.

31:28.590 --> 31:36.410
Then, by simplifying, we can simply create a VXLAN with the information above.

31:36.410 --> 31:40.990
We can direct access the VXLAN intranet server.

31:44.200 --> 31:49.060
We also scan for insecure VXLAN configuration worldwide.

31:49.060 --> 31:54.940
Usually, using VNI equals one and default ports.

31:55.240 --> 32:00.480
We found that more than 900 VXLAN endpoints respond to the scanner.

32:00.500 --> 32:05.980
Additionally, there are 4,000 IPs inside the VXLAN subnet.

32:05.980 --> 32:11.860
Some of these are public IPs, which means we can hijack public IPs.

32:12.700 --> 32:17.680
Additionally, some endpoints reply to numerous broadcast packets.

32:17.680 --> 32:23.800
Combined with the IP spoofing, this can lead to DDoS attack.

32:24.480 --> 32:32.200
Lastly, we see some VXLAN packets have source IPs that are private addresses.

32:32.820 --> 32:34.500
This raises a question.

32:34.500 --> 32:39.180
Why are the private addresses being used as a source IP on the VXLAN packet?

32:40.940 --> 32:46.460
So, if I use VXLAN in an encrypted terminal, am I safe?

32:48.320 --> 32:50.240
The answer is no.

32:51.120 --> 32:55.480
VXLAN still accepts packet traffic in different interfaces.

32:56.500 --> 33:06.340
So, if you have a public IP interface and also you create a VXLAN interface, it can be scanned and hijacked.

33:09.910 --> 33:18.230
For TLDR, we can hijack a VXLAN terminal using only 3 pieces of concept.

33:18.330 --> 33:23.230
The victim IP address, the VXLAN port, and the VNI.

33:24.070 --> 33:29.570
There is no need to know the peer IP and internal IP address.

33:29.570 --> 33:38.070
Furthermore, if your network is set up including a public IP address and VXLAN on any interface, it is highly vulnerable.

33:39.230 --> 33:45.150
So, what can hackers do after hijacking a VXLAN terminal?

33:46.910 --> 34:00.430
Not only can attackers gain initial access to the company intranet, but also they can hijack IP communication or perform a man-in-the-middle attack between the two sites.

34:00.430 --> 34:09.770
Additionally, attackers can target their two network services such as exporting RADVD to RCE vulnerabilities.

34:11.350 --> 34:16.170
Incident response is challenging because the source IP cannot be trusted.

34:16.170 --> 34:25.610
Moreover, these terminals often run routing protocols like BGP or OSPF.

34:25.610 --> 34:36.990
Attackers can hijack IPs that are even not transmissioning through that terminal, such as those of a domain controller or an EXXI server.

34:38.770 --> 34:41.730
So, what is a routing protocol?

34:42.330 --> 34:50.810
It is a protocol like a router can exchange routes and network information with other routers.

34:50.810 --> 35:02.630
Routing protocols help routers to directly learn about the networks around them and to determine the best path for forwarding the packet.

35:02.830 --> 35:16.000
For example, Router A has a subnet 192.168.1.0.24 and Router C could learn the routes from Router B by routing protocols.

35:17.360 --> 35:24.840
We often see companies use VXLAN terminals to connect to sites with routing protocols.

35:26.240 --> 35:35.360
But when we combine this with a learning feature, we can hijack router's AIP.

35:36.580 --> 35:45.980
Then, we can announce, we can connect to the routing protocols and announce domain controller's IP in the routing protocols.

35:46.000 --> 35:48.280
With slash 72.

35:50.500 --> 36:06.340
Other routers will receive and trust the routing prefix and redirect their domain controller's traffic to the attacker because the route is more specific, more smaller than the subnet.

36:09.040 --> 36:15.580
We have summarized the potential impact of hijacking different service IP.

36:16.840 --> 36:33.440
If an attacker hijacks the IP of domain controller and NTLN is possible, meaning SMB signing is disabled or ADCS ESC 8 is present, they can take over the entire domain.

36:33.440 --> 36:50.520
If an attacker hijacks the IP of vSphere, Proxmox or any HTTPS service and the original SSL certificate is unsigned or not valid, user may not be noticed.

36:50.700 --> 36:55.800
And the attacker can then take over the account or the full server.

36:55.800 --> 37:07.160
In short, hijacking this service IP can lead to account takeover, denial of service, DNS hijack or even full domain compromise or server compromise.

37:09.140 --> 37:11.380
And here's a bonus.

37:11.600 --> 37:17.260
A bad configuration in the company's OSPF lead to IP hijacking.

37:17.260 --> 37:25.240
This attack factor has been published for years and we actually observed it during our rating scenario.

37:25.800 --> 37:29.040
Yet, very few people discuss it.

37:30.520 --> 37:35.900
Do you check and use a TCP dump after you get into an intranet?

37:36.520 --> 37:42.000
If you see this on the victim intranet, it might be vulnerable.

37:44.590 --> 38:01.530
Just like the exploitation method described in the previous slide, if you see a hello package, there is a highly possible that you can direct establish an OSPF connection with the router and hijack the routes.

38:02.190 --> 38:12.990
So, in short, we can, if we connect to the OSPF, we can hijack the domain controller again and get previous escalation.

38:15.390 --> 38:18.790
Next, there are some key takeaways.

38:20.010 --> 38:23.230
Here's the key takeaways for Blue Team.

38:23.310 --> 38:27.890
First, check all unencrypted tunnels in your company's network.

38:27.890 --> 38:30.570
If you find any, don't use them.

38:30.970 --> 38:35.870
This includes protocols like GRE, IPIP, SIT, GRE-TAP and DXLAN.

38:35.870 --> 38:39.550
These tunnels are not secure and can be abused by attackers.

38:40.110 --> 38:43.730
Next, make sure you have secure firewall in place.

38:43.850 --> 38:55.950
Your firewall should filter outbound intranet traffic, especially SYN-ASDK packet with a response from server.

38:56.370 --> 39:01.910
Also, check for IP spoofing in your intranet.

39:01.910 --> 39:11.970
Ideally, OSPF should fill out spoofed IP address, but in reality, this is rarely possible.

39:11.970 --> 39:17.710
Check if OSPF is not enabled on ports between routers.

39:17.710 --> 39:21.190
It's only enabled on ports between routers.

39:21.190 --> 39:25.180
OSPF should not open on unnecessary port.

39:26.370 --> 39:31.390
Monitor your routing prefix for any anomalies.

39:31.750 --> 39:37.180
Unaccept change in router protocol can indicate an ongoing attack.

39:37.180 --> 39:46.000
Finally, set minimum accept prefix size in your routing protocol, for example, slash 24.

39:46.420 --> 40:01.100
In summary, avoid unencrypted tunnels, secure your firewall, filter for IP spoofing, restrict OSPF, monitor routing and enforce minimum prefix size.

40:02.220 --> 40:04.290
And here's the takeaway for writing.

40:05.550 --> 40:12.650
First, scan or use OSINT techniques to find victims on encrypted tunnels.

40:12.710 --> 40:16.390
These can be entry point into the network.

40:16.930 --> 40:22.290
Once you are inside the intranet, check the victim's network setup for spoofing.

40:23.190 --> 40:28.350
Use source IP spoofing techniques during high-risk scanning to avoid detection.

40:28.350 --> 40:36.730
Look for OSPF upload message to identify active routing protocols and potential attack path.

40:37.350 --> 40:40.550
Scan for misconfiguration via extended tunnel.

40:40.550 --> 40:47.390
If you find a vulnerable tunnel, hijack it to get initial access.

40:48.030 --> 40:54.230
Abuse routing protocols and hijack IP for lateral movement and privilege escalation.

40:54.230 --> 40:58.490
Automating can continue looking for more vulnerable protocols in future.

40:58.490 --> 41:01.110
Remember, scan, find, hack.

41:05.200 --> 41:08.940
And here are some takeaway for tool makers.

41:09.680 --> 41:16.120
First, implement intranet IP spoofing command control tools.

41:16.920 --> 41:24.200
Develop automated tools to test possible of IP spoofing within a target intranet.

41:24.200 --> 41:26.140
Create automation save times.

41:26.500 --> 41:38.400
Create automated correction mechanism for mismatch between IP destination and source address within the same TCP session.

41:38.620 --> 41:41.340
Some routers still perform SNAT.

41:41.340 --> 41:44.500
Even the packet is a server response.

41:47.300 --> 41:57.260
Automate the process of sending H.323 package or new TCP packet to trigger a routing mechanism.

41:57.380 --> 42:02.680
Especially for ISP that filter private IP as a source IP address.

42:03.720 --> 42:07.840
Develop tools for automation OSPF IP hijacking attacks.

42:07.840 --> 42:14.600
And finally, implement a more efficient GIS scanner for global scanning.

42:14.600 --> 42:19.260
Similar to what MaxScan does for TCP.

42:19.920 --> 42:22.060
So, thank you everyone.

