UPDATE IN PROGRESS ! nov 4 2019

In this post we will see how to make a base station with two motorola compatible phones C 115/118/123 and two cables usb serial jack 2.5mm PL2303

OS: kali rolling 2018.1

VMware or virtualbox : with the VM you can jump directly to running without install software Prebuilt VM (2018.1): HERE Virtual Machine (v2) Don’t double click on the kali-linux-2018.1-vbox-amd64.ova file but it is Kali-Linux-2018.1-vbox-amd64-disk001.vmdk which had to be selected manually in vbox hd I have made the mistake to let the blank kali vm in the zip sorry i must change that there is to much people who as asking me You will have osmocombb at the root folder then. For data support HERE CalypsoBTS GPRS Testing For installation simplified HERE Ansible installation

First step : build the toolchain
To get it more quickly go HERE

https://m.youtube.com/watch?feature=youtu.be&v=TJNY1FW2Lxc

# nano /etc/apt/sources.list
add
deb http://deb.debian.org/debian/ jessie main

# apt install gcc-4.8 g++-4.8
#nano /etc/apt/sources.list

comment kali sana
#apt-get update && apt-get upgrade
# apt-get install build-essential libgmp-dev libx11-6 libx11-dev flex libncurses5 libncurses5-dev libncursesw6 libpcsclite-dev zlib1g-dev libmpfr4 libmpc3 lemon aptitude libtinfo-dev libtool shtool autoconf git-core pkg-config make libmpfr-dev libmpc-dev libtalloc-dev libfftw3-dev libgnutls28-dev libssl1.0-dev libtool-bin libxml2-dev sofia-sip-bin libsofia-sip-ua-dev sofia-sip-bin libncursesw5-dev bison libgmp3-dev alsa-oss
# update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 4
# update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 7
# update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 4
# update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 7
# update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 10
# update-alternatives --set cc /usr/bin/gcc
# update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 10
# update-alternatives --set c++ /usr/bin/g++
# update-alternatives --config gcc
# update-alternatives --config g++

(choose 4.8)
# apt remove texinfo
# cd /root
# wget http://ftp.gnu.org/gnu/texinfo/texinfo-4.13.tar.gz
# gzip -dc < texinfo-4.13.tar.gz | tar -xf -
# cd texinfo-4.13
# ./configure
# make
# make install
# git clone https://github.com/axilirator/gnu-arm-installer.git gnuarm
# cd gnuarm

Run this scripts:
# ./download.sh
# ./build.sh
# export PATH=$PATH:/root/gnuarm/install/bin

Now you have cross-compiler ready

https://m.youtube.com/watch?v=RIXVYi3dHc4&feature=youtu.be
# cd /root
# git clone git://git.osmocom.org/libosmocore.git
# cd libosmocore
# autoreconf -i
# ./configure
# make
# make install
# ldconfig
# cd ..
# git clone git://git.osmocom.org/libosmo-dsp.git
# cd libosmo-dsp
# autoreconf -i
# ./configure
# make
# make install
# cd ..
# git clone https://github.com/osmocom/osmocom-bb trx
cd trx
# git checkout jolly/testing
# git clone https://github.com/bbaranoff/osmocombb-patch
# cd osmocombb-patch
# git checkout jolly/testing_patch
# patch -p1 < stdint.patch
# cd src
# nano target/firmware/Makefile

It needs TX support Just uncomment ‘CFLAGS += -DCONFIG_TX_ENABLE
# make HOST_layer23_CONFARGS=--enable-transceiver
# cd /root
#git clone https://github.com/bastienbaranoff/imsi-catcher
Asterisk version (1.8.13.1) :
# nano /etc/apt/sources.list
comment kali rolling and add
deb http://old.kali.org/kali moto main non-free contrib

# apt update
# apt install asterisk-dev
# wget https://downloads.asterisk.org/pub/telephony/asterisk/old-releases/asterisk-1.8.13.1.tar.gz && gzip -dc < asterisk-1.8.13.1.tar.gz | tar -xf -
# cd /root/asterisk-1.8.13.1
# nano /root/asterisk-1.8.13.1/main/tcptls.c
ctrl-W SSLv3
and change cfg->ssl_ctx = SSL_CTX_new(SSLv3_client_method()), by cfg->ssl_ctx = SSL_CTX_new(SSLv23_client_method());

#./configure
# make
nano /root/asterisk-1.8.13.1~dfsg1/include/asterisk/buildopts.h


change
#define AST_BUILDOPT_SUM "print mode: md5sum <file> <file
check mode: md5sum >
by
#define AST_BUILDOPT_SUM "print mode: md5sum <file> <file check mode: md5sum >

# make
# make install

# nano /etc/apt/sources.list


https://m.youtube.com/watch?feature=youtu.be&v=_J9xRnbYO0A
comment kali moto and uncomment kali rolling
# apt-get update

# apt install asn1c libdbd-sqlite3 asterisk
# git clone git://git.osmocom.org/osmo-hlr
# git clone git://git.osmocom.org/libasn1c
# git clone git://git.osmocom.org/libosmo-sccp
# git clone git://git.osmocom.org/osmo-msc
# git clone git://git.osmocom.org/osmo-mgw
# git clone git://git.osmocom.org/osmo-ggsn
# git clone git://git.osmocom.org/osmo-sgsn
# git clone git://git.osmocom.org/osmo-iuh
# git clone git://git.osmocom.org/osmo-bsc
# git clone git://git.osmocom.org/osmo-bts
# git clone git://git.osmocom.org/osmo-pcu
For each in this order do the following
# autoreconf -fi
# ./configure
execption for libosmo-ggsn
./configure --enable-gtp-linux
# make -j8
# make install
# ldconfig
Then
# git clone https://github.com/bbaranoff/osmonitb
# chmod +x osmo-all
# chmod +x second_dhclient.sh
# chmod +x tun.sh
# cd osmonitb
# cp -r . /etc/osmocom/.
# cp hlr.db /var/lib/osmocom/hlr.db
# cd /usr/share/doc/asterisk-config/examples/configs/basic-pbx/
# gunzip *.gz
# for i in $( ls *.sample ); do mv $i $(basename $i .sample); done
# cp -r /usr/share/doc/asterisk-config/examples/configs/samples/. /etc/asterisk/.
# cd ~/osmonitb
# cp sip.conf /etc/asterisk/.
#cp extensions.conf /etc/asterisk/.
# ./second_dhclient.sh eth0
Replace eth0 with your network interface
# ./tun.sh
# ./osmo-all start
Check with
# ./osmo-all status
And stop with
# ./osmo-all stop


Downloadopen-core-amr

# tar xvzf opencore-amr-0.1.5.tar.gz
# cd opencore-amr-0.1.5
# ./configure
# make
# sudo make install
# sudo ldconfig

mISDN
# rm -Rf /lib/modules/$(uname -r)/kernel/drivers/isdn/hardware/mISDN
# rm -Rf /lib/modules/$(uname -r)/kernel/drivers/isdn/mISDN/
# depmod -a
# apt-get install git build-essential libtool autoconf automake linux-headers-4.15.0-kali2-all-amd64
# git clone https://github.com/ISDN4LINUX/mISDN
# git clone https://github.com/ISDN4LINUX/mISDNuser
# git clone https://github.com/bbaranoff/mISDN_patch
# git clone https://github.com/bbaranoff/osmocombb-ansible
# cd mISDN
# patch -p1 ../mISDN/mISDN.patch
# patch -p1 ../mISDN_patch/mISDNuser.patch

As of Debian 8.5, there is an automake version mismatch, fix it via:
# aclocal; automake --add-missing
# ./configure
# cp /root/osmocombb-ansible/mISDN.cfg.default standalone/mISDN.cfg
# make modules
# make modules_install
# depmod -a
# cd ../mISDNuser
# make
# ./configure
# make
# make install
# cd example
# make
# cd
# git clone https://github.com/fairwaves/lcr
# cd lcr
# autoreconf -i
# ./configure --with-sip --with-gsm-bs --with-gsm-ms --with-asterisk
code># make
# make install
# ldconfig
# cp chan_lcr.so /usr/lib/asterisk/modules/
# cd ../imsi-catcher


Place ~/imsi-catcher/asterisk folder in /etc
Place interface.conf, routing.conf and options.conf folder in /usr/local/etc/lcr
Place osmo-bts.cfg and open-bsc.cfg in /root/.osmocom
Change in /etc/asterisk/sip.conf with your sip provider login and pass (ex diamondcard)


# apt-get install alsa-oss
# modprobe snd_pcm_oss
# modprobe snd_mixer_oss
# modprobe mISDN_core
# modprobe mISDN_dsp

RUNNING !!!

https://m.youtube.com/watch?feature=youtu.be&v=mK9NA_s-vHs
First search strong rssi
# cd trx/src/
# sudo host/osmocon/osmocon -m c123xor -p /dev/ttyUSB0 -c target/firmware/board/compal_e88/rssi.highram.bin
Ctrl-C remove and put the battery
Shell #1
# cd trx/src/
# host/osmocon/osmocon -m c123xor -p /dev/ttyUSB0 -s /tmp/osmocom_l2 -c target/firmware/board/compal_e88/trx.highram.bin -r 99

Shell #2
# cd trx/src/host/osmocon/osmocon -m c123xor -p /dev/ttyUSB1 -s /tmp/osmocom_l2.2 -c target/firmware/board/compal_e88/trx.highram.bin -r 99

Shell #3
# cd trx/src/host/layer23/src/transceiver/
# sudo ./transceiver -a [YOUR ARFCN FOUND WITH RSSI] -2 -r 99

shell #4
# cd osmonitb
# ./second_dhclient.sh eth0
Replace eth0 with your network interface
# ./tun.sh
# ./osmo-all start
Check with
# ./osmo-all status
And stop with
# ./osmo-all stop


Shell #4
# osmo-nitb -c ~/.osmocom/open-bsc.cfg -l ~/.osmocom/hlr.sqlite3 -P -m -C --debug=DRLL:DCC:DMM:DRR:DRSL:DNM


Shell #5
# lcr start

Shell #6
# osmo-bts-trx -c ~/.osmocom/osmo-bts.cfg -r 99
Shell #7
#asterisk
#asterisk -rvvvvvv

if you use FTDI cable you have to modify osmocon command by
known problems. In some situations (like, apparently, using FTDI serial cables), you might need the -m c123 mode for your MotorolaC123 instead of the normal -m c123xor see THIS


To make your imsi catcher work you have to change Location Area Code LAC in ~/.osmocom/open-bsc.cfg to fit with a LAC near you you can find it in RSSI app