블로그 이미지
Flying Mr.Cheon youGom

Recent Comment»

Recent Post»

Recent Trackback»

« 2025/12 »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31

 
 

gsm bts using rasberry pi 3

서버/Python | 2019. 3. 4. 14:18 | Posted by youGom


ref : 

https://www.evilsocket.net/2016/03/31/how-to-build-your-own-rogue-gsm-bts-for-fun-and-profit/


HOW TO BUILD YOUR OWN ROGUE GSM BTS FOR FUN AND PROFIT


The last week I’ve been visiting my friend and colleque Ziggy in Tel Aviv which gave me something I’ve been waiting for almost a year, a brand new BladeRF x40, a low-cost USB 3.0 Software Defined Radio working in full-duplex, meaning that it can transmit and receive at the same time ( while for instance the HackRF is only half-duplex ).

In this blog post I’m going to explain how to create a portable GSM BTS which can be used either to create a private ( and vendor free! ) GSM network or for GSM active tapping/interception/hijacking … yes, with some (relatively) cheap electronic equipment you can basically build something very similar to what the governments are using from years to perform GSM interception.

I’m not writing this post to help script kiddies breaking the law, my point is that GSM is broken by design and it’s about time vendors do something about it considering how much we’re paying for their services.

my bts

Hardware Requirements

In order to build your BTS you’ll need the following hardware:

Software

Let’s start by installing the latest Raspbian image to the micrsd card ( use the “lite” one, no need for UI ;) ), boot the RPI, configure either the WiFi or ethernet and so forth, at the end of this process you should be able to SSH into the RPI.

Next, install a few dependecies we’re gonna need soon:

sudo apt-get install git apache2 php5 bladerf libbladerf-dev libbladerf0 automake

At this point, you should already be able to interact with the BladeRF, plug it into one of the USB ports of the RPI, dmesg should be telling 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

Start the bladeRF-cli utility and issue the version 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

bladeRF>

IMPORTANT Make sure you have these exact versions of the firmware and the FPGA, other versions might not work in our setup.

Download the correct firmware and FPGA image.

Now we’re going to install Yate and YateBTS, two open source softwares that will make us able to create the BTS itself.

Since I spent a lot of time trying to figure out which specific version of each was compatible with the bladeRF, I’ve created a github repository with correct versions of both, so in your RPI home folder just do:

git clone https://github.com/evilsocket/evilbts.git
cd evilbts

Let’s start building both of them:

cd yate
./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

This will take a few minutes, but eventually you’ll have everything installed in your system.

Next, we’ll symlink the NIB web ui into our apache www folder:

cd /var/www/html/
sudo ln -s /usr/local/share/yate/nib_web nib

And grant write permission to the configuration files:

sudo chmod -R a+w /usr/local/etc/yate

You can now access your BTS web ui from your browser:

http://ip-of-your-rpi/nib

Time for some configuration now!

Configuration

Open the /usr/local/etc/yate/ybts.conf file either with 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

You can find valid MCC and MNC values here.

Now, edit the /usr/local/etc/yate/subscribers.conf:

country_code=YOUR_CONTRY_CODE
regexp=.*

WARNING Using the .* regular expression will make EVERY GSM phone in your area connect to your BTS.

In your NIB web ui you’ll see something like this:

NIB

Enable GSM-Tapping

In the “Tapping” panel, you can enable it for both GSM and GPRS, this will basically “bounce” every GSM packet to the loopback interface, since we haven’t configure any encryption, you’ll be able to see all the GSM traffic by simply tcpdump-ing your loopback interface :D

tapping

Start It!

Finally, you can start your new BTS by executing the command ( with the BladeRF plugged in! ) :

sudo yate -s

If everything was configured correctly, you’ll see a bunch of messages and the 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 blinking.

Test It!

Now, phones will start to automatically connect, this will happen because of the GSM implementation itself:

  • You can set whatever MCC, MNC and LAC you like, effectly spoofing any legit GSM BTS.
  • Each phone will search for BTS of its operator and select the one with the strongest signal … guess which one will be the strongest? Yep … ours :D

Here’s a picture taken from my Samsung Galaxy S6 ( using the Network Cell Info Lite app ) which automatically connected to my BTS after 3 minutes:

MyEvilBTS

From now on, you can configure the BTS to do whatever you want … either act as a “proxy” to a legit SMC ( with a GSM/3g USB dongle ) and sniff the unencrypted GSM traffic of each phone, or to create a private GSM network where users can communicate for free using SIP, refer to the YateBTS Wiki for specific configurations.

Oh and of course, if you plug the USB battery, the whole system becomes completely portable :)

References and Further Readings


'서버 > Python' 카테고리의 다른 글

10 Minutes from pandas to Koalas on Apache Spark  (0) 2020.05.07
couchdb basic tutorial  (0) 2020.04.26
tistory api access token 얻는 방법  (0) 2020.04.25
pwn basic in python  (0) 2018.12.11
python file to exe as one file  (0) 2018.11.01
:

https://www.youtube.com/watch?v=2p6twRRXK_o&feature=youtu.be



:

BackTrack5 한글 패치하기

보안 | 2013. 3. 27. 21:04 | Posted by youGom


BackTrack을 우분투 기반이란거 만 빼면 좋아하는편인데 한글이 지원이 안된다

그래서 어떻게 할까 생각하다가 우분투 기반이라는걸 이용해서 한글을 설치 해보려 한다

12.8.26일 현재 스샷은 없다

현재 필자는 KDE 인터페이스를 이용하므로 KDE위주로 포스팅한다



# apt-get update

일단 패키지 업데이트


# apt-get install -y synaptic

시냅틱 패키지 관리자 설치


[ 시작 ] - [ System ] - [ Synaptic Package Manager ] 실행


software-center 검색


찾은 software-center에다 Mark for Installation 해준다

그럼

Mark additional required changes? 라고 하는 창이뜬다

software-center을 설치하기 위해 필요한 것들이다 고로 Mark 클릭한다


그리고 시냅틱 패키지 관리자에 있는 초록색 체크 되어있고 Apply라고 되어있는 버튼을 누른다

그럼 창이 또 하나뜨는데 쿨 하게 Apply눌러준다

설치가 끝이 나면

Automatically close after the changes have been successfully applied 를 체크하고

close 해준다


[ 시작 ] - [ System ] - [ Ubuntu Software Center ] 실행


language support를 검색한다(아마 이까지는 Gnome도 동일 할듯하다)


language support 와 language support-qt가 있는데

설명을 보면 qt는 KDE에 설치하는듯하고 걍 버전은 그놈에 설치하는듯하다

(그리고 [ Favorites ] - [ System setting ] - [ Locale ] 에 가보면

install language-selector-qt to be able to add more languages.

라고 되어있다)


[ Favorites ] - [ System settings ] - [ Locale ]

에 들어가서

우선 Country or region: 에서 change.. 를 누르고

Asia,East 에서  South Korea (Republic of Korea로 해줬음 더 좋았겠다) 를 선택 하고 OK를 누른다

그리고 맨 밑에 있는 install new language를 클릭한다

그리고 Korean 을 클릭 한다

그리고 다음 다음 다음 누르면 설치가 끝난다 ㅋㅋㅋ


그리고 select system language 를 눌러서 한국어를 눌러준다

이때 nabi 한글을 선택하면 세부 설정에서 한영 키로 한영 전환을 할 수 있다

딴건 해봤는데 shift + space 조합으로 밖에 안되더라;;

그리고 마지막으로 apply 를 눌러주면 끝~~~


완전 적용되려면 로그아웃후 다시 로그인해야된다


그리고 다시 로그인 하면 작업 표시줄에 나비 비슷하기도 한것이 있다

그걸 오른쪽 클릭하고 기본설정을 누른다

그런다음 한글탭에서 한영 전환키에 추가 버튼을 누른후 창이하나뜨면

본인의 키보드에 한영 버튼을 누른다

이로서 한영키로 한영전환을 할 수 있게 된다

근데 참 아쉽게도 이것도 로그아웃 했다가 다시들어와야 적용된다 ㅋㅋㅋ


포스팅 끝~




원문:
http://neoray.tistory.com/245


'보안' 카테고리의 다른 글

reverse shell ssh  (0) 2023.05.14
[CURL] linux에서 활용하기  (0) 2014.11.28
[보안/교육] 아카데미 사이트  (0) 2013.07.18
: