mirror of
https://github.com/ReversecLabs/encap-attack.git
synced 2026-05-15 15:31:28 +01:00
Compare commits
2 Commits
v1.0.0
..
1d2137c0f9
| Author | SHA1 | Date | |
|---|---|---|---|
| 1d2137c0f9 | |||
| e1b12cc8cd |
+1
-1
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "encap-attack"
|
||||
version = "1.0.0"
|
||||
version = "1.0.1"
|
||||
license = {file = "LICENSE"}
|
||||
description = "Network sniffing and attacks using IP-in-IP and VXLAN"
|
||||
requires-python = ">= 3.7"
|
||||
|
||||
@@ -140,7 +140,7 @@ def ipip_http(ctx, dst_port: int, http_request: str) -> None:
|
||||
ctx.obj["model"].sendHTTP(http_request, ctx.obj["dst_ip"], dst_port=dst_port, src_port=ctx.obj["src_port"])
|
||||
|
||||
@ipip_request.command("dns")
|
||||
@click.option("-t", "--query-type", type=click.Choice(["SRV", "A", "AAAA", "CNAME"]), help="DNS record query type", required=True)
|
||||
@click.option("-t", "--query-type", type=click.Choice(["SRV", "A", "AAAA", "CNAME", "PTR"]), help="DNS record query type", required=True)
|
||||
@click.option("-pd", "--dst-port", type=int, help="Destination port [DEFAULT: 53]", default=53)
|
||||
@click.argument("query_name")
|
||||
@click.pass_context
|
||||
@@ -211,7 +211,7 @@ def vxlan_http(ctx, dst_port: int, http_request: str) -> None:
|
||||
ctx.obj["model"].sendHTTP(http_request, ctx.obj["dst_ip"], dst_port=dst_port, src_port=ctx.obj["src_port"])
|
||||
|
||||
@vxlan_request.command("dns")
|
||||
@click.option("-t", "--query-type", type=click.Choice(["SRV", "A", "AAAA", "CNAME"]), help="DNS record query type", required=True)
|
||||
@click.option("-t", "--query-type", type=click.Choice(["SRV", "A", "AAAA", "CNAME", "PTR"]), help="DNS record query type", required=True)
|
||||
@click.option("-pd", "--dst-port", type=int, help="Destination port [DEFAULT: 53]", default=53)
|
||||
@click.argument("query_name")
|
||||
@click.pass_context
|
||||
|
||||
@@ -185,6 +185,9 @@ class EncapsulationModel(ABC):
|
||||
def __submitDNS(self, dst_ip: str, qname: str, qtype: str, dst_port: int, src_port: int) -> dict[str, Union[str, int]]:
|
||||
"""Send an encapsulated DNS request and return the response."""
|
||||
|
||||
if qtype == "PTR":
|
||||
qname = ".".join(qname.split(".")[::-1]) + ".in-addr.arpa"
|
||||
|
||||
packet = self._getPacketHeader() / IP(src = self._iface_ip, dst=dst_ip) / UDP(sport=src_port, dport=dst_port) / DNS(rd=1, qd=DNSQR(qname=qname,qtype=qtype))
|
||||
|
||||
sniff = self._getAsyncSniffer(filter=f"udp and port {src_port}", count=1)
|
||||
|
||||
Reference in New Issue
Block a user