-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Fix GTP_U_Header binds #2010
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix GTP_U_Header binds #2010
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2010 +/- ##
==========================================
- Coverage 85.97% 84.06% -1.91%
==========================================
Files 189 188 -1
Lines 43071 42864 -207
==========================================
- Hits 37029 36033 -996
- Misses 6042 6831 +789
|
On "gtpbind" branch I do get errors on using scapy commands but tried same on "Master" with no errors. Please check the detailed info as below. thanks !!
a) git clone https://github.com/gpotter2/scapy.git Running gtp.py will not result in any action ( no scapy terminal) sudo python gtp.py I had to add following code , end of "gtp.py" file , to make it run if name == "main": c) scapy command results in error error !! send(IP(src="100.100.100.1", dst="100.100.100.81")/UDP(sport=2152,dport=2152)/GTP_U_Header(TEID=9999)/IP(src="1.1.1.1", dst="2.2.2.2")/UDP(sport=1111,dport=2222),inter=0.01,count=10) Traceback (most recent call last):
sudo python gtp.py send(IP(src="100.100.100.1", dst="100.100.100.81")/UDP(sport=2152,dport=2152)/GTP_U_Header(TEID=9999)/IP(src="1.1.1.1", dst="2.2.2.2")/UDP(sport=1111,dport=2222),inter=0.01,count=10) . |
|
More Info In Details,
b) https://github.com/secdev/scapy/blob/master/scapy/contrib/gtp.py a) Running "sudo python gtp.py" does not result in anything , is this correct way ? asingh@Linux-Client: b) had to add following code to make it run, not sure of its correct way if name == "main": asingh@Linux-Client:
ayp ayyyyyyySCP//Pp syY//C | Version 2.4.3rc1.dev128 c) Error on running scapy commands, send(IP(src="100.100.100.1", dst="100.100.100.81")/UDP(sport=2152,dport=2152)/GTP_U_Header(TEID=9999)/IP(src="1.1.1.1", dst="2.2.2.2")/UDP(sport=1111,dport=2222),inter=0.01,count=10) Traceback (most recent call last): a) Running "sudo python gtp.py" does not result in anything , is this correct way ? asingh@Linux-Client: asingh@Linux-Client:~/scapy/scapy/contrib$ sudo python gtp.py b) had to add following code to make it run, not sure of its correct way if name == "main": asingh@Linux-Client:~/gtpbind/scapy/scapy/contrib$ sudo python gtp.py
ayp ayyyyyyySCP//Pp syY//C | Version 2.4.3rc1.dev128 GTPv1 add-on c) Error on running scapy commands, send(IP(src="100.100.100.1", dst="100.100.100.81")/UDP(sport=2152,dport=2152)/GTP_U_Header(TEID=9999)/IP(src="1.1.1.1", dst="2.2.2.2")/UDP(sport=1111,dport=2222),inter=0.01,count=10) Traceback (most recent call last): 4)git clone https://github.com/cisco-system-traffic-generator/trex-core.git a)Running "sudo python gtp.py" results in scapy session asingh@Linux-Client:~/trex-core/trex-core/scripts/external_libs/scapy-2.3.1/python3/scapy/contrib$ sudo python gtp.py WARNING: IPython not available. Using standard Python shell instead.
ayp ayyyyyyySCP//Pp syY//C | Version 2.4.3rc1.dev128 GTPv1 add-on send(IP(src="100.100.100.1", dst="100.100.100.81")/UDP(sport=2152,dport=2152)/GTP_U_Header(TEID=9999)/IP(src="1.1.1.1", dst="2.2.2.2")/UDP(sport=1111,dport=2222),inter=0.01,count=10) .......... |
I had no idea of the existence of Again, you need to rename |
Great ! thanks for that info.....after changing "TEID" to "teid" my scapy commands are working fine , but I still see the same error of inner packets are not recognize as GTPU-U packets ( wireshark still shows data.... ) .I'm using https://github.com/gpotter2/scapy/blob/gtpbind/scapy/contrib/gtp.py.Any suggestions ? Command: Outer IPv4 and Inner IPv6 --> Wireshark does not !!! recognize it as GTP packets. (Wireshark just treats it as data.. ) send(IP(src="100.100.100.1", dst="100.100.100.81")/UDP(sport=2152,dport=2152)/GTP_U_Header(teid=9999)/IPv6(src="2002::101:101:101:1", dst="2002::102:102:102:1")/UDP(sport=1111,dport=2222),inter=0.01,count=100) |
Also ,
if name == "main":
sudo python gtp.py Is this correct way ? or am i missing something ? |
Hi Gabriel, any luck with this bug? thanks ! |
It works fine for me
|
thanks for sharing that info , let me give a try again ! Also , just to make sure I had to add following code , end of "gtp.py" file , to make it run for scapy commands Run the gtp file Is this correct way ? or am i missing something ? If you could please share the steps , that would be really helpful to verify this bug. thanks ! |
You're making gtp.py a standalone module. You can do that. It's equivalent to starting Scapy and |
Thanks. I'm starting fresh on new ubuntu setup , What are the steps I need to perform to run scapy command , after cloning following link,
thanks ! |
Question:
STEPS: Step1: git clone https://github.com/gpotter2/scapy.git Run Command: Traceback (most recent call last): |
You forgot |
Hi Gabriel. thank you ! so much , for helping on this bug , really appreciate your efforts. I'm able to see GTP-U Inner IPv6 scenarios..in wireshark. Here are the steps , Step1: git clone https://github.com/secdev/scapy.git Run Command: |
This PR: