bLaAaAg! ni john

Anything under the sun

Sending / Receiving a file using Hping

Posted by johnalvero on 21st November 2008

This method will enable you to send / receive files even through restrictive firewalls. You just have to be creative with the port and protocol.

From the manpage:

hping2 - send (almost) any arbitrary TCP/IP packets to network hosts

Here we go.

On host sending the file, do this:

[host_a]# hping2 host_b –udp -p 53 -d 100 –sign signature –safe –file /etc/passwd

On the receiving host, do this:

[host_b]# hping2 host_a –listen signature –safe –icmp

Be creative with the signature parameter. The parameter string is the key where the receiving side of the connection will start receveing the file. Also, port 53 is usually open for DNS queries and 80 for web traffic.

Good luck.

Posted in linux | No Comments »

DKIM + Mail::QmailQueue +

Posted by johnalvero on 24th October 2008

I wrote a code that will send DomainKey signed messages that injects mail directly to qmail-queue. It is assumed that you already have domainkeys setup with qmail.

The code can be found here.

asdfasdf

Posted in linux | No Comments »

Asterisk Cheat Sheet

Posted by johnalvero on 23rd October 2008

Just a few asterisk commands:

reload soft-restarts Asterisk and updates internal configs with changes you’ve made to /etc/asterisk/* - does not hang up calls
sip no debug Disable SIP debugging
show dialplan shows the full dialplan of how your calls will be handled
sip show peers shows all registered SIP clients
sip show channels shows current “live” channels that are in use by SIP clients (off-hook)
sip show registry this command will show you the status of any SIP connections with remote hosts. (eg: Your VOIP carrier.) If you have an authenticated connection with them, it will show as registered otherwise it will show it as unregistered.
sip show users this command will show you a list of all the SIP Users setup in the sip.conf - along with their secret password. This is great for when you go to setup the phones.
database show database Dump
sip debug ip Enable SIP debugging on IP
sip debug peer Enable SIP debugging on Peername
sip no debug Disable SIP debugging
stop gracefully shuts down Asterisk after all calls have hung up
stop now shuts down Asterisk, hanging up any current calls

Posted in linux | No Comments »