GithubHelp home page GithubHelp logo

w4sp-book / w4sp-lab Goto Github PK

View Code? Open in Web Editor NEW
70.0 14.0 42.0 1.1 MB

Lab environment for the Wireshark for Security Professionals book

Home Page: https://github.com/w4sp-book/w4sp-lab/wiki/Lab-Installation

ApacheConf 0.41% HTML 0.72% Python 4.09% JavaScript 92.91% CSS 1.87%

w4sp-lab's Introduction

!!! PLEASE REFER TO THE MOST RECENT UPDATED INSTALLATION INSTRUCTIONS HERE !!!!

This is the lab environment for the Wireshark for Security Professionals book. The lab is built on top of Docker and Kali Linux and provides a realistic network with numerous services useful for learning security fundamentals with Wireshark.

Both Kali and the w4sp-lab are moving targets and are subject to change. Always refer to the wiki for the most recent information regarding working with the lab.

w4sp-lab's People

Contributors

w4sp-book avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

w4sp-lab's Issues

graphviz lua script error - "module 'gv' not found:"

Hi,
When I try to run the lua script using graphviz I get the following error:

w4sp-lab@w4sp:~$ tshark -q -X lua_script:graphviz.lua
tshark: Lua: Error during loading:
[string "graphviz.lua"]:2: module 'gv' not found:
no field package.preload['gv']
no file '/gv.lua'
no file '/home/w4sp-lab/.config/wireshark/plugins/gv.lua'
no file '/usr/lib/x86_64-linux-gnu/wireshark/plugins/2.4.2/gv.lua'
no file '/usr/local/share/lua/5.2/gv.lua'
no file '/usr/local/share/lua/5.2/gv/init.lua'
no file '/usr/local/lib/lua/5.2/gv.lua'
no file '/usr/local/lib/lua/5.2/gv/init.lua'
no file '/usr/share/lua/5.2/gv.lua'
no file '/usr/share/lua/5.2/gv/init.lua'
no file './gv.lua'
no file '/usr/local/lib/lua/5.2/gv.so'
no file '/usr/lib/x86_64-linux-gnu/lua/5.2/gv.so'
no file '/usr/lib/lua/5.2/gv.so'
no file '/usr/local/lib/lua/5.2/loadall.so'
no file './gv.so'
Capturing on 'any'

Thank you,
Mike

Chapter 6: Unable to start sploit

I seem to be missing the sploitable image.

['docker', 'run', '-id', '--privileged', '--name', 'sploit', '--hostname', 'sploit', '--net=none', 'w4sp/labs:sploitable']
Unable to find image 'w4sp/labs:sploitable' locally

trouble with the mitm lab

Here is what I did

  • double-click 'vic1' to get terminal and wireshark
  • Select the top interface to start capturing
  • set the filter in wireshark to show only the ftp protocol
  • Note: I can see ftp traffic to two different FTP servers, one on the 192.100.x.x network and one on the 10.100.x.x network
  • I opened the terminal for the kali node from the kali desktop and not the network diagram.
  • In order to attempt to see the mitm attack work, I started the capture on the 'kali' wireshark and set the filter to 'ftp'. In the beginning, I didn’t expect to see any traffic on the ‘kali’ wireshark.
  • From the kali terminal, start Metasploit with 'sudo msfconsole'
  • at the 'msf>' prompt enter 'use auxilliary/spoof/arp/arp_poisoning'
  • I sent three pieces of information:
  • DHOSTS points to the ip of the host to target (vic1)
  • SHOSTS points to the ip address to spoof (the gateway ip is 192.100.200.1)
  • LOCALSIP points to the ip address of where we want to send the spoofed traffic.(kali)
  • enter 'set DHOSTS X.X.X.X' where the 'x.x.x.x' is replaced with the ip address for vic1
  • enter 'exploit'
  • I expected to see ftp traffic in the kali wireshark, but none appeared.
  • Unexpectedly, I did see the ftp traffic from vic1 change from seeing ftp traffic to both the 192.x.x.x and 10.x.x.x networks to only the local network, 192.x.x.x

I've been looking at this on and off for a week, making sure I have the right IP addresses in each slot (as far as I can tell) and I get the same results each time. Am I missing a step?

Here are the settings

Basic options:

Name Current Setting Required Description


AUTO_ADD false yes Auto add new host when discovered by the listener
BIDIRECTIONAL false yes Spoof also the source with the dest
DHOSTS 192.100.200.160 yes Target ip addresses
INTERFACE no The name of the interface
LISTENER true yes Use an additional thread that will listen for arp requests to reply as fast as possible
SHOSTS 192.100.200.1 yes Spoofed ip addresses
SMAC no The spoofed mac

Problem starting Wireshark

I have the lab all set up - and as Chapter 4 page 134 states and expects when starting Wireshark - I had the error:
'couldn't run /usr/bin dumpcap in child process permission denied`

The remedy listed on page 134 has a typo - it says:
sudo setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /user/bin/dumpcap

of course that throws an error - the folder is: /usr/bin/ not: /user/bin
So I ran the command as the folder should be with /usr/bin/dumpcap
Double checking - there is no user/bin created in the labs.. so the call should be to /usr/bin/.

But then when I went to start Wireshark I get the same error - tried running it before and after opening Wireshark is loaded so I can't do the labs.
Anybody run into this or have a suggestion. Looks like somebody put a lot of work into this - hate to see it wasted effort... on their part and mine - already read the whole book . Loved it - but frustrated and disappointed I can't get to run the promising labs and run Wireshark at the same time.... kind of funny since it is a book about Wireshark

Chapter 5: MitM arp.p

First Off, Love the book and lab!

So throwing the ARP aux.poisoning result in the error of Msf::OptionVaildateError etc etc RHOSTS
I know the RHOSTS should be set. It's not explained in the book.
Also the IP address discovery of ping vic1.lab doesn't resolve for me.
additional thought: I know the IP add can be discovered by the GUI with a mouse however vic1 isn't discovered through enumeration. How would i gather the exist of vic1.lab without the GUI? i wouldn't know to ping vic1.lab either.
I'm sure the solution to my problem is a google search away with the whole RHOSTS thing.
I'm assume the target address range = RHOSTS (should be obvious 10.0.0.0/24, but i self-doubt) ;(

Poor Amazon feedback

To those who cannot install the lab, can I suggest you consider leaving negative feedback on Amazon. I cannot make use of this book while the lab does not work and the writers/publishers do not seem to be in any hurry to fix this. Maybe multiple negative reviews on Amazon is the encouragement they need.

installing w4sp-lab new error

Il pacchetto "docker-engine" non ha candidati da installare
Failed to start docker.service: Unit docker.service not found.
Traceback (most recent call last):
File "w4sp_webapp.py", line 480, in
images = subprocess.check_output(['docker', 'images']).split('\n')
File "/usr/lib/python2.7/subprocess.py", line 216, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 394, in init
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
w4sp-lab@kali:~/Downloads/w4sp-lab-master$

W4SP Lab Install Problem - Hopefully not ID10T

Howdy!

I've been following the instructions on the wiki page as of 8/12/2017 (versus whats written in the book) and am receiving the following error when I run the command "sudo python w4sp_webapp.py" as w4sp-lab user. Any ideas what the problem might be?

kali_w4sp-2017-08-12-22-17-35

Network is Unreachable

After starting the webapp.py the network switches to bridged network access with the docker0. I think this is also blocking the network? Anytime I ping a machine I get the Network is Unreachable reply in the command line.

Chapter 6 - Offensive Wireshark - login to Metasploitable VM

Hi,
I'm currently working through Chapter 6 and reached page 182. It mentions logging into Metasploitable VM with msfadmin/msfadmin credentials however I'm not sure how to connect to this VM. I've tried telnet and SSH but connections refused. Apologies if it is obvious !!

BTW great book and lab. Really enjoying working through the exercises.

Thanks & Best Regards,
Mike

w4sp-lab setup error

w4sp

I bought a book and followed 'w4sp-lab'. However, clicking the installer will result in an error. I live in Korea and I can not speak English. Please explain easily.
The first works fine, but the second time you run, an error occurs.

Lab Install Help Requested (sorry I'm n00b at this!)

Thanks so much for this lab and the book! ;-)
On the lab install, I am getting this error. (see below)
I'm reading the book and I really want this lab to work!

P.S. I read through the other errors, but didn't see this one. Apologies if I missed it.

Begin Error Text***************************************************

[*] Not enough w4sp/labs images found, building now
/home/w4sp-lab/Downloads/w4sp-lab-master/images
['docker', 'build', '-t', 'w4sp/labs:base', 'base']
['docker', 'build', '-t', 'w4sp/labs:temp', 'temp']
['docker', 'build', '-t', 'w4sp/labs:vrrpd', 'vrrpd']
['docker', 'build', '-t', 'w4sp/labs:samba', 'samba']
['docker', 'build', '-t', 'w4sp/labs:victims', 'victims']
['docker', 'build', '-t', 'w4sp/labs:switch', 'switch']
The command '/bin/sh -c apt-get install -y suricata logstash openjdk-7-jre-headless' returned a non-zero code: 100
Traceback (most recent call last):
File "w4sp_webapp.py", line 499, in
w4sp.docker_build('images/')
File "/home/w4sp-lab/Downloads/w4sp-lab-master/w4sp_app/utils.py", line 102, in docker_build
r('docker build -t $image_name $image')
File "/home/w4sp-lab/Downloads/w4sp-lab-master/w4sp_app/utils.py", line 83, in r
return subprocess.check_output(cmd)
File "/usr/lib/python2.7/subprocess.py", line 223, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['docker', 'build', '-t', 'w4sp/labs:switch', 'switch']' returned non-zero exit status 100

Iceweasel/firefox not logging to key log file

Hi,
I've done the following
root@w4sp:~/Desktop# export SSLKEYLOGFILE='/root/Desktop/session.log' (tried /root first)
In same shell
root@w4sp:~/Desktop# open firefox https://wikipedia.org
No file created.
Tried creating a file first
root@w4sp:~/Desktop# nano session.log
root@w4sp:~/Desktop# chmod -R 777 session.log

Nothing written to file.
Are there any other changes needed in Firefox ?
Thank you.
Mike

w4sp_webapp execute Error!

w4sp-lab@kali:~/Downloads/w4sp-lab-master$ sudo python w4sp_webapp.py
['which', 'dumpcap']
Traceback (most recent call last):
File "w4sp_webapp.py", line 441, in
w4sp.check_dumpcap()
File "/home/w4sp-lab/Downloads/w4sp-lab-master/w4sp_app/utils.py", line 13, in check_dumpcap
dumpcap = r('which dumpcap').strip()
File "/home/w4sp-lab/Downloads/w4sp-lab-master/w4sp_app/utils.py", line 83, in r
return subprocess.check_output(cmd)
File "/usr/lib/python2.7/subprocess.py", line 223, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['which', 'dumpcap']' returned non-zero exit status 1

I don't execute w4sp_webap.py
what should I do?

It's all a bit shit, really!

Bought the book and trying to install the lab. Errors galore.
I'm clearly not the only person with problems - frustrated at wasting time trying to get a lab to work on an ISO when I'd prefer to spend my time studying, rather than troubleshooting/fixing.
Not having a pop at the helpful people who try to offer good advice in forums for the benefit of their peers. I do, however, feel let down by the book's writers and publishers. If this is all so problematic, why don't you just develop your own static ISO with all included, that actually works? Or provide the pcaps for download?

issue running Java RMI exploit

I'm not able to run the java_rmi_server exploit successfully, each time, I get a message "Meterpreter session X closed. Reason: Died"

Looking at the wireshark traces on port 4444 and using (follow>tcp stream), I see what appears to be the staging jar files being sent, and then the connection starts to show a few [psh,ack] and then [rst,ack]. Does this show the meterpreter dying?

Regardless, is there something I can do to get this exploit to work?

===============================
Wireshark Captures
java_rmi_server.zip
java_rmi_server.port4444.zip

===============================
Metasploit console

msf > use exploit/multi/misc/java_rmi_server
msf exploit(java_rmi_server) > set RHOST 10.100.200.138
RHOST => 10.100.200.138
msf exploit(java_rmi_server) > set PAYLOAD java/meterpreter/bind_tcp
PAYLOAD => java/meterpreter/bind_tcp
msf exploit(java_rmi_server) > exploit

[] Started bind handler
[
] 10.100.200.138:1099 - Using URL: http://0.0.0.0:8080/F2PdPb
[] 10.100.200.138:1099 - Local IP: http://192.100.200.166:8080/F2PdPb
[
] 10.100.200.138:1099 - Server started.
[] 10.100.200.138:1099 - Sending RMI Header...
[
] 10.100.200.138:1099 - Sending RMI Call...
[] 10.100.200.138:1099 - Replied to request for payload JAR
[
] Sending stage (49645 bytes) to 10.100.200.138
[] Meterpreter session 1 opened (192.100.200.166:43545 -> 10.100.200.138:4444) at 2017-05-01 20:54:21 -0500
[
] 10.100.200.138 - Meterpreter session 1 closed. Reason: Died
[-] 10.100.200.138:1099 - Exploit failed: RuntimeError Timeout HTTPDELAY expired and the HTTP >Server didn't get a payload request
[] 10.100.200.138:1099 - Server stopped.
[
] Exploit completed, but no session was created.
msf exploit(java_rmi_server) >
[-] Meterpreter session 1 is not valid and will be closed

w4sp-lab Installation problem

w4sp-lab-issue-2

I am using the below command and still getting error "returned a non-zero code" (see attached).

sudo python w4sp_webapp.py

Kindly help. I am stuck.Thank you!

Lab fails to setup [Errno 32] Broken pipe

Lab fails to setup. It gets most of the way before it encounters a (presumably) fatal error and stops.

Exception happened during processing of request from ('127.0.0.1', 52164) Traceback (most recent call last): File "/usr/lib/python2.7/SocketServer.py", line 596, in process_request_thread self.finish_request(request, client_address) File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request self.RequestHandlerClass(request, client_address, self) File "/usr/lib/python2.7/SocketServer.py", line 654, in __init__ self.finish() File "/usr/lib/python2.7/SocketServer.py", line 713, in finish self.wfile.close() File "/usr/lib/python2.7/socket.py", line 283, in close self.flush() File "/usr/lib/python2.7/socket.py", line 307, in flush self._sock.sendall(view[write_offset:write_offset+buffer_size]) error: [Errno 32] Broken pipe

Assuming with the "broken pipe" there's some issue with the connection being closed.

Installation Error

Hi,

I am trying to install on latest VM of Kali i.e. 2017.3. And receiving following error.

any advise ???


Fetched 31.3 MB in 1min 25s (365 kB/s)
E: Failed to fetch http://kali.mirror.garr.it/mirrors/kali/pool/main/a/aufs/aufs-dkms_4.13+20171002-1_amd64.deb Connection failed [IP: 90.147.164.69 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Failed to start docker.service: Unit docker.service not found.
Traceback (most recent call last):
File "w4sp_webapp.py", line 480, in
images = subprocess.check_output(['docker', 'images']).split('\n')
File "/usr/lib/python2.7/subprocess.py", line 212, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 390, in init
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1025, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

Exception happened during processing of request from ('127.0.0.1', 51090)

Can you help me to solve this?
The problem happened when I push the Setup button once the lab is launched in the browser :(

Exception happened during processing of request from ('127.0.0.1', 51090)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 290, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 318, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 654, in init
self.finish()
File "/usr/lib/python2.7/SocketServer.py", line 713, in finish
self.wfile.close()
File "/usr/lib/python2.7/socket.py", line 283, in close
self.flush()
File "/usr/lib/python2.7/socket.py", line 307, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe

Installing W4SP lab

Command correction on PG 51. To get the lab installed make sure you use sudo .

Old command
python w4sp_webapp.py

Correct command
sudo python w4sp_webapp.py

Traceback Error

I've been getting this error.

~/Downloads/w4sp-lab-master$ sudo python w4sp_webapp.py
Traceback (most recent call last):
File "w4sp_webapp.py", line 435, in
if os.getlogin() != 'w4sp-lab':
OSError: [Errno 2] No such file or directory

Not sure why. Any help

I am running the latest Kali linux. I have also updated and upgraded the kali linux

Question - ELK not logging sploit traffic

Hi,
When running sploit and ELK together should the ELK machine log any traffic to/from the sploit target machine ? I'm not seeing any traffic to/from the sploit IP address when I search the logs in Kibana.

Thank you.
Mike

I got an error with setting up the lab

Not sure whats going on but I received a really long error. There was more to it but I'm just posting the end part. I hope someone is able to help me with this. Thank you in advance.

Exception happened during processing of request from ('127.0.0.1', 56852)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 290, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 318, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 654, in init
self.finish()
File "/usr/lib/python2.7/SocketServer.py", line 713, in finish
self.wfile.close()
File "/usr/lib/python2.7/socket.py", line 283, in close
self.flush()
File "/usr/lib/python2.7/socket.py", line 307, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe

5436 connected 5489
5436 connected 5538
5436 connected 5603
5436 connected 5671
5436 connected 5750
5489 connected 6130
5538 connected 6130
6130 connected 6193
6130 connected 6254
6130 connected 6319
6130 connected 6387
{'nodes': [{'title': u'br0 : 192.100.200.62
', 'id': '5436', 'label': 'sw1'}, {'title': u'r1_0 : 192.100.200.40
', 'id': '5489', 'label': 'r1'}, {'title': u'r2_0 : 192.100.200.74
', 'id': '5538', 'label': 'r2'}, {'title': u'vic1_0 : 192.100.200.198
', 'id': '5603', 'label': 'vic1'}, {'title': u'smb1_0 : 192.100.200.108
', 'id': '5671', 'label': 'smb1'}, {'title': u'ftp1_0 : 192.100.200.130
', 'id': '5750', 'label': 'ftp1'}, {'title': u'br0 : 10.100.200.61
', 'id': '6130', 'label': 'sw2'}, {'color': 'rgb(0,255,0)', 'title': u'root : 192.168.0.198
inet_0 : 10.100.200.54
', 'id': '6193', 'label': 'inet'}, {'title': u'vic4_0 : 10.100.200.111
', 'id': '6254', 'label': 'vic4'}, {'title': u'smb2_0 : 10.100.200.128
', 'id': '6319', 'label': 'smb2'}, {'title': u'ftp2_0 : 10.100.200.179
', 'id': '6387', 'label': 'ftp2'}, {'color': 'rgb(204,0,0)', 'title': u'docker0 : 172.17.0.1
w4sp_lab : 192.100.200.200
', 'id': 1, 'label': ' kali '}], 'edges': [{'to': '5489', 'from': '5436'}, {'to': '5538', 'from': '5436'}, {'to': '5603', 'from': '5436'}, {'to': '5671', 'from': '5436'}, {'to': '5750', 'from': '5436'}, {'to': '5436', 'from': 1}, {'to': '6130', 'from': '5489'}, {'to': '6130', 'from': '5538'}, {'to': '6193', 'from': '6130'}, {'to': '6254', 'from': '6130'}, {'to': '6319', 'from': '6130'}, {'to': '6387', 'from': '6130'}]}
127.0.0.1 - - [14/Feb/2018 16:49:36] "GET /getnet HTTP/1.1" 200 -

Exception happened during processing of request from ('127.0.0.1', 56854)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 290, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 318, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 654, in init
self.finish()
File "/usr/lib/python2.7/SocketServer.py", line 713, in finish
self.wfile.close()
File "/usr/lib/python2.7/socket.py", line 283, in close
self.flush()
File "/usr/lib/python2.7/socket.py", line 307, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe

Metasploitable no longer starting

Hi,
Metasploitable not starting.
I now get the following error:
File "/home/w4sp-lab/Downloads/w4sp-lab-master/w4sp_app/utils.py", line 83, in r
return subprocess.check_output(cmd)
File "/usr/lib/python2.7/subprocess.py", line 219, in check_output
raise CalledProcessError(retcode, cmd, output=output)
CalledProcessError: Command '['docker', 'run', '-id', '--privileged', '--name', 'sploit', '--hostname', 'sploit', '--net=none', 'w4sp/labs:sploitable']' returned non-zero exit status 125
Exception AttributeError: "'container' object has no attribute 'id'" in <bound method container.del of <w4sp_app.container.container object at 0x7f9708992a90>> ignored
127.0.0.1 - - [14/Jan/2018 09:36:33] "GET /sploit HTTP/1.1" 500 -

Sploit doesn't appear in network diagram.

Thanks,
Mike

apt-get install netifaces fail

Today, apt-get install netifaces fails.
It seems that apt-get cannot find python-netifaces anymore.
So, I was wondering. Is it worth to keep the code below?

w4sp_app/container.py:22:        subprocess.check_call(['apt-get', 'install', 'python-netifaces'])
w4sp_app/container.py:23:        import netifaces

I mean, the only reason to keep this code is to catch an error from pip install.
If pip install fails, this one will stop the installation script. Which is good.

I think I'll change this code a little bit.

I'm running:
Linux kali 4.9.0-kali3-amd64 #1 SMP Debian 4.9.18-1kali1 (2017-04-04) x86_64 GNU/Linux

error installing w4sp-lab

E: Impossibile impostare il blocco /var/lib/dpkg/lock-frontend - open (11: Risorsa temporaneamente non disponibile)
E: Impossibile acquisire il blocco sul frontend dpkg (/var/lib/dpkg/lock-frontend). Un altro processo potrebbe tenerlo occupato.
Failed to start docker.service: Unit docker.service not found.
Traceback (most recent call last):
File "w4sp_webapp.py", line 480, in
images = subprocess.check_output(['docker', 'images']).split('\n')
File "/usr/lib/python2.7/subprocess.py", line 216, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 394, in init
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

issue on second startup

Hello. So, I have a strange issue. I can get through the install no problem and the lab environment works just fine. I install, hit setup, refresh the screen and things seems to work find. However, I then shutdown via the browser GUI and that seems to work. Something that is odd though is that the terminal fails to return to the prompt. Thus, I have tried to either hit ctrl-c or just X the terminal out.

Upon reboot or starting the Kali VM the lab will no longer work. I get the browser GUI but when I hit setup something happens and the button that used to be labeled "setup" becomes "error" and there is nothing I can do about it. Hitting the error button quickly flashes an error window that pops up and disappears faster than I can read the message and the terminal cycles through some code but there is no way to work the lab. My only option is to go to the previous VM snapshot that I made prior to installing the lab and reinstall the lab. Then again, I can use the lab. If this didn't take 15 minutes each time it wouldn't be that big of a deal but it does and makes things a huge pain.

Here is the terminal window upon restart of the program when I start getting errors. Hopefully you can help me out!!! Thanks.

['which', 'dumpcap']
['getcap', '/usr/bin/dumpcap']
[*] Caps set correctly on dumpcap
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[*] Not enough w4sp/labs images found, building now
/root/Downloads/w4sp-lab-master/images
['docker', 'build', '-t', 'w4sp/labs:base', 'base']
['docker', 'build', '-t', 'w4sp/labs:temp', 'temp']
['docker', 'build', '-t', 'w4sp/labs:victims', 'victims']
['docker', 'build', '-t', 'w4sp/labs:samba', 'samba']
['docker', 'build', '-t', 'w4sp/labs:wireless', 'wireless']
['docker', 'build', '-t', 'w4sp/labs:elk', 'elk']
['docker', 'build', '-t', 'w4sp/labs:ftp_tel', 'ftp_tel']
['docker', 'build', '-t', 'w4sp/labs:inet', 'inet']
['docker', 'build', '-t', 'w4sp/labs:switch', 'switch']
['docker', 'build', '-t', 'w4sp/labs:vrrpd', 'vrrpd']
['docker', 'ps', '-aq', '--filter', 'label=w4sp=true']
['ifconfig', '-a']
['ip', 'link', 'delete', 'docker0:']
['ip', 'link', 'delete', 'eth0:']
RTNETLINK answers: Operation not supported
['ip', 'link', 'delete', 'lo:']
RTNETLINK answers: Operation not supported
['ip', 'netns']
['pkill', 'dhclient']
['ifconfig', '-a']
['service', 'network-manager', 'start']
['service', 'networking', 'restart']
['service', 'docker', 'restart']
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
[*] Lab Launched, Starting Browser
[*] Do not close this terminal. Closing Terminal will terminate lab.
127.0.0.1 - - [26/Sep/2017 11:04:56] "GET / HTTP/1.1" 200 -
{'nodes': [{'color': 'rgb(204,0,0)', 'title': u'eth0 : 192.168.1.119 <br>docker0 : 172.17.0.1 <br>', 'id': 1, 'label': ' kali '}], 'edges': []}
127.0.0.1 - - [26/Sep/2017 11:04:57] "GET /getnet HTTP/1.1" 200 -
127.0.0.1 - - [26/Sep/2017 11:04:57] "GET /is_ips HTTP/1.1" 404 -
127.0.0.1 - - [26/Sep/2017 11:04:57] "GET /favicon.ico HTTP/1.1" 404 -
['docker', 'ps', '-aq', '--filter', 'label=w4sp=true']
['ifconfig', '-a']
['ip', 'link', 'delete', 'docker0:']
['ip', 'link', 'delete', 'eth0:']
RTNETLINK answers: Operation not supported
['ip', 'link', 'delete', 'lo:']
RTNETLINK answers: Operation not supported
['ip', 'netns']
['pkill', 'dhclient']
['ifconfig', '-a']
['service', 'network-manager', 'start']
['service', 'networking', 'restart']
['service', 'docker', 'restart']
['docker', 'ps', '-aq', '--filter', 'label=w4sp=true']
['ifconfig', '-a']
['ip', 'link', 'delete', 'docker0:']
['ip', 'link', 'delete', 'eth0:']
RTNETLINK answers: Operation not supported
['ip', 'link', 'delete', 'lo:']
RTNETLINK answers: Operation not supported
['ip', 'netns']
['pkill', 'dhclient']
['ifconfig', '-a']
['service', 'network-manager', 'start']
['service', 'networking', 'restart']
['service', 'docker', 'restart']
Job for docker.service failed.
See "systemctl  status docker.service" and "journalctl  -xe" for details.
Traceback (most recent call last):
  File "w4sp_webapp.py", line 163, in setup
    w4sp.setup_network2('eth0')
  File "/root/Downloads/w4sp-lab-master/w4sp.py", line 39, in setup_network2
    docker_clean()
  File "/root/Downloads/w4sp-lab-master/w4sp_app/utils.py", line 148, in docker_clean
    r('service docker restart')
  File "/root/Downloads/w4sp-lab-master/w4sp_app/utils.py", line 83, in r
    return subprocess.check_output(cmd)
  File "/usr/lib/python2.7/subprocess.py", line 219, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
CalledProcessError: Command '['service', 'docker', 'restart']' returned non-zero exit status 1

127.0.0.1 - - [26/Sep/2017 11:05:07] "GET /setup HTTP/1.1" 200 -
{'nodes': [{'color': 'rgb(204,0,0)', 'title': u'eth0 : 192.168.1.119 <br>', 'id': 1, 'label': ' kali '}], 'edges': []}
127.0.0.1 - - [26/Sep/2017 11:05:07] "GET /getnet HTTP/1.1" 200 -
127.0.0.1 - - [26/Sep/2017 11:05:08] "GET /is_ips HTTP/1.1" 404 -
['docker', 'ps', '-aq', '--filter', 'label=w4sp=true']
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[*] Did not shutdown cleanly, trying again
['docker', 'ps', '-aq', '--filter', 'label=w4sp=true']
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
['docker', 'ps', '-aq', '--filter', 'label=w4sp=true']
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Traceback (most recent call last):
  File "w4sp_webapp.py", line 163, in setup
    w4sp.setup_network2('eth0')
  File "/root/Downloads/w4sp-lab-master/w4sp.py", line 39, in setup_network2
    docker_clean()
  File "/root/Downloads/w4sp-lab-master/w4sp_app/utils.py", line 114, in docker_clean
    out = r('docker ps -aq --filter label=w4sp=true').split('\n')[:-1]
  File "/root/Downloads/w4sp-lab-master/w4sp_app/utils.py", line 83, in r
    return subprocess.check_output(cmd)
  File "/usr/lib/python2.7/subprocess.py", line 219, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
CalledProcessError: Command '['docker', 'ps', '-aq', '--filter', 'label=w4sp=true']' returned non-zero exit status 1

127.0.0.1 - - [26/Sep/2017 11:05:14] "GET /setup HTTP/1.1" 200 -
{'nodes': [{'color': 'rgb(204,0,0)', 'title': u'eth0 : 192.168.1.119 <br>', 'id': 1, 'label': ' kali '}], 'edges': []}
127.0.0.1 - - [26/Sep/2017 11:05:14] "GET /getnet HTTP/1.1" 200 -
127.0.0.1 - - [26/Sep/2017 11:05:14] "GET /is_ips HTTP/1.1" 404 -
['docker', 'ps', '-aq', '--filter', 'label=w4sp=true']
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[*] Did not shutdown cleanly, trying again
['docker', 'ps', '-aq', '--filter', 'label=w4sp=true']
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
['docker', 'ps', '-aq', '--filter', 'label=w4sp=true']
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Traceback (most recent call last):
  File "w4sp_webapp.py", line 163, in setup
    w4sp.setup_network2('eth0')
  File "/root/Downloads/w4sp-lab-master/w4sp.py", line 39, in setup_network2
    docker_clean()
  File "/root/Downloads/w4sp-lab-master/w4sp_app/utils.py", line 114, in docker_clean
    out = r('docker ps -aq --filter label=w4sp=true').split('\n')[:-1]
  File "/root/Downloads/w4sp-lab-master/w4sp_app/utils.py", line 83, in r
    return subprocess.check_output(cmd)
  File "/usr/lib/python2.7/subprocess.py", line 219, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
CalledProcessError: Command '['docker', 'ps', '-aq', '--filter', 'label=w4sp=true']' returned non-zero exit status 1

127.0.0.1 - - [26/Sep/2017 11:05:18] "GET /setup HTTP/1.1" 200 -
{'nodes': [{'color': 'rgb(204,0,0)', 'title': u'eth0 : 192.168.1.119 <br>', 'id': 1, 'label': ' kali '}], 'edges': []}
127.0.0.1 - - [26/Sep/2017 11:05:18] "GET /getnet HTTP/1.1" 200 -
127.0.0.1 - - [26/Sep/2017 11:05:18] "GET /is_ips HTTP/1.1" 404 -

Error Starting Lab

The Lab was working fine after initial setup in Chapter 2, but when I went to use it again in Chapter 5, I get the error below.

DETAILS: When I boot the VM, I was prompted to update Virtualbox -- so I did. Since, I've also ran the Kali update as per the setup instructions on this site [sudo apt-get update && sudo apt-get dist-upgrade]. But I'm still get the same error.

The syntax of the failing command seems OK to me. I have no problem manually downloading and opening the public key file [https://packages.elastic.co/GPG-KEY-elasticsearch] in the text editor. In-fact, I can manually run the entire command without error.

w4sp-lab@W4SP:~/Downloads/w4sp-lab-master$ sudo python w4sp_webapp.py['which', 'dumpcap']
['getcap', '/usr/bin/dumpcap']
[] Caps set correctly on dumpcap
[
] Not enough w4sp/labs images found, building now
/home/w4sp-lab/Downloads/w4sp-lab-master/images
['docker', 'build', '-t', 'w4sp/labs:base', 'base']
['docker', 'build', '-t', 'w4sp/labs:elk', 'elk']
The command '/bin/sh -c wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -' returned a non-zero code: 2
Traceback (most recent call last):
File "w4sp_webapp.py", line 499, in
w4sp.docker_build('images/')
File "/home/w4sp-lab/Downloads/w4sp-lab-master/w4sp_app/utils.py", line 102, in docker_build
r('docker build -t $image_name $image')
File "/home/w4sp-lab/Downloads/w4sp-lab-master/w4sp_app/utils.py", line 83, in r
return subprocess.check_output(cmd)
File "/usr/lib/python2.7/subprocess.py", line 219, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['docker', 'build', '-t', 'w4sp/labs:elk', 'elk']' returned non-zero exit status 2

Python script is asking me to run it in root

Hi team,

As per the lab manual, the python script should run in w4sp-lab user. But in my case it is asking to run the script in root.

Please update me, that how i can proceed further

Failed to start docker.service

w4sp-lab@kali:/root/Downloads/w4sp-lab-master$ sudo python w4sp_webapp.py
['which', 'dumpcap']
['getcap', '/usr/bin/dumpcap']
[*] Caps set correctly on dumpcap
Get:1 https://apt.dockerproject.org/repo debian-stretch InRelease [48.7 kB]
Err:1 https://apt.dockerproject.org/repo debian-stretch InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F76221572C52609D
Hit:2 http://mirrors.neusoft.edu.cn/kali kali-rolling InRelease
Reading package lists... Done
W: GPG error: https://apt.dockerproject.org/repo debian-stretch InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F76221572C52609D
E: The repository 'https://apt.dockerproject.org/repo debian-stretch InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Reading package lists... Done
Building dependency tree
Reading state information... Done
apt-transport-https is already the newest version (1.5~rc4).
bridge-utils is already the newest version (1.5-14).
ca-certificates is already the newest version (20170717).
software-properties-common is already the newest version (0.96.20.2-1).
0 upgraded, 0 newly installed, 0 to remove and 1411 not upgraded.
Get:1 https://apt.dockerproject.org/repo debian-stretch InRelease [48.7 kB]
Err:1 https://apt.dockerproject.org/repo debian-stretch InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F76221572C52609D
Hit:2 http://mirrors.neusoft.edu.cn/kali kali-rolling InRelease
Reading package lists... Done
W: GPG error: https://apt.dockerproject.org/repo debian-stretch InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F76221572C52609D
E: The repository 'https://apt.dockerproject.org/repo debian-stretch InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
aufs-dkms aufs-tools cgroupfs-mount dkms linux-compiler-gcc-6-x86 linux-headers-4.12.0-kali2-amd64
linux-headers-4.12.0-kali2-common linux-headers-amd64 linux-kbuild-4.12
Suggested packages:
aufs-dev python3-apport
The following NEW packages will be installed:
aufs-dkms aufs-tools cgroupfs-mount dkms docker-engine linux-compiler-gcc-6-x86
linux-headers-4.12.0-kali2-amd64 linux-headers-4.12.0-kali2-common linux-headers-amd64 linux-kbuild-4.12
0 upgraded, 10 newly installed, 0 to remove and 1411 not upgraded.
Need to get 31.4 MB of archives.
After this operation, 165 MB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
docker-engine
E: There were unauthenticated packages and -y was used without --allow-unauthenticated
Failed to start docker.service: Unit docker.service not found.
Traceback (most recent call last):
File "w4sp_webapp.py", line 480, in
images = subprocess.check_output(['docker', 'images']).split('\n')
File "/usr/lib/python2.7/subprocess.py", line 212, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 390, in init
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1024, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
w4sp-lab@kali:/root/Downloads/w4sp-lab-master$

'Start sploit' button not reset after using 'Shutdown' Button

Steps to recreate

  • start labs using command line
  • click 'Setup' button
  • click 'Start sploit' (to do the labs in Ch6)
  • click 'Shutdown'
  • click 'Setup'

Expected Results

  • 'Start sploit' button is enabled

Actual Results

  • 'Start sploit' button is disabled (and was disabled when it was originally clicked)

Workarounds

  1. using the dev tools for the browser, you can use the 'pick an element from the page' icon to click on the button and then remove the 'disable=""' ' entry to re-enable the button on the screen.
  2. shut down the browser, stop the lab from the terminal using [ctrl]-[c] and restart the lab.

Notes

  • This is not a critical bug, only a slight annoyance :)

Issues Setting Up Lab

Running Kali Linux on my Mac through VirtualBox and installing the lab for a college class. Been beating my head off the wall all week trying to get past the different errors I encounter. I can open the browser and try to setup the lab manually by entering the IP address into firefox but it never goes anywhere.
screen shot 2018-10-15 at 4 08 23 pm
screen shot 2018-10-15 at 4 08 05 pm

Clarifications on the book text

I'm reading through the book and have found a couple points where I wasn't clear. I'm adding in my assumptions, so any confirmation or correction of these would be appreciated. (BTW, I'm super-stoked about these lab exercises :) )

Ch4. p122 "To show only the NT Create commands, you can use the smb.cmd filter.'

One difficulty I have is determining the specific filter to use based on the specific information I see in
wireshark. If you have an smb sample and you look at an smb packet with the NT Create command,
there is nothing in wireshark that gives you a direct mapping to say 'use the smb.cmd filter'.
One tip is that if you right-click on the smb part of the packet, you'll see 'Filter Field Reference'.
Selecting that will bring up a browser window showing you all the fields for that protocol to add to
your filter. It's not a direct mapping, but it does narrow down the search a bit.

Ch5. p132. "To demonstrate ARP in use, let's ping a host on the network..."

You'll want to double-click the 'inet' node from the browser showing the network diagram before
doing this work. This will bring up a terminal window to the right source host and wireshark to
capture the traffic.

I'll post other things that I've run across here as I find them. Any comments on whether my assumptions are correct would be appreciated. :) (Did I mention I love these labs? 👍 )

Chapter 7: Decrypting SSL/TSL

Hi, i´m on Chapter 7. In this section, i will a connection to ftp1 with TLSv2 - i start wireshark but i see only connection with TLSv1
grafik

who is my failure ?

Lab Never Starts

I've installed the w4sp lab and while the lab pages comes up clicking setup after several hours nothing happens.
Any suggestions on how to fix the issue?
sudo python w4sp_webapp.py
['which', 'dumpcap']
['getcap', '/usr/bin/dumpcap']
[] Caps set correctly on dumpcap
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[
] Not enough w4sp/labs images found, building now
/root/Downloads/w4sp-lab-master/images
['docker', 'build', '-t', 'w4sp/labs:base', 'base']
['docker', 'build', '-t', 'w4sp/labs:switch', 'switch']
['docker', 'build', '-t', 'w4sp/labs:vrrpd', 'vrrpd']
['docker', 'build', '-t', 'w4sp/labs:temp', 'temp']
['docker', 'build', '-t', 'w4sp/labs:inet', 'inet']
['docker', 'build', '-t', 'w4sp/labs:elk', 'elk']
['docker', 'build', '-t', 'w4sp/labs:victims', 'victims']
['docker', 'build', '-t', 'w4sp/labs:wireless', 'wireless']
['docker', 'build', '-t', 'w4sp/labs:ftp_tel', 'ftp_tel']
['docker', 'build', '-t', 'w4sp/labs:samba', 'samba']
['docker', 'ps', '-aq', '--filter', 'label=w4sp=true']
['ifconfig', '-a']
['ip', 'link', 'delete', 'docker0:']
['ip', 'link', 'delete', 'eth0:']
RTNETLINK answers: Operation not supported
['ip', 'link', 'delete', 'lo:']
RTNETLINK answers: Operation not supported
['ip', 'netns']
['pkill', 'dhclient']
['ifconfig', '-a']
['service', 'network-manager', 'start']
['service', 'networking', 'restart']
['service', 'docker', 'restart']

  • Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
    [] Lab Launched, Starting Browser
    [
    ] Do not close this terminal. Closing Terminal will terminate lab.
    127.0.0.1 - - [19/Jul/2017 23:21:51] "GET / HTTP/1.1" 200 -
    {'nodes': [{'color': 'rgb(204,0,0)', 'title': u'eth0 : 10.0.2.15
    docker0 : 172.17.0.1
    ', 'id': 1, 'label': ' kali '}], 'edges': []}
    127.0.0.1 - - [19/Jul/2017 23:21:54] "GET /getnet HTTP/1.1" 200 -
    127.0.0.1 - - [19/Jul/2017 23:21:54] "GET /is_ips HTTP/1.1" 404 -
    127.0.0.1 - - [19/Jul/2017 23:21:54] "GET /favicon.ico HTTP/1.1" 404 -
    ['docker', 'ps', '-aq', '--filter', 'label=w4sp=true']
    ['ifconfig', '-a']
    ['ip', 'link', 'delete', 'docker0:']
    ['ip', 'link', 'delete', 'eth0:']
    RTNETLINK answers: Operation not supported
    ['ip', 'link', 'delete', 'lo:']
    RTNETLINK answers: Operation not supported
    ['ip', 'netns']
    ['pkill', 'dhclient']
    ['ifconfig', '-a']
    ['service', 'network-manager', 'start']
    ['service', 'networking', 'restart']
    ['service', 'docker', 'restart']
    ['docker', 'ps', '-aq', '--filter', 'label=w4sp=true']
    ['ifconfig', '-a']
    ['ip', 'link', 'delete', 'docker0:']
    ['ip', 'link', 'delete', 'eth0:']
    RTNETLINK answers: Operation not supported
    ['ip', 'link', 'delete', 'lo:']
    RTNETLINK answers: Operation not supported
    ['ip', 'netns']
    ['pkill', 'dhclient']
    ['ifconfig', '-a']
    ['service', 'network-manager', 'start']
    ['service', 'networking', 'restart']
    ['service', 'docker', 'restart']
    ['docker', 'run', '-id', '--privileged', '--name', 'sw1', '--hostname', 'sw1', '--net=none', 'w4sp/labs:switch']
    ['docker', 'inspect', '-f', "'{{.State.Pid}}'", '9a33d582bab8a05d123c4cbe3e8a9728ab86140c13c05a79c413a94a69c4a178']
    ['ln', '-s', '/proc/10655/ns/net', '/var/run/netns/sw1']
    ['docker', 'run', '-id', '--privileged', '--name', 'r1', '--hostname', 'r1', '--net=none', 'w4sp/labs:vrrpd']
    ['docker', 'inspect', '-f', "'{{.State.Pid}}'", 'c460e1dfc9641d14951a65b13b67d64204a2427bee39804d606066b84ad97653']
    ['ln', '-s', '/proc/10706/ns/net', '/var/run/netns/r1']
    ['docker', 'run', '-id', '--privileged', '--name', 'r2', '--hostname', 'r2', '--net=none', 'w4sp/labs:vrrpd']
    ['docker', 'inspect', '-f', "'{{.State.Pid}}'", 'a82b0f11e06bff349afdba12185e383d29e2b1395b1b570ae392ac42eef5b154']
    ['ln', '-s', '/proc/10768/ns/net', '/var/run/netns/r2']
    ['docker', 'run', '-id', '--privileged', '--name', 'vic1', '--hostname', 'vic1', '--net=none', 'w4sp/labs:victims']
    ['docker', 'inspect', '-f', "'{{.State.Pid}}'", '0772076c6b246f10222ea6b3fb08010c682f6e7a655ebd6ced26a372004a2335']
    ['ln', '-s', '/proc/10858/ns/net', '/var/run/netns/vic1']
    ['docker', 'run', '-id', '--privileged', '--name', 'smb1', '--hostname', 'smb1', '--net=none', 'w4sp/labs:samba']
    ['docker', 'inspect', '-f', "'{{.State.Pid}}'", 'a101c024b047315ff762eb09c79bdf7821c60ac15cc730569cfd743f9c3d1d47']
    ['ln', '-s', '/proc/10978/ns/net', '/var/run/netns/smb1']
    ['docker', 'run', '-id', '--privileged', '--name', 'ftp1', '--hostname', 'ftp1', '--net=none', 'w4sp/labs:ftp_tel']
    ['docker', 'inspect', '-f', "'{{.State.Pid}}'", '04374fe3fe223e39aa6d31249f2cb966aef8078075ca7e77a3d1f4126148de23']
    ['ln', '-s', '/proc/11075/ns/net', '/var/run/netns/ftp1']
    ['ip', 'link', 'add', 'r1_0', 'type', 'veth', 'peer', 'name', 'tmp']
    ['ip', 'link', 'set', 'tmp', 'netns', '10655']
    ['ip', 'link', 'set', 'r1_0', 'netns', '10706']
    ['ip', 'netns', 'exec', 'sw1', 'ethtool', '-K', 'tmp', 'rx', 'off', 'tx', 'off']
    ['ip', 'link', 'set', 'dev', 'tmp', 'name', 'r1_0']
    ['ethtool', '-K', 'r1_0', 'rx', 'off', 'tx', 'off']
    ['ip', 'link', 'add', 'r2_0', 'type', 'veth', 'peer', 'name', 'tmp']
    ['ip', 'link', 'set', 'tmp', 'netns', '10655']
    ['ip', 'link', 'set', 'r2_0', 'netns', '10768']
    ['ip', 'netns', 'exec', 'sw1', 'ethtool', '-K', 'tmp', 'rx', 'off', 'tx', 'off']
    ['ip', 'link', 'set', 'dev', 'tmp', 'name', 'r2_0']
    ['ethtool', '-K', 'r2_0', 'rx', 'off', 'tx', 'off']
    ['ip', 'link', 'add', 'vic1_0', 'type', 'veth', 'peer', 'name', 'tmp']
    ['ip', 'link', 'set', 'tmp', 'netns', '10655']
    ['ip', 'link', 'set', 'vic1_0', 'netns', '10858']
    ['ip', 'netns', 'exec', 'sw1', 'ethtool', '-K', 'tmp', 'rx', 'off', 'tx', 'off']
    ['ip', 'link', 'set', 'dev', 'tmp', 'name', 'vic1_0']
    ['ethtool', '-K', 'vic1_0', 'rx', 'off', 'tx', 'off']
    ['ip', 'link', 'add', 'smb1_0', 'type', 'veth', 'peer', 'name', 'tmp']
    ['ip', 'link', 'set', 'tmp', 'netns', '10655']
    ['ip', 'link', 'set', 'smb1_0', 'netns', '10978']
    ['ip', 'netns', 'exec', 'sw1', 'ethtool', '-K', 'tmp', 'rx', 'off', 'tx', 'off']
    ['ip', 'link', 'set', 'dev', 'tmp', 'name', 'smb1_0']
    ['ethtool', '-K', 'smb1_0', 'rx', 'off', 'tx', 'off']
    ['ip', 'link', 'add', 'ftp1_0', 'type', 'veth', 'peer', 'name', 'tmp']
    ['ip', 'link', 'set', 'tmp', 'netns', '10655']
    ['ip', 'link', 'set', 'ftp1_0', 'netns', '11075']
    ['ip', 'netns', 'exec', 'sw1', 'ethtool', '-K', 'tmp', 'rx', 'off', 'tx', 'off']
    ['ip', 'link', 'set', 'dev', 'tmp', 'name', 'ftp1_0']
    ['ethtool', '-K', 'ftp1_0', 'rx', 'off', 'tx', 'off']
    ['ip', 'addr', 'add', '192.100.200.96/24', 'dev', 'br0']
    ['docker', 'run', '-id', '--privileged', '--name', 'sw2', '--hostname', 'sw2', '--net=none', 'w4sp/labs:switch']
    ['docker', 'inspect', '-f', "'{{.State.Pid}}'", '31866dbdd834d959a71a79aa244e5a4806e626ade8d228178ee2befc6912a641']
    ['ln', '-s', '/proc/11513/ns/net', '/var/run/netns/sw2']
    ['docker', 'run', '-id', '--privileged', '--name', 'inet', '--hostname', 'inet', '--net=none', 'w4sp/labs:inet']
    ['docker', 'inspect', '-f', "'{{.State.Pid}}'", '3066a3edd941e6218bf1c7221755c97bbc1d9f5a95d5f728b9ea08b477aa9643']
    ['ln', '-s', '/proc/11628/ns/net', '/var/run/netns/inet']
    ['docker', 'run', '-id', '--privileged', '--name', 'vic4', '--hostname', 'vic4', '--net=none', 'w4sp/labs:victims']
    ['docker', 'inspect', '-f', "'{{.State.Pid}}'", '50171cba66913f4c3415ad1104ea336af35ef6d409d29d4d64988eb9dcede514']
    ['ln', '-s', '/proc/11722/ns/net', '/var/run/netns/vic4']
    ['docker', 'run', '-id', '--privileged', '--name', 'smb2', '--hostname', 'smb2', '--net=none', 'w4sp/labs:samba']
    ['docker', 'inspect', '-f', "'{{.State.Pid}}'", '446b47e3965d17777e270b0a12d55604d402f8d9f83ac10f80f8b09498cf394b']
    ['ln', '-s', '/proc/11808/ns/net', '/var/run/netns/smb2']
    ['docker', 'run', '-id', '--privileged', '--name', 'ftp2', '--hostname', 'ftp2', '--net=none', 'w4sp/labs:ftp_tel']
    ['docker', 'inspect', '-f', "'{{.State.Pid}}'", 'd77cc79350b1a9293489446d5358d5682726adf43d103a6eec41692e4443a870']
    ['ln', '-s', '/proc/11898/ns/net', '/var/run/netns/ftp2']
    ['ip', 'link', 'add', 'r1_1', 'type', 'veth', 'peer', 'name', 'tmp']
    ['ip', 'link', 'set', 'tmp', 'netns', '11513']
    ['ip', 'link', 'set', 'r1_1', 'netns', '10706']
    ['ip', 'netns', 'exec', 'sw2', 'ethtool', '-K', 'tmp', 'rx', 'off', 'tx', 'off']
    ['ip', 'link', 'set', 'dev', 'tmp', 'name', 'r1_1']
    ['ethtool', '-K', 'r1_1', 'rx', 'off', 'tx', 'off']
    ['ip', 'link', 'add', 'r2_1', 'type', 'veth', 'peer', 'name', 'tmp']
    ['ip', 'link', 'set', 'tmp', 'netns', '11513']
    ['ip', 'link', 'set', 'r2_1', 'netns', '10768']
    ['ip', 'netns', 'exec', 'sw2', 'ethtool', '-K', 'tmp', 'rx', 'off', 'tx', 'off']
    ['ip', 'link', 'set', 'dev', 'tmp', 'name', 'r2_1']
    ['ethtool', '-K', 'r2_1', 'rx', 'off', 'tx', 'off']
    ['ip', 'link', 'add', 'inet_0', 'type', 'veth', 'peer', 'name', 'tmp']
    ['ip', 'link', 'set', 'tmp', 'netns', '11513']
    ['ip', 'link', 'set', 'inet_0', 'netns', '11628']
    ['ip', 'netns', 'exec', 'sw2', 'ethtool', '-K', 'tmp', 'rx', 'off', 'tx', 'off']
    ['ip', 'link', 'set', 'dev', 'tmp', 'name', 'inet_0']
    ['ethtool', '-K', 'inet_0', 'rx', 'off', 'tx', 'off']
    ['ip', 'link', 'add', 'vic4_0', 'type', 'veth', 'peer', 'name', 'tmp']
    ['ip', 'link', 'set', 'tmp', 'netns', '11513']
    ['ip', 'link', 'set', 'vic4_0', 'netns', '11722']
    ['ip', 'netns', 'exec', 'sw2', 'ethtool', '-K', 'tmp', 'rx', 'off', 'tx', 'off']
    ['ip', 'link', 'set', 'dev', 'tmp', 'name', 'vic4_0']
    ['ethtool', '-K', 'vic4_0', 'rx', 'off', 'tx', 'off']
    ['ip', 'link', 'add', 'smb2_0', 'type', 'veth', 'peer', 'name', 'tmp']
    ['ip', 'link', 'set', 'tmp', 'netns', '11513']
    ['ip', 'link', 'set', 'smb2_0', 'netns', '11808']
    ['ip', 'netns', 'exec', 'sw2', 'ethtool', '-K', 'tmp', 'rx', 'off', 'tx', 'off']
    ['ip', 'link', 'set', 'dev', 'tmp', 'name', 'smb2_0']
    ['ethtool', '-K', 'smb2_0', 'rx', 'off', 'tx', 'off']
    ['ip', 'link', 'add', 'ftp2_0', 'type', 'veth', 'peer', 'name', 'tmp']
    ['ip', 'link', 'set', 'tmp', 'netns', '11513']
    ['ip', 'link', 'set', 'ftp2_0', 'netns', '11898']
    ['ip', 'netns', 'exec', 'sw2', 'ethtool', '-K', 'tmp', 'rx', 'off', 'tx', 'off']
    ['ip', 'link', 'set', 'dev', 'tmp', 'name', 'ftp2_0']
    ['ethtool', '-K', 'ftp2_0', 'rx', 'off', 'tx', 'off']
    ['ip', 'addr', 'add', '10.100.200.65/24', 'dev', 'br0']
    ['ip', 'link', 'set', 'eth0', 'down']
    ['ip', 'link', 'set', 'eth0', 'name', 'root']
    ['ip', 'link', 'set', 'root', 'netns', 'inet']
    ['ip', 'link', 'add', 'root_0', 'type', 'veth', 'peer', 'name', 'tmp']
    ['ip', 'link', 'set', 'tmp', 'netns', '10655']
    ['ip', 'link', 'set', 'root_0', 'netns', '1']
    ['ip', 'netns', 'exec', 'sw1', 'ethtool', '-K', 'tmp', 'rx', 'off', 'tx', 'off']
    ['ip', 'link', 'set', 'dev', 'tmp', 'name', 'root_0']
    ['ethtool', '-K', 'root_0', 'rx', 'off', 'tx', 'off']
    ['brctl', 'addif', 'br0', 'root_0']
    ['ip', 'link', 'set', 'root_0', 'up']
    ['service', 'network-manager', 'stop']
    ['ip', 'link', 'set', 'root_0', 'name', 'w4sp_lab']
    ['dhclient', '-v', 'w4sp_lab']
    Internet Systems Consortium DHCP Client 4.3.5
    Copyright 2004-2016 Internet Systems Consortium.
    All rights reserved.
    For info, please visit https://www.isc.org/software/dhcp/
    Listening on LPF/w4sp_lab/e2:7d:a6:24:8f:39
    Sending on LPF/w4sp_lab/e2:7d:a6:24:8f:39
    Sending on Socket/fallback
    DHCPDISCOVER on w4sp_lab to 255.255.255.255 port 67 interval 7
    DHCPREQUEST of 192.100.200.113 on w4sp_lab to 255.255.255.255 port 67
    DHCPOFFER of 192.100.200.113 from 192.100.200.96
    DHCPACK of 192.100.200.113 from 192.100.200.96
    smbd.service is not active, cannot reload.
    invoke-rc.d: initscript smbd, action "reload" failed.
    bound to 192.100.200.113 -- renewal in 1360 seconds.
    ['route', 'add', '-net', '192.100.200.0', 'netmask', '255.255.255.0', 'gw', '10.100.200.1']
    127.0.0.1 - - [19/Jul/2017 23:27:02] "GET /setup HTTP/1.1" 200 -

Exception happened during processing of request from ('127.0.0.1', 40158)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 290, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 318, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 654, in init
self.finish()
File "/usr/lib/python2.7/SocketServer.py", line 713, in finish
self.wfile.close()
File "/usr/lib/python2.7/socket.py", line 283, in close
self.flush()
File "/usr/lib/python2.7/socket.py", line 307, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe

10655 connected 10706
10655 connected 10768
10655 connected 10858
10655 connected 10978
10655 connected 11075
10706 connected 11513
10768 connected 11513
11513 connected 11628
11513 connected 11722
11513 connected 11808
11513 connected 11898
{'nodes': [{'title': u'br0 : 192.100.200.96
', 'id': '10655', 'label': 'sw1'}, {'title': u'r1_0 : 192.100.200.58
', 'id': '10706', 'label': 'r1'}, {'title': u'r2_0 : 192.100.200.72
', 'id': '10768', 'label': 'r2'}, {'title': u'vic1_0 : 192.100.200.149
', 'id': '10858', 'label': 'vic1'}, {'title': u'smb1_0 : 192.100.200.178
', 'id': '10978', 'label': 'smb1'}, {'title': u'ftp1_0 : 192.100.200.145
', 'id': '11075', 'label': 'ftp1'}, {'title': u'br0 : 10.100.200.65
', 'id': '11513', 'label': 'sw2'}, {'color': 'rgb(0,255,0)', 'title': u'root : 10.0.2.15
inet_0 : 10.100.200.61
', 'id': '11628', 'label': 'inet'}, {'title': u'vic4_0 : 10.100.200.123
', 'id': '11722', 'label': 'vic4'}, {'title': u'smb2_0 : 10.100.200.161
', 'id': '11808', 'label': 'smb2'}, {'title': u'ftp2_0 : 10.100.200.164
', 'id': '11898', 'label': 'ftp2'}, {'color': 'rgb(204,0,0)', 'title': u'docker0 : 172.17.0.1
w4sp_lab : 192.100.200.113
', 'id': 1, 'label': ' kali '}], 'edges': [{'to': '10706', 'from': '10655'}, {'to': '10768', 'from': '10655'}, {'to': '10858', 'from': '10655'}, {'to': '10978', 'from': '10655'}, {'to': '11075', 'from': '10655'}, {'to': '10655', 'from': 1}, {'to': '11513', 'from': '10706'}, {'to': '11513', 'from': '10768'}, {'to': '11628', 'from': '11513'}, {'to': '11722', 'from': '11513'}, {'to': '11808', 'from': '11513'}, {'to': '11898', 'from': '11513'}]}
127.0.0.1 - - [19/Jul/2017 23:27:02] "GET /getnet HTTP/1.1" 200 -

Exception happened during processing of request from ('127.0.0.1', 40160)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 290, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 318, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 654, in init
self.finish()
File "/usr/lib/python2.7/SocketServer.py", line 713, in finish
self.wfile.close()
File "/usr/lib/python2.7/socket.py", line 283, in close
self.flush()
File "/usr/lib/python2.7/socket.py", line 307, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe

^C
Session terminated, terminating shell...Traceback (most recent call last):
File "w4sp_webapp.py", line 530, in
subprocess.call(['su', '-', 'w4sp-lab', '-c', 'firefox 127.0.0.1:5000'])
File "/usr/lib/python2.7/subprocess.py", line 168, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 1073, in wait
pid, sts = _eintr_retry_call(os.waitpid, self.pid, 0)
File "/usr/lib/python2.7/subprocess.py", line 121, in _eintr_retry_call
return func(*args)
KeyboardInterrupt
###!!! [Child][MessageChannel] Error: (msgtype=0x3E0003,name=PCompositable::Msg_Destroy) Channel error: cannot send/recv
###!!! [Child][MessageChannel] Error: (msgtype=0x3E0003,name=PCompositable::Msg_Destroy) Channel error: cannot send/recv
###!!! [Child][MessageChannel] Error: (msgtype=0xE20003,name=PTexture::Msg_Destroy) Channel error: cannot send/recv
###!!! [Child][MessageChannel] Error: (msgtype=0xE20003,name=PTexture::Msg_Destroy) Channel error: cannot send/recv
###!!! [Child][MessageChannel] Error: (msgtype=0x3E0003,name=PCompositable::Msg_Destroy) Channel error: cannot send/recv
###!!! [Child][MessageChannel] Error: (msgtype=0xE20003,name=PTexture::Msg_Destroy) Channel error: cannot send/recv
###!!! [Child][MessageChannel] Error: (msgtype=0xE20003,name=PTexture::Msg_Destroy) Channel error: cannot send/recv
###!!! [Child][MessageChannel] Error: (msgtype=0x3E0003,name=PCompositable::Msg_Destroy) Channel error: cannot send/recv
[GFX1-]: Receive IPC close with reason=AbnormalShutdown
[Child 10015] WARNING: pipe error (3): Connection reset by peer: file /build/firefox-esr-XWSZH3/firefox-esr-52.2.0esr/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 322
[Child 10015] ###!!! ABORT: Aborting on channel error.: file /build/firefox-esr-XWSZH3/firefox-esr-52.2.0esr/ipc/glue/MessageChannel.cpp, line 2152
[Child 10015] ###!!! ABORT: Aborting on channel error.: file /build/firefox-esr-XWSZH3/firefox-esr-52.2.0esr/ipc/glue/MessageChannel.cpp, line 2152
w4sp-lab@kali:/root/Downloads/w4sp-lab-master$ ...terminated.

Lua with Graphviz Library

Hello!

When I want to run the wirewiz.lua script for making some graph I had an error message - gv. lua can not found.

I've installed Graphviz, make some system environment PATH modification for Graphviz (as the software documentation mentioned it).

The error message:

c:\Program Files\Wireshark>tshark -q -X lua_script:wireviz.lua -i 9 > TEST.svg
tshark: Lua: Error during loading:
[string "wireviz.lua"]:2: module 'gv' not found:
no field package.preload['gv']
no file '\gv.lua'
no file 'C:\Users\peter\AppData\Roaming\Wireshark\plugins\gv.lua'
no file 'c:\Program Files\Wireshark\plugins\2.2.5\gv.lua'
no file 'C:\Users\peter\AppData\Roaming\Wireshark\plugins\cloudshark\gv.lua'
no file 'C:\Users\peter\AppData\Roaming\Wireshark\plugins\gv.lua'
no file 'c:\Program Files\Wireshark\plugins\2.2.5\gv.lua'
no file 'C:\Users\peter\AppData\Roaming\Wireshark\plugins\cloudshark\gv.lua'
(....)

I've tested it in Linux as well.

Could you give some hints how should I install Graphviz, or how should it work?

Many thanks for your help:
Peter

Multiple Errors Setting up Lab

/home/w4sp-lab/Downloads/w4sp-lab-master/images
['docker', 'build', '-t', 'w4sp/labs:base', 'base']
['docker', 'build', '-t', 'w4sp/labs:vrrpd', 'vrrpd']
['docker', 'build', '-t', 'w4sp/labs:wireless', 'wireless']
['docker', 'build', '-t', 'w4sp/labs:temp', 'temp']
['docker', 'build', '-t', 'w4sp/labs:switch', 'switch']
^CTraceback (most recent call last):
File "w4sp_webapp.py", line 499, in
w4sp.docker_build('images/')
File "/home/w4sp-lab/Downloads/w4sp-lab-master/w4sp_app/utils.py", line 102, in docker_build
r('docker build -t $image_name $image')
File "/home/w4sp-lab/Downloads/w4sp-lab-master/w4sp_app/utils.py", line 83, in r
return subprocess.check_output(cmd)
File "/usr/lib/python2.7/subprocess.py", line 217, in check_output
output, unused_err = process.communicate()
File "/usr/lib/python2.7/subprocess.py", line 475, in communicate
stdout = _eintr_retry_call(self.stdout.read)
File "/usr/lib/python2.7/subprocess.py", line 125, in _eintr_retry_call
return func(*args)

Failed to start w4sp_webapp.py

import-im6.q16: unable to open X server ' @ error/import.c/ImportImageCommand/358. import-im6.q16: unable to open X server ' @ error/import.c/ImportImageCommand/358.
import-im6.q16: unable to open X server ' @ error/import.c/ImportImageCommand/358. import-im6.q16: unable to open X server ' @ error/import.c/ImportImageCommand/358.
import-im6.q16: unable to open X server ' @ error/import.c/ImportImageCommand/358. import-im6.q16: unable to open X server ' @ error/import.c/ImportImageCommand/358.
import-im6.q16: unable to open X server ' @ error/import.c/ImportImageCommand/358. import-im6.q16: unable to open X server ' @ error/import.c/ImportImageCommand/358.
import-im6.q16: unable to open X server ' @ error/import.c/ImportImageCommand/358. import-im6.q16: unable to open X server ' @ error/import.c/ImportImageCommand/358.
from: too many arguments
./w4sp_webapp.py: line 17: syntax error near unexpected token (' ./w4sp_webapp.py: line 17: parser = argparse.ArgumentParser(description='Wireshark for Security Professionals Lab')'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.