Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thoughts on adding IPV6 checking #215

Open
A1vinSmith opened this issue Oct 29, 2023 · 3 comments
Open

Thoughts on adding IPV6 checking #215

A1vinSmith opened this issue Oct 29, 2023 · 3 comments

Comments

@A1vinSmith
Copy link

https://github.com/Tib3rius/AutoRecon/blob/1160474b2331879ee9de6c101026abb4d63cadd4/autorecon/main.py#L402C3-L402C3

from impacket.dcerpc.v5 import transport
from impacket.dcerpc.v5.rpcrt import RPC_C_AUTHN_LEVEL_NONE
from impacket.dcerpc.v5.dcomrt import IObjectExporter

    target = f"ncacn_ip_tcp:{target.ip}"
    rpcTransport = transport.DCERPCTransportFactory(target)

    portmap = rpcTransport.get_dce_rpc()
    portmap.set_auth_level(RPC_C_AUTHN_LEVEL_NONE)
    portmap.connect()

    obj = IObjectExporter(portmap)

    bindings = obj.ServerAlive2()

    for binding in bindings:
        addr = binding['aNetworkAddr']
        # print(f"Address: {addr}")

# The addr array is here for ipv6.address now

The usage is not high. But it could be nice to check and scan IPV6 automatically.

@Tib3rius
Copy link
Owner

AutoRecon actually already has IPv6 checking, but it defaults to IPv4: https://github.com/Tib3rius/AutoRecon/blob/main/autorecon/main.py#L1397

Unless you are doing something different? I could potentially put in a switch to prefer IPv6 over IPv4 in these cases?

@A1vinSmith
Copy link
Author

Yeah, a switch sounds nice. I would imagine that if the IPV6 is enabled, it'll be something interesting to look into.
Especially in CTF, people don't open it for no reason.

@A1vinSmith
Copy link
Author

My snippet is trying to detect it automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants