<div dir="ltr"><div><div>Thank you very much!!<br><br></div>I will have some work getting through this, but I recon I'll have some more questions later. <br><br></div>Again thank you<br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-03-01 12:39 GMT+01:00 Neels Hofmeyr <span dir="ltr"><<a href="mailto:nhofmeyr@sysmocom.de" target="_blank">nhofmeyr@sysmocom.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tue, Mar 01, 2016 at 11:12:01AM +0100, Terje Kristoffer Hybbestad Skow wrote:<br>
> The "logfile /tmp/foo" did gave an error message saying "unrecognized<br>
> option".<br>
<br>
</span>It seems the logfile option was added on 2014-03-23 with commit<br>
9c0ff4fafe4276396125a52c89d36967566fe08c. It may make sense if you build<br>
your osmocom stack from the git sources to benefit from the latest fixes.<br>
<br>
See <a href="http://git.osmocom.org" rel="noreferrer" target="_blank">http://git.osmocom.org</a>, specifically you'd probably want to clone and build<br>
<br>
git://<a href="http://git.osmocom.org/libosmocore" rel="noreferrer" target="_blank">git.osmocom.org/libosmocore</a><br>
git://<a href="http://git.osmocom.org/openggsn" rel="noreferrer" target="_blank">git.osmocom.org/openggsn</a><br>
<br>
The build steps being for example<br>
<br>
   autoreconf -fi<br>
   ./configure<br>
   make<br>
   sudo make install<br>
<span class=""><br>
<br>
> I'm going to look at DNS packets going through a GGSN to try and find ways<br>
> to detect DNS tunnels, do you have any recommendations how to do this?<br>
> I do not have the time or resources to use real UE's so I hope to simulate<br>
> it on a computer using VMs or something like that.<br>
<br>
> I have looked at this: <a href="http://openbsc.osmocom.org/trac/wiki/OpenBSC_GPRS" rel="noreferrer" target="_blank">http://openbsc.osmocom.org/trac/wiki/OpenBSC_GPRS</a> as<br>
<br>
</span>The BTS is for communicating with a phone over the air interface. Abis and<br>
osmo-nitb are used for voice calls only. The SGSN is needed for real networks,<br>
you should be fine with the sgsnemu. So all you need is sgsnemu and openggsn.<br>
<br>
You want to figure out how to use the sgsnemu, starting with a route into the<br>
tunnel device that sgsnemu opens up. So you need to look at the 'ip route'<br>
commands (if you're on linux). I guess you won't need VMs; granted, it might<br>
make it easier to avoid circular routes (to IP addresses that should only be<br>
seen on the GGSN side), but certainly not a necessary prerequisite.<br>
<br>
I tried to ping through the sgsnemu tunnel once but saw, as I mentioned, that<br>
the GGSN thwarts GTP messages without a proper context being created first. It<br>
shouldn't be too hard, but I haven't investigated further. So you'd want to<br>
understand the GTP Ctrl & User messages to setup a PGP context (TEIs and<br>
stuff), and figure out how sgsnemu might make your life easier in that regard.<br>
You probably want to read ETSI 29.060 to figure out GTP:<br>
<a href="http://www.etsi.org/deliver/etsi_ts/129000_129099/129060/03.19.00_60/ts_129060v031900p.pdf" rel="noreferrer" target="_blank">http://www.etsi.org/deliver/etsi_ts/129000_129099/129060/03.19.00_60/ts_129060v031900p.pdf</a><br>
You may find attached pcap file interesting (open in wireshark and note that<br>
the DNS queries are transmitted over GTP between SGSN and GGSN even though<br>
wireshark tends to show only the DNS and src/dest enclosed in the GTP).<br>
And again, you may look at<br>
<a href="http://git.osmocom.org/openbsc/tree/openbsc/tests/gtphub/gtphub_test.c" rel="noreferrer" target="_blank">http://git.osmocom.org/openbsc/tree/openbsc/tests/gtphub/gtphub_test.c</a><br>
about simplistic code examples of composing a PGP context conversation.<br>
<br>
If you'd like any more answers to questions you didn't ask ;)<br>
just give us a shout...<br>
<div class="HOEnZb"><div class="h5"><br>
~Neels<br>
<br>
--<br>
- Neels Hofmeyr <<a href="mailto:nhofmeyr@sysmocom.de">nhofmeyr@sysmocom.de</a>>          <a href="http://www.sysmocom.de/" rel="noreferrer" target="_blank">http://www.sysmocom.de/</a><br>
=======================================================================<br>
* sysmocom - systems for mobile communications GmbH<br>
* Alt-Moabit 93<br>
* 10559 Berlin, Germany<br>
* Sitz / Registered office: Berlin, HRB 134158 B<br>
* Geschäftsführer / Managing Directors: Holger Freyther, Harald Welte<br>
</div></div></blockquote></div><br></div>