Quick-Fix for rtpinject.py
Tested on: BackTrack 4 final
Verified that tool is doing it's job: yes
1. Download Dependencies
2. Fix the Sourcecode of dnet.c for the built of libdnet with python
in line 2729 change
Code:
((PyObject*)__pyx_v_next) = Py_None; Py_INCREF(((PyObject*)__pyx_v_next));
to
Code:
(__pyx_v_next) = Py_None; Py_INCREF(((PyObject*)__pyx_v_next));
and in line 2741 change
Code:
((PyObject *)__pyx_v_next) = __pyx_3;
to
Code:
(__pyx_v_next) = __pyx_3;
now install the libdnet with python-support
cd .. # you should be in the /usr/src/rtpinject/libdnet-1.11 folder right now
configure --with-python && make all && make install
now you also need some gstreamer plugins so you are able to inject e.g. a wav-file which then is automaticially converted into rtp-conform speech-payload. if you want to skip this step you have to convert each file you want to inject by hand e.g. with sox. its easier to just make a .wav file with e.g. the windows-audio-recorder and inject it so i suggest you install the plugins
apt-get install gstreamer0.10-plugins-base gstreamer0.10-plugins-good
thats it... now the tool should simply work if you call it from commandline via
cd /pentest/voip/rtpinject/
python rtpinject.py
I tested it and here is a screenie of a successfull attack that i just performed to proof it works.

Hope this will help some ppl and this will get a "cleaner" fix soon ^^
Sometimes you have to restart the tool since the auto-convert function seems a little buggy *maybe because i removed some typecast*
*thx to archangelamael for psychological support + motivation ;D*