RustHound icon indicating copy to clipboard operation
RustHound copied to clipboard

Autodetect current domain just as SharpHound does

Open muelli opened this issue 2 years ago • 2 comments

With SharpHound, I just need to run the executable and it determines the domain of the current user automatically. If RustHound did the same, I would need to think less and probably make fewer mistakes. I haven't found a discussion about auto-detecting the domain, so I thought it is appropriate to ask for it here.

muelli avatar Jan 09 '24 09:01 muelli

I'm seeing auto_args guarded by a feature flag: https://github.com/NH-RED-TEAM/RustHound/blob/a1794e2e02d5b39b7cbf3da562d2054d53917a56/src/args.rs#L217

So this is compile time only? Sounds like one could implement --auto to achieve this behaviour at run time.

muelli avatar Jan 09 '24 09:01 muelli

Hi @muelli,

Indeed RustHound can determines the domain of the current user automatically. You need to compile it with the following command:

make windows_noargs

Or directly with cargo and the feature: --features noargs like:

RUSTFLAGS="-C target-feature=+crt-static" cargo build --release --target x86_64-pc-windows-gnu --features noargs

I'll look into potentially adding the --auto option at runtime rather than having to go through a compile-time option.

g0h4n avatar Jan 09 '24 11:01 g0h4n