ASBTutorials/Tutorial 1/README.md

72 lines
1.6 KiB
Markdown
Raw Normal View History

2023-10-12 09:45:51 +00:00
# Tutorial 1
## Physical Setup
![](./network_connection.png)
2023-10-12 09:45:51 +00:00
2023-10-12 10:54:09 +00:00
## Router Configuration
- `XX`: Workplace number
2023-10-12 10:00:25 +00:00
2023-10-12 09:45:51 +00:00
```sh
# Enter configuration
enable
configure terminal
# Assign ip addresses
interface gi0/0
2023-10-12 10:00:25 +00:00
ip address 10.3.44.1XX 255.255.255.0
2023-10-12 10:54:09 +00:00
ip nat outside
no shutdown
2023-10-12 09:45:51 +00:00
interface gi0/1
2023-10-19 07:56:23 +00:00
ip address 192.168.1.1 255.255.255.0
ip nat inside
2023-10-12 10:54:09 +00:00
no shutdown
2023-10-12 09:45:51 +00:00
# Enable network address translation
# ip nat pool <name> <start-ip> <end-ip> { netmask <netmask> | prefix-length <prefix-length> } [ type { rotary } ]
2023-10-12 10:00:25 +00:00
ip nat pool okayletsgo 10.3.44.1XX 10.3.44.1XX netmask 255.255.255.0
2023-10-12 09:45:51 +00:00
# access-list acln {deny|permit} {host|source source-wildcard|any}
2023-10-12 10:54:09 +00:00
access-list 24 permit 192.168.1.0 0.0.0.255
2023-10-12 09:45:51 +00:00
# ip nat inside source { list <acln> pool <name> [overload] | static <local-ip><global-ip> }
ip nat inside source list 24 pool okayletsgo overload
2023-10-19 07:56:23 +00:00
# Configure DHCP
ip dhcp excluded-address 192.168.1.1 192.168.1.1
ip dhcp pool AddSomeProtein
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
dns-server 208.67.222.222
exit
# Enable DHCP for inner network
service dhcp gi0/1
exit
configure terminal
# Set default gateway
ip route 0.0.0.0 0.0.0.0 10.3.44.1
exit
2023-10-19 07:58:32 +00:00
disable
2023-10-12 09:45:51 +00:00
```
2023-10-12 10:54:09 +00:00
## Client Configuration
- `X`: Workplace number
```sh
sudo -i
ifconfig eth0 192.168.1.1X netmask 255.255.255.0
# watch the result using the command below
ip addr show
```
## ARP Spoofing
2023-10-12 10:54:09 +00:00
```sh
# sudo arpspoof -i [interface] -t <victim> <victim's-target>
# Spy traffic from victim to router
sudo arpspoof -i eth0 -t 192.168.1.11 192.168.1.1
# Spy traffic from router to victim
sudo arpspoof -i eth0 -t 192.168.1.1 192.168.1.11
2023-10-12 10:54:09 +00:00
```