mosers
/
eaas-vde-proxy
Archiviert
1
0
Fork 0

Documentation updated

main
Simon Moser vor 3 Jahren
Ursprung 3108669ecd
Commit 98a5178e12
Signiert von: mosers
GPG-Schlüssel-ID: 96B3365A234B500C

@ -6,34 +6,28 @@
## Problematic protocols ## Problematic protocols
Important: Important and implemented:
* DHCP * DHCP
* ARP (implemented) * ARP
Nice to have: Nice to have:
* NetBEUI / NetBIOS * NetBEUI / NetBIOS
Keep in mind: Not supported:
* IPv6 (NDP, Interface Identifier, ...) * IPv6 (NDP, Interface Identifier, ...)
* IPSec * IPSec
* 802.1X * 802.1X
## Library support ## Third party libraries
### Go: * [gopacket](https://github.com/google/gopacket): similar to libpcap, for parsing and serializing packets *(BSD 3-clause license, authors: Andreas Krennmair & Google)*
* [dhcp4](https://github.com/krolaw/dhcp4): for handling and sending DHCP requests/responses *(BSD 3-clause license, author: Richard Warburton/krolaw)*
* gopacket (~libpcap): https://github.com/google/gopacket / https://pkg.go.dev/github.com/google/gopacket * [logrus](https://github.com/sirupsen/logrus): improved logging *(MIT license, author: Simon Eskildsen/sirupsen)*
## Binaries ## Binaries
### envctl - control VMs, network etc
```
$ ./envctl
Usage: envctl {start|stop|restart} {all|network|vms|alpine|alpine1|alpine2|kali|proxy2|proxy3|proxies}
```
### proxy - main binary ### proxy - main binary
``` ```
$ ./proxy -help $ ./proxy -help
@ -43,7 +37,7 @@ Usage of ./proxy:
-logfile string -logfile string
Location to write output to Location to write output to
-newip string -newip string
IP after change (default "10.0.0.15") IP after change
-newmac string -newmac string
MAC after change MAC after change
-oldip string -oldip string
@ -54,6 +48,14 @@ Usage of ./proxy:
Whether to pass every traffic through Whether to pass every traffic through
-pidfile string -pidfile string
Location to write the pid to Location to write the pid to
-proxy string -smain string
Number of the proxy switch (default "1") Main switch sock path, - for stdin/out (default "/run/vde/sw_main.sock")
-sproxy string
Proxy switch sock path (default "/run/vde/sw_proxy1.sock")
```
### envctl - control VMs, network etc
```
$ ./envctl
Usage: envctl {start|stop|restart} {all|network|vms|alpine|alpine1|alpine2|kali|proxy2|proxy3|proxies}
``` ```

@ -41,7 +41,7 @@ func main() {
// Get command line arguments // Get command line arguments
logLvl := flag.Int("log", 4, "allowed: 5 (debug), 4 (info), 3 (warning), 2 (error), 1 (fatal)") logLvl := flag.Int("log", 4, "allowed: 5 (debug), 4 (info), 3 (warning), 2 (error), 1 (fatal)")
oldIP := flag.String("oldip", "", "IP before change") oldIP := flag.String("oldip", "", "IP before change")
newIP := flag.String("newip", "10.0.0.15", "IP after change") newIP := flag.String("newip", "", "IP after change")
oldMAC := flag.String("oldmac", "", "MAC before change") oldMAC := flag.String("oldmac", "", "MAC before change")
newMAC := flag.String("newmac", "", "MAC after change") newMAC := flag.String("newmac", "", "MAC after change")
passthrough := flag.Bool("passthrough", false, "Whether to pass every traffic through") passthrough := flag.Bool("passthrough", false, "Whether to pass every traffic through")
@ -78,7 +78,9 @@ func main() {
c2, VmReader, VmWriter = cmd.Start(*sockProxy) c2, VmReader, VmWriter = cmd.Start(*sockProxy)
go pipeForward(cmd.In) go pipeForward(cmd.In)
go pipeForward(cmd.Out) go pipeForward(cmd.Out)
if NewIP == nil {
sendDHCPRequest(dhcp4.Discover, net.IPv4zero) sendDHCPRequest(dhcp4.Discover, net.IPv4zero)
}
if *sockMain != "-" { if *sockMain != "-" {
c1.WaitH() c1.WaitH()
} }