Giter Site home page Giter Site logo

warberry's Introduction

alt tag

ToolsWatch Best Tools Black Hat Arsenal GPLv3 License Python 2.6|2.7 Twitter

This project is no longer maintained by the developer

warberry's People

Contributors

bogiton avatar itcarsales avatar jabedude avatar sconst avatar secgroundzero 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

warberry's Issues

Using optparse/argparse

Hi,

Have you thought about using some python library like optparse for python2.6 or argparse for python2.7? It could help you to manage arguments from command line instead of many nested if/elif statement in main file.

issue with bluez

Hi,

i get this when running: sudo python warberry.py -I eth0 -i -T3

      [ BLUETOOTH ENUMERATION MODULE ]

Traceback (most recent call last):
  File "warberry.py", line 443, in <module>
    main()
  File "warberry.py", line 194, in main
    bluetooth_scan()
  File "warberry.py", line 416, in bluetooth_scan
    discover()
  File "warberry.py", line 406, in discover
    blues = discover_devices()
  File "/usr/lib/python2.7/dist-packages/bluetooth/bluez.py", line 17, in discover_devices
    sock = _gethcisock ()
  File "/usr/lib/python2.7/dist-packages/bluetooth/bluez.py", line 226, in _gethcisock
    raise BluetoothError ("error accessing bluetooth device")
bluetooth.btcommon.BluetoothError: error accessing bluetooth device

please be aware that all dependancies are installed.

can you help?

thanks

CIDR referenced before assignment

Getting the following error when I try to run "sudo python warberry.py -A"

Traceback (most recent call last):
File "warberry.py", line 340, in
main(sys.argv[1])
File "warberry.py", line 80, in main
int_ip = iprecon('eth0')
File "warberry.py", line 205, in iprecon
return (static_bypass())
File "./resources/rest_bypass.py", line 147, in static_bypass
return(create_subnet())
File "./resources/rest_bypass.py", line 185, in create_subnet
return(set_static(CIDR))
UnboundLocalError: local variable 'CIDR' referenced before assignment

Tried both a manual setup and with the init script - both produce the same error.

nmap not found in path

After the nameserver enumeration function, it pops an error with this saying

[+] Scanning for Windows Hosts ...
Traceback (most recent call last):
  File "warberry.py", line 308, in <module>
    main()
  File "warberry.py", line 173, in main
    single_port_scanner(CIDR, intensity, iface)
  File "/home/pi/WarBerry/warberry/src/core/scanners/targetted_scanner.py", line 73, in single_port_scanner
    scanner(name[i], path_file[i], port[i], message[i], result_file[i], CIDR, intensity, scan_type[i],hostlist, iface=iface)
  File "/home/pi/WarBerry/warberry/src/core/scanners/targetted_scanner.py", line 34, in scanner
    nm = nmap.PortScanner()
  File "/usr/lib/python2.7/dist-packages/nmap/nmap.py", line 180, in __init__
    raise PortScannerError('nmap program was not found in path. PATH is : {0}'.format(os.getenv('PATH')))
nmap.nmap.PortScannerError: 'nmap program was not found in path. PATH is : /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'

Issue running script

root@kali:~# python warberry.py
File "warberry.py", line 2
This file is part of the WarBerry tool.
^
SyntaxError: invalid syntax

Create pi image (suggestion)

This is just a suggestion but Kali provides builds scripts for the Raspberry Pi (e.g. rpi2):
https://github.com/offensive-security/kali-arm-build-scripts/blob/master/rpi2.sh

I quickly threw together a quick little modification which may or may not work. I didn't test all the packages: https://gist.github.com/binkybear/8aebfd12fbddbf30f2558ad320620259

But it could be a turnkey solution where all you would need is to just run the script and generate a deployable image.

Feel free to close this issue, my feeling won't be hurt.

issue with tools and results folders.

I did a fresh install on Raspbian jessie on an rpi3. Cloned the repo and ran the bootstrap script. (located in /home/pi/warberry).

Once completed I ran warberry and was getting errors advising it could not find the file or folder '../Results/xxxx' and the same with missing tools not found in a folder '../Tools/xxx'.

It seems that the bootstrap script is placing these into a folder called WarBerry (/home/pi/WarBerry) and the warberry.py script in /home/pi/warberry is looking for the results and tools folder in the main /home/pi folder.

Can we have the bootstrap script place the folders into the main warberry (/home/pi/warberry) folder and update the script to look there a well please?

Error when running warberry.py -a -T

I was struggling to figure out why the script would fail with:

Traceback (most recent call last):
File "warberry.py", line 308, in
main()
File "warberry.py", line 265, in main
top_ports_scanner(CIDR, options.intensity, iface)
File "/home/pi/WarBerry/warberry/src/core/scanners/top_port_scanner.py", line 34, in top_ports_scanner
with open('../Results/ips_discovered', 'r') as h:
IOError: [Errno 2] No such file or directory: '../Results/ips_discovered'

I found that the file /home/pi/WarBerry/warberry/src/core/bypass/static.py has a > in the line:

subprocess.call("sudo netdiscover -i %s -P -l ./src/discover | grep -P -o '([0-9]+.[0-9]+.[0-9]+.[0-9]+).*? ' | grep -P -o '[0-9]+.[0-9]+.[0-9]+.[0-9]+' >../Results/ips_discovered" %ifname, shell = True)

This needs to be removed. Once the > is removed the file can be written as intended. The Line should look like this:

subprocess.call("sudo netdiscover -i %s -P -l ./src/discover | grep -P -o '([0-9]+.[0-9]+.[0-9]+.[0-9]+).*? ' | grep -P -o '[0-9]+.[0-9]+.[0-9]+.[0-9]+' ../Results/ips_discovered" %ifname, shell = True)

Hope this helps. Once I got it running everything seems to work, although I haven't had much of a chance to test it.

Glenn

Video

Please do make a video.....

IOError: [Errno 99] Cannot assign requested address

Traceback (most recent call last):
File "warberry.py", line 445, in
main()
File "warberry.py", line 108, in main
int_ip = iprecon(iface)
File "warberry.py", line 268, in iprecon
int_ip = socket.inet_ntoa(fcntl.ioctl(s.fileno(),0x8915, struct.pack('256s', ifname[:15]))[20:24])
IOError: [Errno 99] Cannot assign requested address

This one is beyond me.

few issues

prob on my end, but.

pi@raspberrypi:~/warberry $ sudo python warberry.py
Traceback (most recent call last):
File "warberry.py", line 57, in
from src.core.enumeration.bluetooth_enum import *
File "/home/pi/warberry/src/core/enumeration/bluetooth_enum.py", line 20, in
from bluetooth import *
ImportError: No module named bluetooth

commented out line 57 of "warberry.py"

File "warberry.py", line 279, in
main()
File "warberry.py", line 121, in main
int_ip = iprecon(iface)
File "/home/pi/warberry/src/core/enumeration/ip_enum.py", line 49, in iprecon
scope_definition(ifname, CIDR)
File "/home/pi/warberry/src/core/enumeration/ip_enum.py", line 71, in scope_definition
with open('../Results/live_ips', 'w') as ip_addresses:
IOError: [Errno 2] No such file or directory: '../Results/live_ips'

banners conflict

banners is an official python package.
If you have installed banners, then your import will load the default version instead of 'your' banners.py.
I suggest you change the name

issue in line 47 of warberry.py

Im getting a weird bug whenever I try to run warberry.
File "warberry.py", line 47, in
from netaddr import *
ImportError: no Module named netaddr

Interface not eth0

If the interface name is not eth0 then the script will fail. It would be nice to be able to set another interface.

ip2address python module not existing

in bootstrap.sh section below, ip2address python module is not found in any repository:

    echo """
        INSTALLING PYTHON PACKAGES...
    """
    pip2 install scapy python-nmap ip2address netaddr optparse-pretty pybluez;

Latest bootstrap.sh run fails with errors.

I had a functioning warberry box put together over a month ago. Since there have been several updates and enhancements made I decided to flash a new image of Raspian Jessie to the sd card. After booting i did an apt-get update and upgrade which passed without incident.

I ran the bootstrap.sh from the Pi directory.

While running the latest bootstrap.sh I had the following errors:

Downloading/unpacking pypcap
Downloading pypcap-1.1.5.tar.gz (44kB): 44kB downloaded
Running setup.py (path:/tmp/pip-build-Iuxkhl/pypcap/setup.py) egg_info for package pypcap
pcap.h not found
Complete output from command python setup.py egg_info:
pcap.h not found

Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-Iuxkhl/pypcap
Storing debug log for failure in /root/.pip/pip.log

/home/pi/WarBerry/Tools/: No such file or directory
tar (child): enum4linux-0.8.9.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
mv: cannot stat ‘enum4linux-0.8.9’: No such file or directory
bootstrap.sh: line 62: cd: /home/pi/WarBerry/Tools: No such file or directory

unhandled IOError exceptions

/resources/network_scanners.py

You use the with open to retrieve files. However, in this example, if no service is found on port 80, no webservers80 will be created in Results. This results in a IOError, No such file or directory.
You will have to catch the exception if you want the script to continue.

nm.scan(hosts=CIDR, arguments='-Pn -T4 -p80 --open') for host in nm.all_hosts(): with open('/home/pi/WarBerry/Results/webservers80', 'a') as webservers80: print('----------------------------------------------------') print bcolors.OKGREEN +(' *** Web Server Found : %s via port 80 ***' % (host)) + bcolors.ENDC webservers80.write('%s\n' %host)

WAF Enumeration crash

Happens on first and subsequent runs. Original RaspBerry, repo is at
commit b80b4e3
Author: SecGroundZero [email protected]
Date: Mon Oct 24 09:47:01 2016 +0000

Also, WAF and Robots_txt running_status printout lines are mixed.

[*] Enumerating WAF on 10.0.0.110
Traceback (most recent call last):
File "warberry.py", line 306, in
main()
File "warberry.py", line 190, in main
waf_enum(iface)
File "/home/pi/WarBerry/warberry/src/core/enumeration/services_enum.py", line 141, in waf_enum
nm.scan(hosts=host, arguments='-Pn -T4 --script http-waf-detect -p80,8080,443,4443,8081,8181,9090 -e ' + iface + '--open -o ../Results/wafed')
File "/usr/lib/python2.7/dist-packages/nmap/nmap.py", line 302, in scan
nmap_err_keep_trace = nmap_err_keep_trace)
File "/usr/lib/python2.7/dist-packages/nmap/nmap.py", line 366, in analyse_nmap_xml_scan
'command_line': dom.getElementsByTagName('nmaprun')[0].getAttributeNode('args').value,
AttributeError: 'NoneType' object has no attribute 'value'

Python dependency list

For the python dependencies, I would do two things:

Create a requirements.txt with all the python modules needed. This would enable to provide a single python installer command e.g.
pip install -r requirements.txt

As was already mentioned by @dyzajash , check python modules at runtime e.g.

python_modules = set(["python-nmap", "netaddr", "ipaddress", "urllib", "urllib2", "requests"])
def check_missing_modules():
    for module in modules:
        try:
            __import__(module)
        except ImportError:
            print_missing(module)

Add packages used for pass-the-hash Win/OsX hack

In order to use the RP3 as proposed in the blogs here and here we need to install some additional packages in the bootstrap.sh script. These (AFAICT) are:

git
screen
sqlite3

and then install the pycrypto python package with pip install pycrypto.

Repository change for tools NMAP

Looks yesterday repositories changed, could you take a look?. Thanks,

pi@WarBerry:~/WarBerry/warberry $ sudo apt-get install nmap
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
ndiff
The following NEW packages will be installed:
ndiff nmap
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 4113 kB of archives.
After this operation, 17.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Err http://mirrordirector.raspbian.org/raspbian/ jessie/main ndiff all 6.47-3
404 Not Found [IP: 5.153.225.207 80]
Err http://mirrordirector.raspbian.org/raspbian/ jessie/main nmap armhf 6.47-3
404 Not Found [IP: 5.153.225.207 80]
E: Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/n/nmap/ndiff_6.47-3_all.deb 404 Not Found [IP: 5.153.225.207 80]

E: Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/n/nmap/nmap_6.47-3_armhf.deb 404 Not Found [IP: 5.153.225.207 80]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Create warberry python package

For better usability and code maintenance please consider:

  • Transforming this script into warberry python package. (For example: based on one of cookiecutter-templates);
  • Add special system user warberry with separated directories. For example:
    • Place tools and results in universal directory /var/warberry/;
    • Make warberry-cli callable from all user accounts (this is where package can help);
  • Integrate installation of package with bootstraping script;

I'd really be happy to help you out closing this issue.

New install more issues

I did 4 fresh installs using the information from the last ticket that you gave me and followed all the "folder issues" suggestions. I'm still not able to run it out of the box.

pi@warberry:~/WarBerry/warberry $ ./warberry.py -H -i eth0
./warberry.py: line 14:
This file is part of the WarBerry tool.
Copyright (c) 2016 Yiannis Ioannides (@sec_groundzero).
https://github.com/secgroundzero/warberry
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
: No such file or directory
./warberry.py: line 18: import: command not found
./warberry.py: line 19: syntax error near unexpected token "scapy.runtime"' ./warberry.py: line 19:logging.getLogger("scapy.runtime").setLevel(logging.ERROR)'

No module named nameservers

Hi

Pretty new in python, however taken the challenge getting warberry running on radxa rock with the armhf release of Ubuntu 14.04.

done the latest git clone

Nearly there - error when running python ./warberry.py -I eth0
Traceback (most recent call last):
File "./warberry.py", line 58, in
from src.core.enumeration.nameservers import *
ImportError: No module named nameservers

Any suggestion how to solve this?
Thanks

problems with python package

i have problems with python package when i use bootstrap.sh

        INSTALLING PYTHON PACKAGES...

Requirement already satisfied (use --upgrade to upgrade): scapy in /usr/lib/python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade): python-nmap in /usr/lib/python2.7/dist-packages
Collecting ipaddress
  Downloading ipaddress-1.0.16-py27-none-any.whl
Collecting netaddr
  Downloading netaddr-0.7.18-py2.py3-none-any.whl (1.5MB)
    100% |████████████████████████████████| 1.5MB 131kB/s 
Collecting optparse-pretty
  Downloading optparse_pretty-0.1.1-py2.py3-none-any.whl
Collecting pybluez
  Downloading PyBluez-0.22.zip (109kB)
    100% |████████████████████████████████| 112kB 1.4MB/s 
Building wheels for collected packages: pybluez
  Running setup.py bdist_wheel for pybluez ... error
  Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-WfMiQb/pybluez/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmprux8uQpip-wheel- --python-tag cp27:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-armv7l-2.7
  creating build/lib.linux-armv7l-2.7/bluetooth
  copying bluetooth/__init__.py -> build/lib.linux-armv7l-2.7/bluetooth
  copying bluetooth/msbt.py -> build/lib.linux-armv7l-2.7/bluetooth
  copying bluetooth/osx.py -> build/lib.linux-armv7l-2.7/bluetooth
  copying bluetooth/ble.py -> build/lib.linux-armv7l-2.7/bluetooth
  copying bluetooth/bluez.py -> build/lib.linux-armv7l-2.7/bluetooth
  copying bluetooth/widcomm.py -> build/lib.linux-armv7l-2.7/bluetooth
  copying bluetooth/btcommon.py -> build/lib.linux-armv7l-2.7/bluetooth
  running build_ext
  building 'bluetooth._bluetooth' extension
  creating build/temp.linux-armv7l-2.7
  creating build/temp.linux-armv7l-2.7/bluez
  arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I./port3 -I/usr/include/python2.7 -c bluez/btmodule.c -o build/temp.linux-armv7l-2.7/bluez/btmodule.o
  In file included from bluez/btmodule.c:20:0:
  bluez/btmodule.h:5:33: fatal error: bluetooth/bluetooth.h: No such file or directory
   #include <bluetooth/bluetooth.h>
                                   ^
  compilation terminated.
  error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for pybluez
  Running setup.py clean for pybluez
Failed to build pybluez
Installing collected packages: ipaddress, netaddr, optparse-pretty, pybluez
  Running setup.py install for pybluez ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-WfMiQb/pybluez/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-C9flAW-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-armv7l-2.7
    creating build/lib.linux-armv7l-2.7/bluetooth
    copying bluetooth/__init__.py -> build/lib.linux-armv7l-2.7/bluetooth
    copying bluetooth/msbt.py -> build/lib.linux-armv7l-2.7/bluetooth
    copying bluetooth/osx.py -> build/lib.linux-armv7l-2.7/bluetooth
    copying bluetooth/ble.py -> build/lib.linux-armv7l-2.7/bluetooth
    copying bluetooth/bluez.py -> build/lib.linux-armv7l-2.7/bluetooth
    copying bluetooth/widcomm.py -> build/lib.linux-armv7l-2.7/bluetooth
    copying bluetooth/btcommon.py -> build/lib.linux-armv7l-2.7/bluetooth
    running build_ext
    building 'bluetooth._bluetooth' extension
    creating build/temp.linux-armv7l-2.7
    creating build/temp.linux-armv7l-2.7/bluez
    arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I./port3 -I/usr/include/python2.7 -c bluez/btmodule.c -o build/temp.linux-armv7l-2.7/bluez/btmodule.o
    In file included from bluez/btmodule.c:20:0:
    bluez/btmodule.h:5:33: fatal error: bluetooth/bluetooth.h: No such file or directory
     #include <bluetooth/bluetooth.h>
                                     ^
    compilation terminated.
    error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-WfMiQb/pybluez/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-C9flAW-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-WfMiQb/pybluez/

When run warberry

sudo ./warberry.py --help
./warberry.py: 14: ./warberry.py: 
This file is part of the WarBerry tool.
Copyright (c) 2016 Yiannis Ioannides (@sec_groundzero).
https://github.com/secgroundzero/warberry
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
: not found
./warberry.py: 18: ./warberry.py: import: not found
./warberry.py: 19: ./warberry.py: Syntax error: word unexpected (expecting ")")

Example Usage options don't work

pi@pi:~/WarBerry/warberry$ sudo python warberry.py -A
Usage: sudo warberry.py [options]
warberry.py: error: no such option: -A

pi@pi:~/WarBerry/warberry$ sudo python warberry.py --attack
Usage: sudo warberry.py [options]
warberry.py: error: --attack option requires an argument

NAC detection

When I insert the WarBerry into the network, the device is detected by the NAC. Once I start the WarBerry software, the NAC cannot detect the device anymore until discovery is completed. Once the WarBerry, enters poisoning mode, the NAC can detect it. How can I configure the WarBerry so the NAC cannot detect it in poisoning mode? What is different while the WarBerry is doing discovery and simply poisoning?

Thanks,

automated install

I had a few issues with bootstrap.sh, so I created an installer that automates the whole process and adds in the options for reporting, 3G, and aircrack. I created a short wiki to describe my changes, but feel free to add them in if you like them.

It seems your bootstrap.sh is missing a few -y commands to help the automation, and does not include the install request for pip. This caused a few failures for me.
apt-get install python-pip -y

Link: https://github.com/itcarsales/warberry

Publish package to PyPI

It'd be great if I could just pip install warberry - you should add a setup.py and publish your package to PyPI!

IOError

I recieve this error when trying to run your python script:

Traceback (most recent call last):
  File "warberry.py", line 283, in <module>
    main()
  File "warberry.py", line 123, in main
    int_ip = iprecon(iface)
  File "/home/pi/Warberry/warberry/src/core/enumeration/ip_enum.py", line 49, in iprecon
    scope_definition(ifname, CIDR)
  File "/home/pi/Warberry/warberry/src/core/enumeration/ip_enum.py", line 71, in scope_definition
    with open('../Results/live_ips', 'w') as ip_addresses:
IOError: [Errno 2] No such file or directory: '../Results/live_ips'

Thanks in advance for the help!

Poison mode fails due to wrong directory path Tools/Responder

In default mode, after enumeration poison mode fails to start due to wrong directory path.
Responder is directly under WarBerry, not in Tools/Responder.

Traceback (most recent call last):
File "warberry.py", line 304, in
main()
File "warberry.py", line 248, in main
poison(iface, poison_time)
File "/home/pi/WarBerry/warberry/src/core/exploits/responder_poison.py", line 24, in poison
subprocess.call('sudo timeout %s python Responder.py -I %s' %(poison_time, iface), cwd=r'../Tools/Responder/', shell=True)
File "/usr/lib/python2.7/subprocess.py", line 522, in call
return Popen(_popenargs, *_kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 710, in init
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory: '../Tools/Responder/'

Feature Request: network based daemon

I was thinking how this could become more practical, to use quickly and out of the box, without having to configure anything, without having to start the script manually.

I was thinking of the following flow

  1. A process handeling script (daemon) is started at boot time.
  2. When the network goes up (/etc/network/if-up.d) a start function is called on the daemon
  3. When the network goes down (/etc/network/if-up.d) a stop function is called on the daemon.

Any thoughts?

Another feature request is to create a subdirectories in the Results folder, with a timestamp. This would allow easy re-use without having to harvest/clean data between 2 tests.

NAMESERVER ENUMERATION MODULE (broken)

OS:
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 8.0 (jessie)
Release: 8.0
Codename: jessie

warberry version: 4c1e

This does not appear to generate any stats. This is all I see in the result file, 'Doing NBT name scan for addresses from 10.10.10.0/24'. When the command is run manually:
`
pi@raspberrypi:~/WarBerry/Tools $ sudo nbtscan -r 10.10.10.0/24
Doing NBT name scan for addresses from 10.10.10.0/24

Failed to bind: Address already in use
I have checked there I cannot find another process using this port:
pi@raspberrypi:/WarBerry/Results $ lsof -i :137
pi@raspberrypi:
/WarBerry/Results $
`

Responder subprocess not killed

When you kill the main thread, the Responder.py process launched as a subprocess, will not be killed. This is because the parameter shell=True will make it detach from it's parent threat. Not really sure how to properly implement though.

Use specified network interface with nmap

Nmap should use the same network interface the script uses. Right now, when I connect the Pi via LAN cable, nmap still tries to use wlan0 for scanning. You can specify an interface with the -e option of nmap, which should be used in the warberry scripts.

My current problem is that Nmap does not work well with the integrated WiFi on the Rpi3, but since the Pi is connected directly, it should use eth0.

Error No such file or directory: '..Results/dns'

I get the following crash on version 4.0c under sudo.

  [ OS ENUMERATION MODULE ]

[] Enumerating OS on xxx.xxx.xxx.xxx
[
] Enumerating OS on xxx.xxx.xxx.xxx
[] Enumerating OS on xxx.xxx.xxx.xxx
[
] Enumerating OS on xxx.xxx.xxx.xxx
[] Enumerating OS on xxx.xxx.xxx.xxx
[
] Enumerating OS on xxx.xxx.xxx.xxx
[+] Done! Results saved in /Results/os_enum
Traceback (most recent call last):
File "warberry.py", line 297, in
main()
File "warberry.py", line 224, in main
zone_transfers(CIDR)
File "/opt/WarBerry/warberry/src/core/enumeration/zones.py", line 32, in zone_transfers
if os.stat('../Results/dns').st_size != 0:
OSError: [Errno 2] No such file or directory: '../Results/dns'

What am I missing?

Thanks,

Possible compatibility with Sense HAT? (suggestion)

Think about it, the Sense HAT has an 8x8 RGB LED Matrix that could be possibly used to signal what exactly is going on. Something like this paired up with with WarBerry could tell us When it would be OK to disconnect the WarBerry (like when it responder.py activates) This would be extremely useful in case someone didn't have something like this. I dunno its just a theory, weather or not it can actually be doable is a mystery to me because I don't have one, yet.

Wifi

Nice work mate, I haven't dug into this but an error comes up trying to leverage wifi. Pulled the latest commit, Pi3 running Jesse , tried both wlan1 associated and unassociated and both up and down
Script start:
sudo python warberry.py -I wlan1 (also tried wlan0)

Error:
Interface wlan1 seems to be down. Try Running with -I to specify an interface
Traceback (most recent call last):
File "warberry.py", line 283, in
main()
File "warberry.py", line 123, in main
int_ip = iprecon(iface)
File "/home/pi/warberry/src/core/enumeration/ip_enum.py", line 42, in iprecon
netmask = socket.inet_ntoa(fcntl.ioctl(socket.socket(socket.AF_INET, socket.SOCK_DGRAM), 35099, struct.pack('256s', ifname))[20:24])
IOError: [Errno 99] Cannot assign requested address

IWCONFIG:

wlan1 unassociated Nickname:"WIFI@REALTEK"
Mode:Auto Frequency=2.412 GHz Access Point: Not-Associated
Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

Any thoughts?
Thanks again

latest bootstrap.sh run produces errors and fails.

I had a functioning warberry box put together over a month ago. Since there have been several updates and enhancements made I decided to flash a new image of Raspian Jessie to the sd card. After booting i did an apt-get update and upgrade which passed without incident.

I ran the bootstrap.sh from the Pi directory.

While running the latest bootstrap.sh I had the following errors:

Downloading/unpacking pypcap
Downloading pypcap-1.1.5.tar.gz (44kB): 44kB downloaded
Running setup.py (path:/tmp/pip-build-Iuxkhl/pypcap/setup.py) egg_info for package pypcap
pcap.h not found
Complete output from command python setup.py egg_info:
pcap.h not found

Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-Iuxkhl/pypcap
Storing debug log for failure in /root/.pip/pip.log

/home/pi/WarBerry/Tools/: No such file or directory
tar (child): enum4linux-0.8.9.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
mv: cannot stat ‘enum4linux-0.8.9’: No such file or directory
bootstrap.sh: line 62: cd: /home/pi/WarBerry/Tools: No such file or directory

I noticed the WarBerry directory is not in the Pi directory but in the Home directory and i cannot find the warberry dir or the warberry.py file anywhere.

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.