LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 10-11-2005, 05:02 AM   #1
sti2envy
Member
 
Registered: Sep 2004
Posts: 43

Rep: Reputation: 15
Manipulating SIP msg string


I am using a VoIP provider using SIP signalling for setup, i know that they restricted logins based on your user-agent string. Which means I have to use their hardware/softphone. I'm quite keen to run X-lite from xten on mac osx, or even kphone or similiar on linux, but as there any tool or way in linux i can manipulate the user-agent field string in the msgs? Thanks
 
Old 10-11-2005, 05:43 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
First thing comes to mind is "netsed".
 
Old 10-12-2005, 04:28 AM   #3
sti2envy
Member
 
Registered: Sep 2004
Posts: 43

Original Poster
Rep: Reputation: 15
thanks unspawn. I download rpm for fedora core 4 version netsed 0.01b. I used the command to run it listening to udp port

netsed udp 5060 serveriphere 5060 's/kphone/X-Pro/1'
netsed 0.01b by Michal Zalewski <lcamtuf@ids.pl>[*] Parsing rule s/kphone/X-Pro/1...
[+] Loaded 1 rules...
[-] Error: cannot listen on the socket (strange)
netsed: exiting.

I find that it fails to listen to any udp ports, but i can listen to tcp ports...

any ideas why? are there any other progs like netsed that can do the job for me?

Last edited by sti2envy; 10-12-2005 at 04:29 AM.
 
Old 10-12-2005, 06:35 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Error: cannot listen on the socket
Check w netstat: prolly your app to be using it for incoming requests. Choose different local port for rerouting through Netsed. If you can't redirect traffic, check README for transparent proxying.
 
Old 10-12-2005, 05:46 PM   #5
sti2envy
Member
 
Registered: Sep 2004
Posts: 43

Original Poster
Rep: Reputation: 15
Did you try your version to listen to any UDP port? Mine just doesnt work..so I checked his source code and found some parts of it were hard coded to use TCP functions..eg. using accept() instead of recvfrom() method for UDP. What version of netsed are you running if it works listening to any UDP port? So after changing the source code, this is what I'm getting:

./netsed udp 5060 someip 5060 s/3700/1600/1
netsed 0.01b by Michal Zalewski <lcamtuf@ids.pl>[*] Parsing rule s/3700/1600/1...
[+] Loaded 1 rules...
[+] Listening on port 5060/udp.
[+] Using fixed forwarding to someip:5060.
[+] Got incoming connection from 127.0.0.1:33211 to 127.0.0.1:33211[*] Forwarding connection to someip:5060
[-] Client or server disconnect (14168).
[+] Got incoming connection from 127.0.0.1:33211 to 127.0.0.1:33211[*] Forwarding connection to someip:5060
[-] Client or server disconnect (14211).
[+] Got incoming connection from 127.0.0.1:33211 to 127.0.0.1:33211[*] Forwarding connection to someip:5060
[-] Client or server disconnect (14215).

I'm going to double check if it actually replaces the strings in my rules.

Last edited by sti2envy; 10-12-2005 at 05:49 PM.
 
Old 10-12-2005, 07:52 PM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Did you try your version to listen to any UDP port?
No.


Mine just doesnt work..so I checked his source code and found some parts of it were hard coded to use TCP functions..eg. using accept() instead of recvfrom() method for UDP.
Great. I'm sure Lcamtuf will accept your patch.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sip fakie_flip Linux - Software 0 10-16-2005 09:25 PM
Sip+ Serweb erdemhaki Linux - General 0 03-29-2005 06:29 AM
sip on 9.3 barrythai SUSE / openSUSE 0 03-18-2005 02:08 AM
SIP Server.... MATDEV Linux - Software 2 07-20-2004 02:44 AM
slooze error: validateInputs(); $msg = $mySlooze->renderPage($vars); echo $msg; ?> rioguia Linux - Software 0 01-26-2003 08:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 10:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration