Posted by: kezhong | September 26, 2011

Installing THC Hydra on Fedora 15

THC-Hydra is a remote dictionary attack tool that supports a lot of protocols and options. The following protocols are supported: AFP, Cisco AAA, Cisco auth, Cisco enable, CVS, Firebird, FTP, HTTP-FORM-GET, HTTP-FORM-POST, HTTP-GET, HTTP-HEAD, HTTP-PROXY, HTTPS-FORM-GET, HTTPS-FORM-POST, HTTPS-GET, HTTPS-HEAD, HTTP-Proxy, ICQ, IMAP, IRC, LDAP, MS-SQL, MYSQL, NCP, NNTP, Oracle Listener, Oracle SID, Oracle, PC-Anywhere, PCNFS, POP3, POSTGRES, RDP, Rexec, Rlogin, Rsh, SAP/R3, SIP, SMB, SMTP, SMTP Enum, SNMP, SOCKS5, SSH (v1 and v2), Subversion, Teamspeak (TS2), Telnet, VMware-Auth, VNC and XMPP. It is a powerful real-time brute force tool for hackers and network administrators alike.

Download and configure THC Hydra
# wget http://www.thc.org/releases/hydra-7.0-src.tar.gz
# tar xvzf hydra-7.0-src.tar.gz
# cd hydra-7.0-src
# ./configure

Starting hydra auto configuration …
Detected 64 Bit Linux OS

Checking for openssl (libssl, libcrypto, ssl.h, sha.h) …
                                                       … found
Checking for idn (libidn.so) …
                             … NOT found, unicode logins and passwords will not be supported
Checking for pcre (libpcre.so, pcre.h) …
                                       … NOT found, server response checks will be less reliable
Checking for Postgres (libpq.so, libpq-fe.h) …
                                             … NOT found, module postgres disabled
Checking for SVN (libsvn_client-1 libapr-1.so libaprutil-1.so) …
                                                               … NOT found, module svn disabled
Checking for firebird (libfbclient.so) …
                                       … NOT found, module firebird disabled
Checking for MYSQL client (libmysqlclient.so, math.h) …
                                                      … NOT found, module Mysql will not support version > 4.x
Checking for AFP (libafpclient.so) …
                                   … NOT found, module Apple Filing Protocol disabled – Apple sucks anyway
Checking for NCP (libncp.so / nwcalls.h) …
                                         … NOT found, module NCP disabled
Checking for SAP/R3 (librfc/saprfc.h) …
                                      … NOT found, module sapr3 disabled
Get it from http://www.sap.com/solutions/netweaver/linux/eval/index.asp
Checking for libssh (libssh/libssh.h) …
                                      … NOT found, module ssh disabled
Get it from http://www.libssh.org
Checking for Oracle (libocci.so libclntsh.so / oci.h) …
                                                      … NOT found, module Oracle disabled
Checking for GUI req’s (pkg-config, gtk+-2.0) …
                                              … NOT found, optional anyway

Hydra will be installed into …/bin of: /usr/local
  (change this by running ./configure –prefix=path)

Writing Makefile.in …
now type “make”

From the above, we know there are some packages need to be installed.
# yum install libidn-devel
# yum install pcre-devel
# yum install libpqxx-devel
# yum install subversion-devel
# yum install apr-devel
# yum install apr-util-devel
# yum install firebird-devel
# yum install mysql-devel
# yum install afpfs-ng-devel
# yum install ncpfs-devel
# yum install libssh-devel

Configure again.
# ./configure

Starting hydra auto configuration …
Detected 64 Bit Linux OS

Checking for openssl (libssl, libcrypto, ssl.h, sha.h) …
                                                       … found
Checking for idn (libidn.so) …
                             … found
Checking for pcre (libpcre.so, pcre.h) …
                                       … found
Checking for Postgres (libpq.so, libpq-fe.h) …
                                             … found
Checking for SVN (libsvn_client-1 libapr-1.so libaprutil-1.so) …
                                                               … found
Checking for firebird (libfbclient.so) …
                                       … found
Checking for MYSQL client (libmysqlclient.so, math.h) …
                                                      … found
Checking for AFP (libafpclient.so) …
                                   … found
Checking for NCP (libncp.so / nwcalls.h) …
                                         … found
Checking for SAP/R3 (librfc/saprfc.h) …
                                      … NOT found, module sapr3 disabled
Get it from http://www.sap.com/solutions/netweaver/linux/eval/index.asp
Checking for libssh (libssh/libssh.h) …
                                      … found
Checking for Oracle (libocci.so libclntsh.so / oci.h) …
                                                      … NOT found, module Oracle disabled
Checking for GUI req’s (pkg-config, gtk+-2.0) …
                                              … NOT found, optional anyway

Hydra will be installed into …/bin of: /usr/local
  (change this by running ./configure –prefix=path)

Writing Makefile.in …
now type “make”

Compile
# make

Now type make install

Install
# make install
strip hydra pw-inspector
echo OK > /dev/null && test -x xhydra && strip xhydra || echo OK > /dev/null
mkdir -p /usr/local/bin
cp hydra pw-inspector dpl4hydra* /usr/local/bin && cd /usr/local/bin && chmod 755 hydra pw-inspector
echo OK > /dev/null && test -x xhydra && cp xhydra /usr/local/bin && cd /usr/local/bin && chmod 755 xhydra || echo OK > /dev/null
mkdir -p /usr/local/man/man1
cp -f hydra.1 xhydra.1 pw-inspector.1 /usr/local/man/man1

Download the dictionary from John the Ripper
# wget http://download.openwall.net/pub/wordlists/all.gz
# gunzip all.gz
# mv all /tmp/password.lst

Try to attack my ftp server
# hydra 192.168.1.10 ftp -l kezhong -P /tmp/password.lst -e ns -t 32
Hydra v7.0 (c)2011 by van Hauser/THC & David Maciejak – for legal purposes only

Hydra (http://www.thc.org/thc-hydra) starting at 2011-09-23 08:35:55
[DATA] 5 tasks, 1 server, 5 login tries (l:1/p:5), ~1 try per task
[DATA] attacking service ftp on port 21
[21][ftp] host: 192.168.1.10   login: kezhong   password: qwer1234
[STATUS] attack finished for 192.168.1.10 (waiting for children to finish)
1 of 1 target successfuly completed, 1 valid password found
Hydra (http://www.thc.org/thc-hydra) finished at 2011-09-23 08:35:58

Try to do ssh brute force attack to my server
# hydra 192.168.1.10 ssh -l kezhong -P /tmp/password.lst -e ns -t 32
Hydra v7.0 (c)2011 by van Hauser/THC & David Maciejak – for legal purposes only

Hydra (http://www.thc.org/thc-hydra) starting at 2011-09-23 12:02:03
[DATA] 5 tasks, 1 server, 5 login tries (l:1/p:5), ~1 try per task
[DATA] attacking service ssh on port 22
[22][ssh] host: 192.168.1.10   login: kezhong   password: qwer1234
[STATUS] attack finished for 192.168.1.10 (waiting for children to finish)
1 of 1 target successfuly completed, 1 valid password found
Hydra (http://www.thc.org/thc-hydra) finished at 2011-09-23 12:02:05

Reference
http://thc.org/thc-hydra/

Posted by: kezhong | September 12, 2011

Install hexedit on CentOS 5.5

Hexedit is a very powerful tool that shows a file both in ASCII and in hexadecimal. On Linux system, vi/vim can only modify ASCII files, however, Hexedit can modify not only ASCII files but also binary files.

The link http://rigaux.org/hexedit.html shows how to use it.

On CentOS 5.5 system, I cannot use yum to install it(but it can be installed by yum on Fedora 15). The below are installation steps.
# wget http://rigaux.org/hexedit-1.2.12.src.tgz
# gunzip hexedit-1.2.12.src.tgz
# tar xvf hexedit-1.2.12.src.tar
# cd hexedit
# ./configure
# make
# make install

Posted by: kezhong | September 2, 2011

Installing Skype on Fedora 15(X86_64)

Download installation package from
http://www.skype.com/intl/en-us/get-skype/on-your-computer/linux/downloading.fedora

Install
# rpm -i skype-2.2.0.35-fedora.i586.rpm

When I tried to start skype, it prompted that I need to install libasound.so.2, libXv.so.1, libXv.so.1, libXss.so.1, libQtDBus.so.4. I just installed them by yum.

Start skype
Click Applications -> Internet -> Skype

Click “I agree”

Posted by: kezhong | August 31, 2011

Using SSH Tunnelling(Port Forwarding)

SSH tunnelling (also known as “Port Frowarding”) is very useful at work environment. For example, I want to configure and manage the switches that can be managed by the web-based management application in the datacenter, but I work at my office. Or I want to copy some files to the server in the datacenter from my office. Through using ssh tunnelling, I don’t need to go to datacenter to configure switches on the site, and don’t need to copy files to gateway and then copy from gateway to server.

Syntax:
ssh -L <localport>remoteip<remoteport> <username>@<bridgeip>

Case 1
From the above picture, there is a management server connectting to the management port of switches in datacenter. For the privacy, I suppose that the IP of the management server is 192.168.1.20, the IP of the switch1 is 10.1.1.2. At my fedora desktop, I open a terminal and type

$ ssh -L 8080:10.1.1.2:80 kezhong@192.168.1.20 cat –

and then open my browser, go to http://127.0.0.1:8080/

Case 2
From the above picture, I want to copy files from my pc to server1. Suppose that the IP of the gateway is 192.168.2.1, and the IP of the server1 is 10.2.2.5. Open a terminal and type

$ ssh -L 8082:10.2.2.5:22 kezhong@192.168.2.1 cat –

Open another terminal, type
$ scp -P8082 ubuntu-10.10-server-amd64.iso kezhong@localhost:/tmp/ubt.iso

Reference
http://www.rzg.mpg.de/networkservices/ssh-tunnelling-port-forwarding

Posted by: kezhong | August 28, 2011

Reading CHM files on Fedora 15

I find there are several CHM viewer applications on Fedora 15. They are gnochm, kchmviewer, and xchm. They can be installed by yum.

If you want to convert chm files to pdf, you can install chm2pdf package by yum.

« Newer Posts - Older Posts »

Categories