LSX-blog

Feed Rss

【原创】OsmocomBB 之SMS Sniffer

11.27.2013, DIY, Linux, by .

本文大部分是按照官方的步骤直接经过试验并总结的 http://bb.osmocom.org/trac/wiki/Software/GettingStarted

必备的条件

  • 简单的英文阅读能力
  • linux环境 最好是apt-get 包管理方式的(像KaliUbuntuDebian、ArchLinux)在虚拟机中运行和物理机都没有关系,推荐ubuntu 12.04 X64位,记得使用64位,这样你可以使用我编译好的精简包,就可以不用下面的长时间编译了。
  • 交叉编译环境(具体是什么可以问度娘)
  • 手机C118 或者 C139
  • CP2102模块一个
  • 耳机插头一个

    安装相关环境

    一、安装依赖包

    1
    
    sudo apt-get -y install libtool shtool autoconf git-core pkg-config make gcc

    二、安装libosmocore源码包

     

    1
    2
    3
    4
    5
    6
    7
    8
    9
    
    $ cd /opt
    $ git clone git://git.osmocom.org/libosmocore.git
    $ cd libosmocore/ 
    $ autoreconf -i 
    $ ./configure 
    $ make 
    $ sudo make install
    $ ldconfig
    $ cd ..

    以上步骤完成后,如果你不想进行下面复杂的编译步骤可以下载编译好的精简版本,但请注意这个只适应64位

    三、精简版本使用(使用精简版本不需要再执行四五步骤)

    osmocom-bb.tar.gz

    下载好,直接传到你机器上面的/opt目录解压,直接使用后可以看后面的章节 补充内容后面的内容了

    四、安装交叉编译环境

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    
    $ cd /opt
    $ mkdir GnuArmToolchain
    $ cd GnuArmToolchain
    $ wget http://bb.osmocom.org/trac/raw-attachment/wiki/\
    GnuArmToolchain/gnu-arm-build.2.sh
    $ chmod +x gnu-arm-build.2.sh
    $ sudo apt-get -y install build-essential libgmp3-dev libmpfr-dev libx11-6 \
    libx11-dev texinfo flex bison libncurses5 libncurses5-dbg libncurses5-dev \
    libncursesw5 libncursesw5-dbg libncursesw5-dev zlibc zlib1g-dev \
    libmpfr4 libmpc-dev
    $ mkdir build install src
    $ cd src/
    $ wget http://ftp.gnu.org/gnu/gcc/gcc-4.5.2/gcc-4.5.2.tar.bz2
    $ wget http://ftp.gnu.org/gnu/binutils/binutils-2.21.1a.tar.bz2
    $ wget ftp://sources.redhat.com/pub/newlib/newlib-1.19.0.tar.gz
    $ cd ..
    $ ./gnu-arm-build.2.sh 
    I will build an arm-elf cross-compiler:
     
      Prefix: /install
      Sources: /src
      Build files: /build
     
    Press ^C now if you do NOT want to do this.

    按任意键编译 完成之后添加以下环境变量到~/.bashrc

     

    1
    
    export PATH=$PATH:/opt/GnuArmToolchain/install/bin

    如果你是ubuntu 直接执行如下命令后重起

    1
    
    sudo bash -c 'echo "export PATH=$PATH:/opt/GnuArmToolchain/install/bin" > /etc/bash.bashrc'

    五、安装osmocom-bb

    如果你准备打上255错误补丁请看http://blog.lishixin.net/archives/1393这个文章

    并在git checkout –track origin/luca/gsmmap这一步后面,用文章中的补丁文件覆盖同

    名文件即可,解决在运行中经常出现255的错误,当然这一步并不是必须的

    1
    2
    3
    4
    5
    6
    
    $ cd /opt
    $ git clone git://git.osmocom.org/osmocom-bb.git
    $ cd osmocom-bb
    $ git checkout --track origin/luca/gsmmap
    $ cd src  
    $ make

    补充内容(只做参照,无需操作)

    摘自:http://www.blogjava.net/baicker/archive/2013/11/13/406293.html ######################################################### 另:Sylvain/burst_ind分支是网上说的比较多的带sniffer功能的分支,但是编译完无法刷固件,需要修改osmocom-bb/src/host/osmocon/osmocon.c,文件中添加定义 #define I_HAVE_A_CP210x 否则会出现“Unable to set custom baudrate, please use appropriate cable”,即使这里通过了我刷了还是不行。 ok,我们使用luca/gsmmap分支, GsmMap项目使用osmocom-bb项目所支持的手机通过捕捉GSM数据,对应地理位置;然后用户上传后被分析,结果会被展示在项目主页上的地图上。 该项目的主要目标是建立GSM网络的地理分布,然后分析 伪造,拦截和跟踪的可能性,会在官网上披露GSM的安全性。 官方提供一个自己的LiveCD,基于Debian,木有xWindow,参加项目的可以傻瓜化的使用并且抓包,用VirtualBOX或者VMware载入,开机后记得把osmocom-bb所用的C1**系列手机和数据线连到虚拟机,然后按照提示输入gsm即可开始。 默认编译出的版本发送信号相关的功能是被注释掉的,用mobile启动layer23后会一直于搜信号的过程中,因为无法发送信号。 如果需要进行实网测试需要打开src/target/firmware/Makefile文件中的编译开关 把osmocom-bb/src/target/firmwire/下的Makefile中的 CONFIG_TX_ENABLE宏打开: # Uncomment this line if you want to enable Tx (Transmit) Support. -#CFLAGS +=-DCONFIG_TX_ENABLE +CFLAGS +=-DCONFIG_TX_ENABLE 然后到src目录下编译 cd src make layer1和src/host/layer23/src/mobile/mobile程序,实现了从layer1到layer3的功能,我们主要用layer1,rssi是用来测试信号的,不同的信道信号强度等等一些相关信息,需要配合chainload或loader刷入,这几个应用详细说明在这里:http://bb.osmocom.org/trac/wiki/Applications image #########################################################

    六、模块连接

    QQ截图20140112204320

    经过上面几步,固件及程序以前躺在那里等着你了,下面就是使用它们了 第一步,将CP2102模块插入电脑USB  如果你是虚拟机请看如下图 image 这个是把模块连接到虚拟机中 登陆linux操作系统运行如下命令

    1
    
    $ lsusb

    出现如下图,说明连接成功 image 第二步,刷固件

     

    1
    
    $ cd /opt/osmocom-bb/src/host/osmocon/

    然后再点击开机键,记得是点击,不是开机,像点鼠标那样

     

    1
    2
    
    $ ./osmocon -m c123xor -p /dev/ttyUSB0 ../../target/firmware/board/\
    compal_e88/layer1.compalram.bin

    如果你已经硬刷了C118,直接运行以下命令既可,然后再点击开机键,记得是点击,不是开机,像点鼠标那样

    1
    
    $ ./osmocon

    输出如下结果 image 说明成功刷入 另看一个窗口打描基站信号(注意参数是大写的字母O(欧))

    1
    2
    
    $ cd /opt/osmocom-bb/src/host/layer23/src/misc
    $ ./cell_log -O

    出现下图后,找一个PWR绝对值在75以下的,绝对值越低表明信号越强,为下一步ccch_scan -a的参数做准备 1 找个ARFCN通道 ccch_scan扫描

    1
    
    $ ./ccch_scan -i 127.0.0.1 -a 110

    出现下图表明运行正常可能还会有红色字符产生,屏幕有源源不断的数据滚动表示正常 2 再打开一窗口运行

    1
    
    wireshark -k -i lo -f 'port 4729'

    image uplink只有换过芯片的才可以抓取到 

【原创】OsmocomBB 之SMS Sniffer 有 238 条回应

  1. Wow, fantastic blog layout! How long have you been blogging for? you make blogging look easy. The overall look of your website is wonderful, as well as the content!| а

    回复
  2. Thanks in favor of sharing such a pleasant thought, post is nice, thats why i have read it fully| а

    回复
  3. What’s up, yes this piece of writing is genuinely fastidious and I have learned lot of things from it on the topic of blogging. thanks.| а

    回复
  4. Why viewers still make use of to read news papers when in this technological world everything is accessible on web?| а

    回复
  5. Incredible! This blog looks exactly like my old one! It’s on a completely different topic but it has pretty much the same page layout and design. Great choice of colors!| а

    回复
  6. Hello, its pleasant post on the topic of media print, we all understand media is a great source of information.| а

    回复
  7. Greetings! I’ve been reading your weblog for some time now and finally got the bravery to go ahead and give you a shout out from New Caney Texas! Just wanted to mention keep up the great work!| а

    回复
  8. Lovely information. Kudos. [url=https://ciaonlinebuyntx.com/]Cialis Urine Retention[/url]

    回复
  9. Hi Dear, are you genuinely visiting this website daily, if so afterward you will absolutely take good knowledge.| а

    回复
  10. Good day I am so delighted I found your blog, I really found you by mistake, while I was researching on Askjeeve for something else, Regardless I am here now and would just like to say thanks a lot for a remarkable post and a all round thrilling blog (I also love the theme/design), I don’t have time to read through it all at the moment but I have book-marked it and also added in your RSS feeds, so when I have time I will be back to read a great deal more, Please do keep up the fantastic work.| а

    回复
  11. I’m truly enjoying the design and layout of your site. It’s a very easy on the eyes which makes it much more pleasant for me to come here and visit more often. Did you hire out a designer to create your theme? Fantastic work!| а

    回复
  12. You can certainly see your expertise in the work you write. The world hopes for more passionate writers such as you who aren’t afraid to mention how they believe. Always follow your heart.| а

    回复
  13. Howdy just wanted to give you a brief heads up and let you know a few of the images aren’t loading properly. I’m not sure why but I think its a linking issue. I’ve tried it in two different web browsers and both show the same outcome.| а

    回复
  14. whoah this blog is excellent i love studying your articles. Stay up the good work! You recognize, a lot of people are looking round for this info, you can help them greatly. | а

    回复
  15. Greetings! Very helpful advice in this particular article! It’s the little changes that make the largest changes. Many thanks for sharing!| а

    回复
  16. You’re so cool! I do not suppose I’ve read something like this before. So nice to discover another person with genuine thoughts on this topic. Seriously.. many thanks for starting this up. This website is one thing that is required on the internet, someone with some originality!| а

    回复
  17. Way cool! Some extremely valid points! I appreciate you writing this post plus the rest of the site is very good.| а

    回复
  18. I know this if off topic but I’m looking into starting my own blog and was wondering what all is needed to get set up? I’m assuming having a blog like yours would cost a pretty penny? I’m not very internet smart so I’m not 100% certain. Any recommendations or advice would be greatly appreciated. Many thanks| а

    回复
  19. Great beat ! I wish to apprentice while you amend your site, how can i subscribe for a blog site? The account aided me a acceptable deal. I had been a little bit acquainted of this your broadcast provided bright clear concept| а

    回复
  20. Hi there! I know this is kind of off topic but I was wondering which blog platform are you using for this site? I’m getting fed up of WordPress because I’ve had issues with hackers and I’m looking at alternatives for another platform. I would be awesome if you could point me in the direction of a good platform.

    回复
  21. An interesting discussion is worth comment. I believe that you ought to publish more about this issue, it might not be a taboo subject but typically people do not talk about these issues. To the next! All the best!!| а

    回复
  22. Hello, Neat post. There’s an issue with your web site in web explorer, might test this? IE nonetheless is the market leader and a large section of folks will pass over your great writing because of this problem.| а

    回复
  23. If some one desires expert view concerning blogging and site-building afterward i recommend him/her to pay a visit this webpage, Keep up the fastidious job.| а

    回复
  24. Hi, i believe that i noticed you visited my website so i got here to return the want?.I’m attempting to in finding issues to enhance my site!I guess its good enough to use some of your ideas!!| а

    回复
  25. After I originally commented I appear to have clicked the -Notify me when new comments are added- checkbox and from now on every time a comment is added I recieve four emails with the same comment. There has to be an easy method you can remove me from that service? Many thanks!| а

    回复
  26. I visited multiple sites however the audio feature for audio songs current at this site is really marvelous.| а

    回复
  27. I’d like to thank you for the efforts you’ve put in writing this website. I’m hoping to check out the same high-grade content by you later on as well. In truth, your creative writing abilities has inspired me to get my own blog now ;)| а

    回复
  28. Hello, always i used to check weblog posts here early in the morning, for the reason that i enjoy to find out more and more.| а

    回复
  29. Woah! I’m really enjoying the template/theme of this blog. It’s simple, yet effective. A lot of times it’s very difficult to get that “perfect balance” between usability and visual appeal. I must say you have done a awesome job with this. Additionally, the blog loads super fast for me on Firefox. Excellent Blog!| а

    回复
  30. I am really impressed with your writing skills as well as with the layout on your blog. Is this a paid theme or did you customize it yourself? Anyway keep up the nice quality writing, it’s rare to see a great blog like this one these days.| а

    回复
  31. Hello to every single one, it’s really a fastidious for me to pay a visit this site, it includes precious Information.| а

    回复
  32. We stumbled over here coming from a different web address and thought I might check things out. I like what I see so now i am following you. Look forward to looking over your web page again.| а

    回复
  33. I’m gone to inform my little brother, that he should also pay a visit this blog on regular basis to get updated from hottest information.| а

    回复
  34. Cheers! Useful information! [url=https://canadianonlinepharmacytrust.com/]online pharmacy[/url]

    回复
  35. Seriously a good deal of valuable facts! [url=https://canadianpharmaceuticalsonlinerx.com/]northwest pharmacy[/url]

    回复
  36. Truly tons of excellent knowledge. [url=https://canadianpharmacyntv.com/]canadianpharmacy[/url]

    回复
  37. I could not refrain from commenting. Exceptionally well written!| а

    回复
  38. Quality content is the crucial to attract the people to pay a quick visit the website, that’s what this website is providing.| а

    回复
  39. I’m really enjoying the design and layout of your site. It’s a very easy on the eyes which makes it much more pleasant for me to come here and visit more often. Did you hire out a developer to create your theme? Superb work!| а

    回复
  40. When some one searches for his required thing, therefore he/she wants to be available that in detail, so that thing is maintained over here.| а

    回复
  41. If you are going for finest contents like I do, just pay a quick visit this web site every day because it gives feature contents, thanks| а

    回复
  42. continuously i used to read smaller articles that also clear their motive, and that is also happening with this piece of writing which I am reading now.| а

    回复
  43. Amazing! Its in fact amazing article, I have got much clear idea concerning from this piece of writing.| а

    回复
  44. Wow, fantastic blog structure! How lengthy have you been blogging for? you made blogging look easy. The overall look of your site is fantastic, let alone the content material! а

    回复
  45. Good blog you have here.. It’s difficult to find quality writing like yours nowadays. I truly appreciate individuals like you! Take care!!| а

    回复
  46. Nice blog here! Also your site loads up very fast! What web host are you using? Can I get your affiliate link to your host? I wish my web site loaded up as quickly as yours lol| а

    回复
  47. We are a group of volunteers and opening a brand new scheme in our community. Your web site provided us with helpful info to work on. You’ve done an impressive task and our whole neighborhood will be thankful to you.| а

    回复
  48. I have read so many articles or reviews on the topic of the blogger lovers except this piece of writing is in fact a fastidious paragraph, keep it up.| а

    回复
  49. I like the valuable info you provide in your articles. I’ll bookmark your weblog and check again here frequently. I’m quite certain I’ll learn a lot of new stuff right here! Best of luck for the next!| а

    回复

Berita Unik进行回复 取消回复

电子邮件地址不会被公开。 必填项已用*标注