You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A network namespace is a logical copy of the network stack from the host system. Each namespace has its own IP addresses, network interfaces, routing tables, and so forth.
4
+
You can ask AFLNet to run your target server inside a such namespace to isolate it from the rest of the system and operate completly independently.
5
+
6
+
7
+
## Step-0. Network namespace setup
8
+
9
+
There is a good [article](ifeanyi.co/posts/linux-namespaces-part-4/) by [Ifeanyi Ubah](https://github.com/iffyio) explaining how to work with linux namespaces.
10
+
Here's the short version:
11
+
12
+
```
13
+
┌────────────────────────────────────────────┐
14
+
│ │
15
+
│ ┌──────────────────────┐ │
16
+
│ │ │ │
17
+
│ │ ┌─────┤ ┌─────┤
18
+
│ │ │ │ │ │
19
+
│ │ │veth1│◄───────────►│veth0│
20
+
│ │ │ │ │ │
21
+
│ │ └─────┤ └─────┤
22
+
│ │ nspce │ │
23
+
│ └──────────────────────┘ │
24
+
│ │
25
+
│ Host namespace│
26
+
└────────────────────────────────────────────┘
27
+
```
28
+
29
+
```bash
30
+
# create network namespace
31
+
sudo ip netns add nspce
32
+
# Create a veth pair
33
+
sudo ip link add veth0 type veth peer name veth1
34
+
# Move veth1 to the new namespace
35
+
sudo ip link set veth1 netns nspce
36
+
# Bring loopback interface up
37
+
sudo ip netns exec nscpe ip link set dev lo up
38
+
# Assign ip to interface in the new namespace
39
+
sudo ip netns exec nscpe ip addr add 10.0.0.2/24 dev veth1
40
+
sudo ip netns exec nscpe ip link set dev veth1 up
41
+
# Assign ip to interface in the host namespace
42
+
sudo ip addr add 10.0.0.1/24 dev veth0
43
+
sudo ip link set dev veth0 up
44
+
```
45
+
Now we should be able to do an inter-namespace communication between two processes running in both namespaces.
46
+
47
+
## Step-1. Fuzzing
48
+
49
+
That's all preparations required. Fuzz servers as usual.
50
+
51
+
You can use `-e <netns name>` option to specify network namespace to run the server in.
0 commit comments