mirror of
https://github.com/bettercap/bettercap
synced 2025-08-22 06:23:18 -07:00
wip: Note to self: do squash.
This commit is contained in:
parent
da613f9a16
commit
fd193d3f58
1 changed files with 8 additions and 5 deletions
|
@ -190,12 +190,15 @@ func (mod *RdpProxy) Configure() (err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (mod *RdpProxy) handleRdpConnection(payload *nfqueue.Payload) int {
|
func (mod *RdpProxy) handleRdpConnection(payload *nfqueue.Payload) int {
|
||||||
log.Info("New Connection: %v", payload)
|
|
||||||
|
|
||||||
// 1. Check if the destination IP already has a PYRDP session active, if so, do nothing.
|
// 1. Determine source and target addresses.
|
||||||
// 2. Otherwise:
|
p := gopacket.NewPacket(payload, layers.LayerTypeEthernet, gopacket.NoCopy)
|
||||||
// 2.1. Spawn a PYRDP instance on a fresh port
|
|
||||||
// 2.2. Add a NAT rule in the firewall for this particular target IP
|
log.Info("New Connection: %v", payload)
|
||||||
|
// 2. Check if the destination IP already has a PYRDP session active, if so, do nothing.
|
||||||
|
// 3. Otherwise:
|
||||||
|
// 3.1. Spawn a PYRDP instance on a fresh port
|
||||||
|
// 3.2. Add a NAT rule in the firewall for this particular target IP
|
||||||
// Force a retransmit to trigger the new firewall rules.
|
// Force a retransmit to trigger the new firewall rules.
|
||||||
// TODO: Find a more efficient way to do this.
|
// TODO: Find a more efficient way to do this.
|
||||||
payload.SetVerdict(nfqueue.NF_DROP)
|
payload.SetVerdict(nfqueue.NF_DROP)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue