Installing Nmap from SVN on Ubuntu 10.10

If you are an Ubuntu user and simply cannot wait to get the latest nmap features, follow the procedure below. Throw this into a file and call it, ‘build_nmap’ and copy it to the /etc/cron.daily directory and you will have a daily build of the latest and greatest version of nmap.

P.S. The same procedure will also work for you Backtrack geeks.

1. Open a shell terminal.

2. svn co –username guest –password “” svn://svn.insecure.org/nmap/.

3. cd nmap

4. ./configure

5. make

6. sudo make install

My PGP Public Key

For those of you actually know what encryption is and how to use it, here’s my public key to send secure transmissions.

—–BEGIN PGP PUBLIC KEY BLOCK—–
Version: GnuPG v1.4.10 (GNU/Linux)

mQINBEx0a1MBEADLUM0L68NzlwJ+TWDKLhAcxPpf07qjW9uEkRVilCiUFreGzBUr
XyKjIFo4KncFesVME9vfS67ODH4iWyjch1hjNKkgJf43f8hwN+mFntIyv0gv6V/n
4MV13i9oHv3JhmpkoZRMxeIbV9yt9mwtQLcw84TohX+r3NMYDut8MrKSgnmSi7ET
DU5wqKG/6jsUlJgKJ82x4666pVgzSbSMYxmcHdkGKCzMJvBpO1hqc8tieON8BDs7
RIkUWmacNwW1Pb2ovrZBYKbVdSccHM/pc8Jd2kEhan8HZT8G6fnIjTb4ESzrE+GX
XpTgorHBWgUYjGKvGx7rqd1sQvyBw+oO4cjpve7eRi2LdJ64u5TifZ5Yo5fYyw2J
e+hk/clBqZhcHR9mnE5ch6oBjA/RjFq+K/qFWHQLJ8wblORnlE6iFq1edvAHEDDM
PxXXiUCAqBab3iVRKHrF9hKaIRO7ObNmvDzurUbTlv8Ii9yXXxENNnJlNbKOVw92
0DTB+IkvhxlXHnjPjU20fAM3cFDi7JQNnC4fxrAJ7iiqRBqFKDqLDkBITuGK6Tqw
WrYAsbAcIvtG/RLzEDThTFCu3CDNTvQZDYuj0GkuFTEvSsZ5+Z/x7noIFfAaIwV2
fvq8/EKYWmmwcp9vaHf1xOc5TYp6hrN0fHAoOQ4wJG3RyQUY8dA/Yye6hQARAQAB
tDZKdXN0aW4gUi4gQW5kcnVzayAo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C0DfD42kkT8NyglRhvaXdXpWMm
n8U6tf0FZFJHQ11VYdKm24pIMnDx+UUBXqwTCfidqpx8b/8Zws6T90BHStjDFRgE
inkOmAmYDXpVZJwQksZo/RJIRjmQ
=FBLv
—–END PGP PUBLIC KEY BLOCK—–

SSH Hardening

Here is some code that will add some security to your /etc/sshd_config file:

  • Enable X11Forwarding
  • Force Version 2 of the protocol
  • Disable all the usual RHosts garbage
  • Disable root logons
  • Disable the use of empty passwords

Copy the code below to a text file and make it executable then run it using the sudo command. Remember to restart your SSH service after the changes have been made.


#!/bin/sh
SSH_DIR=/etc/ssh
# unalias cp rm mv
cd $SSH_DIR
cp ssh_config ssh_config.tmp
cat $SSH_DIR/ssh_config.tmp | grep -v Protocol | sed ‘$a\\nProtocol 2’
> $SSH_DIR/ssh_config
rm ssh_config.tmp
cp sshd_config sshd_config.tmp
awk ‘/^#? *Protocol/ { print “Protocol 2”; next };
/^#? *X11Forwarding/ \
{ print “X11Forwarding yes”; next };
/^#? *IgnoreRhosts/ \
{ print “IgnoreRhosts yes”; next };
/^#? *RhostsAuthentication/ \
{ print ” RhostsAuthentication no”; next };
/^#? *RhostsRSAAuthentication/ \
{ print “RhostsRSAAuthentication no”; next };
/^#? *HostbasedAuthentication/ \
{ print “HostbasedAuthentication no”; next };
/^#? *PermitRootLogin/ \
{ print “PermitRootLogin no”; next };
/^#? *PermitEmptyPasswords/ \
{ print “PermitEmptyPasswords no”; next };
/^#? *Banner/ \
{ print “Banner /etc/issue.net”; next };
{print}’ sshd_config.tmp > sshd_config
rm sshd_config.tmp