|
3 | 3 | Any gopher server will work. There seems to only be [a few left](https://en.wikipedia.org/wiki/Gopher_(protocol)#Server_software)
|
4 | 4 | in 2017.
|
5 | 5 |
|
| 6 | + A few options for local installation and testing are below. |
| 7 | + |
| 8 | +### Docker Install |
| 9 | + |
| 10 | +A dockerized gopher server, written in Go of all things, is available. To install and run this, with content being |
| 11 | +served out of a temporary directory in which you'll be left: |
| 12 | + |
| 13 | +``` |
| 14 | +$ docker pull prodhe/gopher |
| 15 | +Using default tag: latest |
| 16 | +latest: Pulling from prodhe/gopher |
| 17 | +627beaf3eaaf: Already exists |
| 18 | +8800e3417eb1: Pull complete |
| 19 | +d9f3bcdad0eb: Pull complete |
| 20 | +c018073abd26: Pull complete |
| 21 | +b2855f535c50: Pull complete |
| 22 | +23480a2f73d8: Pull complete |
| 23 | +1555a5435ec5: Pull complete |
| 24 | +0728d289e0fc: Pull complete |
| 25 | +6f6f265b58ee: Pull complete |
| 26 | +Digest: sha256:69931d56946d192d9bd155a88b6f365cb276e9edf453129d374e64d244d1edaa |
| 27 | +Status: Downloaded newer image for prodhe/gopher:latest |
| 28 | +$ cd `mktemp -d`; |
| 29 | +$ sudo docker run --rm -d -it --name gopher_test -v `pwd -P`:/public -p 70:70 prodhe/gopher |
| 30 | +2017/10/20 16:45:01 Serving /public/ at localhost:70 |
| 31 | +$ date > test.txt |
| 32 | +$ echo HELLO > README.md |
| 33 | +``` |
| 34 | + |
6 | 35 | ### Ubuntu 16.04 Install
|
7 | 36 |
|
8 | 37 | First we need to install the server:
|
@@ -67,23 +96,34 @@ The following table contains the file types associated with the characters:
|
67 | 96 |
|
68 | 97 | **PATH**
|
69 | 98 |
|
70 |
| - It is possible to view content within a directory of the gophermap. If the intial run shows directory `Directory: foobar`, |
| 99 | + It is possible to view content within a directory of the gophermap. If the intial run shows directory `Directory: foobar`, |
71 | 100 | setting **path** to `/foobar` will enumerate the contents of that folder. Default: [empty string].
|
72 | 101 |
|
73 | 102 | ## Scenarios
|
74 | 103 |
|
| 104 | +### Docker Gopher Server |
| 105 | +``` |
| 106 | +msf auxiliary(gopher_gophermap) > run |
| 107 | +
|
| 108 | +[+] 127.0.0.1:70 - Text file: README.md |
| 109 | +[+] 127.0.0.1:70 - Path: localhost:70/README.md |
| 110 | +[+] 127.0.0.1:70 - Text file: test.txt |
| 111 | +[+] 127.0.0.1:70 - Path: localhost:70/test.txt |
| 112 | +[*] Scanned 1 of 1 hosts (100% complete) |
| 113 | +[*] Auxiliary module execution completed |
| 114 | +``` |
75 | 115 | ### Gopher-server on Ubuntu 16.04
|
76 | 116 |
|
77 | 117 | ```
|
78 |
| -msf > use auxiliary/scanner/gopher/gopher_gophermap |
| 118 | +msf > use auxiliary/scanner/gopher/gopher_gophermap |
79 | 119 | msf auxiliary(gopher_gophermap) > set rhosts 1.1.1.1
|
80 | 120 | rhosts => 1.1.1.1
|
81 | 121 | msf auxiliary(gopher_gophermap) > set verbose true
|
82 | 122 | verbose => true
|
83 | 123 | msf auxiliary(gopher_gophermap) > run
|
84 | 124 |
|
85 | 125 | [+] 1.1.1.1:70 - gopher custom gophermap
|
86 |
| -[+] 1.1.1.1:70 - |
| 126 | +[+] 1.1.1.1:70 - |
87 | 127 | [+] 1.1.1.1:70 - HTML: Hello World
|
88 | 128 | [+] 1.1.1.1:70 - Path: 1.1.1.1:70/example.html
|
89 | 129 | [+] 1.1.1.1:70 - Text file: Foo File
|
|
0 commit comments