Giter Site home page Giter Site logo

Comments (6)

MEhrn00 avatar MEhrn00 commented on July 18, 2024 2

The NetGetJoinInformation winapi function can be used to get the domain name along with determining if the computer is domain joined or workgroup joined. The implementation I have in tetanus only returns the domain name for the system and not its domain joined status.

This looks like a better API function than what I have right now so I may migrate to it later in the future. Luckily, it's included in the winapi crate https://docs.rs/winapi/latest/winapi/um/lmjoin/fn.NetGetJoinInformation.html.

I could try to knock this out if you would like?

from offensivenotion.

HuskyHacks avatar HuskyHacks commented on July 18, 2024 1

@MEhrn00 I haven't forgotten about this! I did some tests last night on my SLOTHCO domain controller and made some changes to the code, I'll pull this into your branch tonight so you can see

from offensivenotion.

HuskyHacks avatar HuskyHacks commented on July 18, 2024
  • Username
  • Hostname
  • Domain name
  • Is Domain Joined?

from offensivenotion.

HuskyHacks avatar HuskyHacks commented on July 18, 2024

Domain guardrail can be implemented similarly to Tetanus agent

https://github.com/MythicAgents/tetanus/blob/main/Payload_Type/tetanus/agent_code/src/utils/windows.rs#L98

@MEhrn00

from offensivenotion.

HuskyHacks avatar HuskyHacks commented on July 18, 2024

@MEhrn00 check out the changes in 746d1ee

Only two changes: the first is that the agent would not compile the Linux build due to the conditional compilation flags around the env checks. The second was to switch the assertion (key domain == domain) to a substring match. For some reason, even though they were completely identical, I could never get the domain name (slothco.lan) to match the env check and it always failed. The substring match now passes and the check works.

edit: and of course I added something in main.py to handle the new check!

from offensivenotion.

HuskyHacks avatar HuskyHacks commented on July 18, 2024

Impl in 9c4b547 by @MEhrn00! Ty fam 🤘

from offensivenotion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.