Giter Site home page Giter Site logo

Comments (22)

secgroundzero avatar secgroundzero commented on August 18, 2024

This means eth0 is down or no cable attached

Sent from my iPhone

On May 30, 2016, at 6:28 PM, Tim Dowker [email protected] wrote:

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.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

from warberry.

TimDowker avatar TimDowker commented on August 18, 2024

Hmmm, that's weird cuz I'm ssh-ed into it right now.

ifconfig output below

eth0 Link encap:Ethernet HWaddr aa:bb:bb:dd:ee:ff
inet addr:130.15.159.164 Bcast:130.15.159.255 Mask:255.255.255.0
inet6 addr: fe80::18aa:3d65:5fa:694c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:14341 errors:0 dropped:0 overruns:0 frame:0
TX packets:3790 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1190094 (1.1 MiB) TX bytes:255376 (249.3 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:264 errors:0 dropped:0 overruns:0 frame:0
TX packets:264 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:21840 (21.3 KiB) TX bytes:21840 (21.3 KiB)

from warberry.

secgroundzero avatar secgroundzero commented on August 18, 2024

Ok the problem comes from the fact that your ip is 130.

The script is checking to see if the ip is 192. 10. Etc,

The new release will cover that to get all valid internal IPs.

Does the script recognizes that your ip is valid or invalid?

Sent from my iPhone

On May 30, 2016, at 6:51 PM, Tim Dowker [email protected] wrote:

Hmmm, that's weird cuz I'm ssh-ed into it right now.

ifconfig output below

eth0 Link encap:Ethernet HWaddr aa:bb:bb:dd:ee:ff
inet addr:130.15.159.164 Bcast:130.15.159.255 Mask:255.255.255.0
inet6 addr: fe80::18aa:3d65:5fa:694c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:14341 errors:0 dropped:0 overruns:0 frame:0
TX packets:3790 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1190094 (1.1 MiB) TX bytes:255376 (249.3 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:264 errors:0 dropped:0 overruns:0 frame:0
TX packets:264 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:21840 (21.3 KiB) TX bytes:21840 (21.3 KiB)


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

from warberry.

TimDowker avatar TimDowker commented on August 18, 2024

[!] Invalid IP obtained. Checking if we can bypass with static IP.

from warberry.

secgroundzero avatar secgroundzero commented on August 18, 2024

Ok that makes sense. Add your IP prefix in warberry_py under internal_ip_recon and let me know how it goes

Sent from my iPhone

On May 30, 2016, at 6:59 PM, Tim Dowker [email protected] wrote:

[!] Invalid IP obtained. Checking if we can bypass with static IP.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

from warberry.

TimDowker avatar TimDowker commented on August 18, 2024

not sure where that file is?

from warberry.

secgroundzero avatar secgroundzero commented on August 18, 2024

Its the main warberry.py script you are running

Sent from my iPhone

On May 30, 2016, at 7:15 PM, Tim Dowker [email protected] wrote:

not sure where that file is?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

from warberry.

TimDowker avatar TimDowker commented on August 18, 2024

Ok, so i've searched high and low for the section you mentioned and the only reference I can find to "internal_ip_recon" is the following

  elif argv == '-T' or argv == '--toptcp':
        subprocess.call('clear', shell = True)
        banner()
        int_ip = internal_IP_recon('eth0')
        netmask = netmask_recon('eth0')
        print external_IP_recon()
        CIDR = subnet(int_ip, netmask)
        scanner_top(CIDR)
        print bcolors.TITLE + "All scripts completed. Check the /Results directory" + bcolors.ENDC
    elif argv == '-B' or argv == '--tcpudp':
        subprocess.call('clear', shell = True)
        banner()
        int_ip = internal_IP_recon('eth0')
        netmask = netmask_recon('eth0')
        print external_IP_recon()
        CIDR = subnet(int_ip, netmask)
        scanner_full(CIDR)
        print bcolors.TITLE + "All scripts completed. Check the /Results directory" + bcolors.ENDC
    elif argv == '-F' or argv == '--fulltcp':
        subprocess.call('clear', shell = True)
        banner()
        int_ip = internal_IP_recon('eth0')
        netmask = netmask_recon('eth0')
        print external_IP_recon()
        CIDR = subnet(int_ip, netmask)
        scanner_tcp_full(CIDR)
        print bcolors.TITLE + "All scripts completed. Check the /Results directory" + bcolors.ENDC

how exactly do I add my IP prefix here?

from warberry.

secgroundzero avatar secgroundzero commented on August 18, 2024

No here check line 200 in the same file

On May 30, 2016, at 8:47 PM, Tim Dowker [email protected] wrote:

Ok, so i've searched high and low for the section you mentioned and the only reference I can find to "internal_ip_recon" is the following

elif argv == '-T' or argv == '--toptcp':
subprocess.call('clear', shell = True)
banner()
int_ip = internal_IP_recon('eth0')
netmask = netmask_recon('eth0')
print external_IP_recon()
CIDR = subnet(int_ip, netmask)
scanner_top(CIDR)
print bcolors.TITLE + "All scripts completed. Check the /Results directory" + bcolors.ENDC
elif argv == '-B' or argv == '--tcpudp':
subprocess.call('clear', shell = True)
banner()
int_ip = internal_IP_recon('eth0')
netmask = netmask_recon('eth0')
print external_IP_recon()
CIDR = subnet(int_ip, netmask)
scanner_full(CIDR)
print bcolors.TITLE + "All scripts completed. Check the /Results directory" + bcolors.ENDC
elif argv == '-F' or argv == '--fulltcp':
subprocess.call('clear', shell = True)
banner()
int_ip = internal_IP_recon('eth0')
netmask = netmask_recon('eth0')
print external_IP_recon()
CIDR = subnet(int_ip, netmask)
scanner_tcp_full(CIDR)
print bcolors.TITLE + "All scripts completed. Check the /Results directory" + bcolors.ENDC
how exactly do I add my IP prefix here?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

from warberry.

TimDowker avatar TimDowker commented on August 18, 2024

Same thing.

line 200 equals

    if ("192." or "172." or "10." or "130.") in int_ip:

| | | |/ _ \ | ___ \ ___ \ | ___ \ ___ \ \ / /
| | | / /
\ | |
/ / |
/ / |__ | |/ / |/ /\ V /
| |/| | _ || /| ___ \ || /| / \ /
\ /\ / | | || |\ | |/ / |
| |\ | |\ \ | |
/ /| |/_| __//| __| _| _/

        TACTICAL EXPLOITATION

v1.2 @sec_groundzero

  [ DHCP SERVICE CHECK MODULE ]

  [ IP ENUMERATION MODULE ]

[!] Invalid IP obtained. Checking if we can bypass with static IP.

  [ STATIC IP SETUP MODULE ]

ARP Scanning Network for IPs

Testing validity of 8 IP(s)captured
[-] 130.15.159.227 is invalid
[-] 130.15.159.40 is invalid
[-] 130.15.159.24 is invalid
[-] 130.15.159.181 is invalid
[-] 130.15.159.46 is invalid
[-] 130.15.159.1 is invalid
[-] 130.15.159.149 is invalid
[-] 130.15.159.206 is invalid

Creating CIDRs based on IPs captured

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

from warberry.

secgroundzero avatar secgroundzero commented on August 18, 2024

Change also line 140 in rest_bypass script. This script in in the resources folder.

This still remains a bug to be fixed but the above should get you going for now.

On May 30, 2016, at 8:51 PM, Tim Dowker [email protected] wrote:

Same thing.

line 200 equals

if ("192." or "172." or "10." or "130.") in int_ip:

| | | |/ _ \ | ___ \ ___ \ | __ \ ___ \ \ / /
| | | / /\ | |/ / |/ / |_ | |/ / |/ /\ V /
| |/| | _ || /| ___ \ || /| / \ /
\ /\ / | | || |\ | |/ / || |\ | |\ \ | |
/ /_| |/| ___
/___/| __| _| _/

    TACTICAL EXPLOITATION

v1.2 @sec_groundzero

[ DHCP SERVICE CHECK MODULE ]

[ IP ENUMERATION MODULE ]
[!] Invalid IP obtained. Checking if we can bypass with static IP.

[ STATIC IP SETUP MODULE ]
ARP Scanning Network for IPs

Testing validity of 8 IP(s)captured
[-] 130.15.159.227 is invalid
[-] 130.15.159.40 is invalid
[-] 130.15.159.24 is invalid
[-] 130.15.159.181 is invalid
[-] 130.15.159.46 is invalid
[-] 130.15.159.1 is invalid
[-] 130.15.159.149 is invalid
[-] 130.15.159.206 is invalid

Creating CIDRs based on IPs captured

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


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

from warberry.

TimDowker avatar TimDowker commented on August 18, 2024

Still the same error

Line 140 in rest_bypass script is

                    if ("192.168." or "172." or "10." or "130.") in ip:

Error reads

v1.2 @sec_groundzero

  [ DHCP SERVICE CHECK MODULE ]

  [ IP ENUMERATION MODULE ]

[!] Invalid IP obtained. Checking if we can bypass with static IP.

  [ STATIC IP SETUP MODULE ]

ARP Scanning Network for IPs

Testing validity of 5 IP(s)captured
[-] 130.15.159.1 is invalid
[-] 130.15.159.24 is invalid
[-] 130.15.159.132 is invalid
[-] 130.15.159.157 is invalid
[-] 130.15.159.112 is invalid

Creating CIDRs based on IPs captured

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

from warberry.

secgroundzero avatar secgroundzero commented on August 18, 2024

Very strange. Please allow me some time to investigate.

On May 30, 2016, at 9:19 PM, Tim Dowker [email protected] wrote:

Still the same error

Line 140 in rest_bypass script is

                if ("192.168." or "172." or "10." or "130.") in ip:

Error reads

v1.2 @sec_groundzero

[ DHCP SERVICE CHECK MODULE ]

[ IP ENUMERATION MODULE ]
[!] Invalid IP obtained. Checking if we can bypass with static IP.

[ STATIC IP SETUP MODULE ]
ARP Scanning Network for IPs

Testing validity of 5 IP(s)captured
[-] 130.15.159.1 is invalid
[-] 130.15.159.24 is invalid
[-] 130.15.159.132 is invalid
[-] 130.15.159.157 is invalid
[-] 130.15.159.112 is invalid

Creating CIDRs based on IPs captured

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


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

from warberry.

Cabalist avatar Cabalist commented on August 18, 2024

I may have some fixes to this and other issues. I'll submit a pull request in about an hour

from warberry.

Cabalist avatar Cabalist commented on August 18, 2024

The fix is included in my Pull Request

in rest_bypass.create_subnet() if int_ip is empty CIDR wouldn't be set. I just defined it as an empty string before the for loop.

You can see it here:
https://github.com/Cabalist/warberry/blob/py3-work/resources/rest_bypass.py#L124

from warberry.

secgroundzero avatar secgroundzero commented on August 18, 2024

The reason for your issue is because 130. is not considered a valid IP address.

The valid ranges are the following:
10.0.0.0 - 10.255.255.255
172.16.0.0 - 172.31.255.255
192.168.0.0 - 192.168.255.255

did you statically set it?

from warberry.

secgroundzero avatar secgroundzero commented on August 18, 2024

the CIDR should not be defined as empty as this will cause other scans to fail as the CIDR will not be populated correctly.

from warberry.

secgroundzero avatar secgroundzero commented on August 18, 2024

no responses received. closing this issue

from warberry.

TimDowker avatar TimDowker commented on August 18, 2024

ummm, soooo...... guess I can't use warberry.....

from warberry.

secgroundzero avatar secgroundzero commented on August 18, 2024

Try to set your IP to some other range. Please check wikipedia for the valid internal IP space

On Jun 1, 2016, at 3:18 PM, Tim Dowker [email protected] wrote:

ummm, soooo...... guess I can't use warberry.....


You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or mute the thread.

from warberry.

TimDowker avatar TimDowker commented on August 18, 2024

Ok, shame, trying to use this for some pen testing in an enterprise environment that doesn't use an internal IP address scheme

from warberry.

secgroundzero avatar secgroundzero commented on August 18, 2024

You can bypass the validate ip function then.

Sent from my iPhone

On Jun 1, 2016, at 4:37 PM, Tim Dowker [email protected] wrote:

Ok, shame, trying to use this for some pen testing in an enterprise environment that doesn't use an internal IP address scheme


You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or mute the thread.

from warberry.

Related Issues (20)

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.