diff --git a/src/linux-hardening/linux-post-exploitation/README.md b/src/linux-hardening/linux-post-exploitation/README.md index a31efd26f6f..4d6f6e435e7 100644 --- a/src/linux-hardening/linux-post-exploitation/README.md +++ b/src/linux-hardening/linux-post-exploitation/README.md @@ -144,6 +144,19 @@ Hardening - Enforce **single-instance** execution by binding a fixed loopback port (for example, `127.0.0.1:51125` or `127.0.0.1:52225`) and exiting if `bind()` fails; `ss -lntp | grep -E '51125|52225'` will reveal the mutex listener. - Operators may periodically mass-kill any process whose `cmdline` contains the dropper name (e.g., `init_stop`), so reusing those names during analysis can collide; pick unique filenames. +## WSL -> Windows Startup folder persistence + +If you already have execution **inside Linux on WSL**, you can persist into Windows by **writing a payload into the Windows user's Startup folder**. Windows executes Startup entries on the next interactive logon, so the persistence **bridges from WSL to Windows** even though the foothold is Linux. + +Common path from WSL (user-specific): + +```bash +WIN_STARTUP="/mnt/c/Users//AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Startup" +cp /tmp/payload.exe "$WIN_STARTUP/" +``` + +This only works when the WSL instance has access to the Windows user profile path and the user later logs in on Windows. + ## Process masquerading via prctl + argv overwrite - Set the short process name with `prctl(PR_SET_NAME, "