MythicAgents / thanatos

Mythic C2 agent targeting Linux and Windows hosts written in Rust
BSD 3-Clause "New" or "Revised" License
310 stars 42 forks source link

Linux tests failing non-deterministically #28

Closed MEhrn00 closed 8 months ago

MEhrn00 commented 8 months ago

For some reason, the Linux user enumeration functions are behaving non-deterministically. The tests written have found inconsistencies with the returned users causing them to fail randomly.

https://github.com/MythicAgents/thanatos/blob/rewrite/Payload_Type/thanatos/agent/ffiwrappers/src/linux/user.rs

https://github.com/MythicAgents/thanatos/actions/runs/8033451960/job/21943961240#logs https://github.com/MythicAgents/thanatos/actions/runs/8033428411/job/21943908250#logs

It could be that I'm missing something in my code; however, it's weird that this is happening in CI.

TODO: Figure out why these are failing and what I'm doing wrong.

MEhrn00 commented 8 months ago

Possibly solved. Global variables were a mistake