bLaAaAg! ni john

Anything under the sun

Sending / Receiving a file using Hping

Posted by johnalvero on November 21, 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 | Tagged: , | No Comments »

DKIM + Mail::QmailQueue +

Posted by johnalvero on October 24, 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 | Tagged: , , | No Comments »

Asterisk Cheat Sheet

Posted by johnalvero on October 23, 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 | Tagged: , , | No Comments »

Outlook 2007 + OpenLdap + CentOS 5.2

Posted by johnalvero on October 22, 2008

1. Install Openldap

yum install openldap-servers.i386

2. You might to install the clients

yum install openldap-clients.i386

3. Edit the file /etc/openldap/slapd.conf. Make necessary changes specially “dc=companyname,dc=com

suffix “dc=companyname,dc=com”
rootdn “cn=manager,dc=companyname,dc=com”
rootpw {SSHA}wCaiPZjCvjCbQX7xp8j/95zBnl9XQQIj

The rootpw parameter is the hash from the command slappasswd -s test

4. Copy the file /etc/openldap/DB_CONFIG.example to /var/lib/ldap as DB_CONFIG

cp /etc/openldap/DB_CONFIG.example /var/lib/ldap/DB_CONFIG

5. Restart the ldap service

service ldap restart

6. Create a file named base.ldif

dn: dc=companyname,dc=com
dc: companyname
objectClass: domain

7. Import base.ldif into your directory

ldapadd -x -D “cn=manager,dc=companyname,dc=com” -W  -f base.ldif

Note that the password is the same password in slapd.conf.

8. Populate your directory. Create a file named entries.ldif

dn: ou=People,dc=companyname,dc=com
ou: People
objectClass: organizationalUnit

dn: uid=Juan,ou=People,dc=companyname,dc=com
uid: juandelacruz
cn: Juan dela Cruz
displayName: Juan dela Cruz
givenName: Juan
sn: Cruz
objectClass: inetOrgPerson
userPassword: {SSHA}6TjW/MbEe4Eahqgo1ccTPSjHHtSKcOcs
mail: juan.delacruz@companyname.com

9. Import entries.ldif

ldapadd -x -D “cn=manager,dc=companyname,dc=coml” -W  -f entries.ldif -c

10. Now you are done. Configure your Outlook client. You can leave most settings to default. Of importance is the Server Name and Search Base settings which should be set to “dc=companyname,dc=com”.

Good luck.

Posted in linux | Tagged: , , | No Comments »

Grrr !@#$@$^*$%($

Posted by johnalvero on October 15, 2008

I hate blogging!

Posted in Uncategorized | No Comments »