ernw / ss7MAPer

SS7 MAP (pen-)testing toolkit. DISCONTINUED REPO, please use: https://github.com/0xc0decafe/ss7MAPer/
https://c0decafe.de/git/ss7MAPer.git/
BSD 3-Clause "New" or "Revised" License
453 stars 183 forks source link

builds, binaries, docker image not working #27

Closed portato closed 6 years ago

portato commented 6 years ago

OS: Ubuntu 16.04.3 LTS - Xenial

Trying to run the: Docker, I get: ss7maper_1 And it continues trying to reconnect and failing

Trying to run the binaries, i get: ss7maper_2 And it continues trying to reconnect and failing

Trying to follow the script provided here I get:

USER@USER-PC-UBUNTU:~/Projects$ git clone https://github.com/ernw/ss7MAPer
Cloning into 'ss7MAPer'...
remote: Counting objects: 129, done.
remote: Total 129 (delta 0), reused 0 (delta 0), pack-reused 129
Receiving objects: 100% (129/129), 51.58 MiB | 542.00 KiB/s, done.
Resolving deltas: 100% (66/66), done.
Checking connectivity... done.
USER@USER-PC-UBUNTU:~/Projects$ cd ss7MAPer
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer$ rebar get-deps
==> rel (get-deps)
==> ss7MAPer (get-deps)
Pulling osmo_ss7 from {git,"git://git.osmocom.org/erlang/osmo_ss7/","master"}
Cloning into 'osmo_ss7'...
Pulling osmo_sccp from {git,"git://git.osmocom.org/erlang/osmo_sccp/",
                            "master"}
Cloning into 'osmo_sccp'...
Pulling osmo_map from {git,"git://git.osmocom.org/erlang/osmo_map/","master"}
Cloning into 'osmo_map'...
==> rel (get-deps)
==> osmo_ss7 (get-deps)
Pulling epcap from {git,"git://git.osmocom.org/erlang/epcap","master"}
Cloning into 'epcap'...
==> epcap (get-deps)
Pulling pkt from {git,"git://github.com/msantos/pkt.git","master"}
Cloning into 'pkt'...
==> pkt (get-deps)
==> osmo_sccp (get-deps)
==> osmo_map (get-deps)
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer$ cd deps/osmo_map
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer/deps/osmo_map$ patch -p1 < ../../patches/osmo_map.patch
patching file asn1/MAP-Contracts.asn
patching file ebin/osmo_map.app
patching file rebar.config
patching file src/map_dlg_server.erl
patching file src/map_helper.erl
patching file src/map_ss_server.erl
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer/deps/osmo_map$ cd ../osmo_sccp
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer/deps/osmo_sccp$ patch -p1 < ../../patches/osmo_sccp.patch
patching file ebin/osmo_sccp.app
patching file rebar.config
patching file src/osmo_sccp_tcap.erl
patching file src/sccp_scrc.erl
patching file src/sccp_user.erl
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer/deps/osmo_sccp$ cd ../osmo_ss7
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer/deps/osmo_ss7$ patch -p1 < ../../patches/osmo_ss7.patch
patching file include/osmo_ss7.hrl
patching file include/sccp.hrl
patching file src/m3ua_codec.erl
patching file src/m3ua_core.erl
patching file src/sccp_codec.erl
patching file src/sctp_core.erl
patching file src/ss7_link_m3ua.erl
patching file src/ss7_links.erl
patching file src/ss7_routes.erl
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer/deps/osmo_ss7$ cd ../../
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer$ sed -i 's/DRV_CFLAGS/CFLAGS/g' deps/epcap/rebar.config
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer$ sed -i 's/DRV_LDFLAGS/LDFLAGS/g' deps/epcap/rebar.config
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer$ cd deps
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer/deps$ git clone http://cgit.osmocom.org/erlang/signerl/
Cloning into 'signerl'...
Checking connectivity... done.
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer/deps$ cd signerl/TCAP/asn_src/ITU
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer/deps/signerl/TCAP/asn_src/ITU$ make
erlc  -W -b ber_bin +optimize +debug_info Remote-Operations-Information-Objects.asn Remote-Operations-GenUSER-ROS-PDUs.asn Remote-Operations-Useful-Definitions.asn
Warning: The option 'ber_bin' is now called 'ber'.
Warning: The option 'optimize' is no longer needed.
Warning: The option 'ber_bin' is now called 'ber'.
Warning: The option 'optimize' is no longer needed.
Warning: The option 'ber_bin' is now called 'ber'.
Warning: The option 'optimize' is no longer needed.
erlc  -W -b ber_bin +optimize +debug_info TCAPMessages.asn
Warning: The option 'ber_bin' is now called 'ber'.
Warning: The option 'optimize' is no longer needed.
erlc  -W -b ber_bin +optimize +debug_info TR.asn
Warning: The option 'ber_bin' is now called 'ber'.
Warning: The option 'optimize' is no longer needed.
erlc -b beam -W -v +warn_unused_vars +debug_info -o ../../ebin/itu TR.erl
TR.erl:58: Warning: variable 'Reason' is unused
TR.erl:72: Warning: variable 'Reason' is unused
TR.erl:663: Warning: variable 'Arg' is unused
erlc  -W -b ber_bin +optimize +debug_info TC.asn
Warning: The option 'ber_bin' is now called 'ber'.
Warning: The option 'optimize' is no longer needed.
erlc -b beam -W -v +warn_unused_vars +debug_info -o ../../ebin/itu TC.erl
TC.erl:72: Warning: variable 'Reason' is unused
TC.erl:86: Warning: variable 'Reason' is unused
TC.erl:887: Warning: variable 'Arg' is unused
erlc -b beam -W -v +warn_unused_vars +debug_info -o ../../ebin/itu TCAPMessages.erl
TCAPMessages.erl:58: Warning: variable 'Reason' is unused
TCAPMessages.erl:72: Warning: variable 'Reason' is unused
TCAPMessages.erl:491: Warning: variable 'Arg' is unused
erlc  -W -b ber_bin +optimize +debug_info DialoguePDUs.asn
Warning: The option 'ber_bin' is now called 'ber'.
Warning: The option 'optimize' is no longer needed.
erlc -b beam -W -v +warn_unused_vars +debug_info -o ../../ebin/itu DialoguePDUs.erl
DialoguePDUs.erl:72: Warning: variable 'Reason' is unused
DialoguePDUs.erl:86: Warning: variable 'Reason' is unused
DialoguePDUs.erl:998: Warning: variable 'Arg' is unused
erlc  -W -b ber_bin +optimize +debug_info UnidialoguePDUs.asn
Warning: The option 'ber_bin' is now called 'ber'.
Warning: The option 'optimize' is no longer needed.
erlc -b beam -W -v +warn_unused_vars +debug_info -o ../../ebin/itu UnidialoguePDUs.erl
UnidialoguePDUs.erl:54: Warning: variable 'Reason' is unused
UnidialoguePDUs.erl:68: Warning: variable 'Reason' is unused
UnidialoguePDUs.erl:395: Warning: variable 'Arg' is unused
erlc  -W -b ber_bin +optimize +debug_info TC-TMP.asn
Warning: The option 'ber_bin' is now called 'ber'.
Warning: The option 'optimize' is no longer needed.
erlc  -W -b ber_bin +optimize +debug_info TC-Testing-User.asn
Warning: The option 'ber_bin' is now called 'ber'.
Warning: The option 'optimize' is no longer needed.
erlc -b beam -W -v +warn_unused_vars +debug_info -o ../../ebin/itu TC-Testing-User.erl
TC-Testing-User.erl:277: Warning: variable 'Arg' is unused
erlc  -W -b ber_bin +optimize +debug_info TCAP-Examples.asn
Warning: The option 'ber_bin' is now called 'ber'.
Warning: The option 'optimize' is no longer needed.
erlc -b beam -W -v +warn_unused_vars +debug_info -o ../../ebin/itu TCAP-Examples.erl
TCAP-Examples.erl:78: Warning: variable 'Reason' is unused
TCAP-Examples.erl:92: Warning: variable 'Reason' is unused
TCAP-Examples.erl:524: Warning: variable 'Arg' is unused
erlc  -W -b ber_bin +optimize +debug_info TCAP-Tools.asn
Warning: The option 'ber_bin' is now called 'ber'.
Warning: The option 'optimize' is no longer needed.
erlc -b beam -W -v +warn_unused_vars +debug_info -o ../../ebin/itu TCAP-Tools.erl
TCAP-Tools.erl:57: Warning: variable 'Reason' is unused
TCAP-Tools.erl:71: Warning: variable 'Reason' is unused
TCAP-Tools.erl:263: Warning: variable 'Arg' is unused
rm TC.erl
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer/deps/signerl/TCAP/asn_src/ITU$ cd ../../../../..
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer$ cp deps/signerl/TCAP/asn_src/ITU/*rl deps/osmo_sccp/src/
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer$ mkdir deps/epcap/deps
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer$ ln -sd ../../pkt deps/epcap/deps/pkt
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer$ mkdir deps/osmo_sccp/deps
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer$ ln -sd ../../osmo_ss7 deps/osmo_sccp/deps/osmo_ss7
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer$ ln -sd ../../epcap deps/osmo_sccp/deps/epcap
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer$ ln -sd ../../pkt deps/osmo_sccp/deps/pkt
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer$ ln -sd ../../signerl/MAP deps/osmo_sccp/deps/MAP
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer$ ln -sd ../../signerl/SCCP deps/osmo_sccp/deps/SCCP
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer$ ln -sd ../../signerl/TCAP deps/osmo_sccp/deps/TCAP
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer$ mkdir deps/osmo_map/deps
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer$ ln -sd ../../osmo_ss7 deps/osmo_map/deps/osmo_ss7
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer$ ln -sd ../../epcap deps/osmo_map/deps/epcap
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer$ ln -sd ../../pkt deps/osmo_map/deps/pkt
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer$ cp deps/signerl/SCCP/itu/include/sccp.hrl deps/osmo_sccp/src/
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer$ cp deps/signerl/TCAP/include/tcap.hrl deps/osmo_map/src/
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer$ rebar co
==> pkt (compile)
Compiled src/pkt_ipv4.erl
Compiled src/pkt_ipv6_esp.erl
Compiled src/pkt_ipv6_hopopts.erl
Compiled src/pkt_ipproto.erl
Compiled src/pkt_ipv6_ah.erl
Compiled src/pkt_vrrp.erl
Compiled src/pkt_llc.erl
Compiled src/pkt_ipv6_fragment.erl
Compiled src/pkt_gre.erl
Compiled src/pkt_udp.erl
Compiled src/pkt_icmp6.erl
Compiled src/pkt_tcp.erl
Compiled src/pkt_ether.erl
Compiled src/pkt_802_1q.erl
Compiled src/pkt_igmp.erl
Compiled src/pkt_linux_cooked.erl
Compiled src/pkt_dlt.erl
Compiled src/pkt_arp.erl
Compiled src/pkt_icmp.erl
Compiled src/pkt_ipv6.erl
Compiled src/pkt_ipv6_dstopts.erl
Compiled src/pkt_lldp.erl
Compiled src/pkt_mpls.erl
Compiled src/pkt_ipv6_routing.erl
Compiled src/pkt_sctp.erl
Compiled src/pkt_rarp.erl
Compiled src/pkt_null.erl
Compiled src/pkt.erl
==> epcap (compile)
Compiled src/epcap.erl
Compiled src/epcap_net.erl
Compiled src/sniff.erl
Compiling /home/USER/Projects/ss7MAPer/deps/epcap/c_src/epcap.c
In file included from /home/USER/Projects/ss7MAPer/deps/epcap/c_src/epcap.c:34:0:
c_src/epcap.h:42:18: fatal error: pcap.h: No such file or directory
compilation terminated.
ERROR: compile failed while processing /home/USER/Projects/ss7MAPer/deps/epcap: rebar_abort
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer$ ^C
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer$ 

I go on despite the error and get:

USER@USER-PC-UBUNTU:~/Projects/ss7MAPer$ cd rel/
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer/rel$ rebar create-node nodeid=ss7MAPer
==> rel (create-node)
Writing files/erl
Writing files/nodetool
Writing files/ss7MAPer
Writing files/sys.config
Writing files/vm.args
Writing files/ss7MAPer.cmd
Writing files/start_erl.cmd
Writing files/install_upgrade.escript
ERROR: One or more files already exist on disk and were not generated:
    * "reltool.config"
To force overwriting, specify -f/--force/force=1 on the command line.
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer/rel$ cd ..
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer$ rebar generate
==> rel (generate)
ERROR: Unable to generate spec: read file info /usr/lib/erlang/man/man1/gcov-tool.1.gz failed
ERROR: Unexpected error: rebar_abort
ERROR: generate failed while processing /home/USER/Projects/ss7MAPer/deps/osmo_ss7/rel: rebar_abort
USER@USER-PC-UBUNTU:~/Projects/ss7MAPer$ 

I'm completely new to this (even ubuntu). Any help/insight/comments would be appreciated

0xc0decafe commented 6 years ago

well.... i guess there is no SIGTRAN endpoint running at 127.0.0.1:2905/sctp. From your screenshots, everything else is working fine. You need a SIGTRAN peer that works as your STP (it'll be your uplink into the ss7 network).

best