We work with many customers who regularly scan their Amazon EC2 cloud environments. Organizations with large EC2 deployments have to be careful to manage their bandwidth costs -- if your traffic stays within EC2 it's free or cheap, but moving data into and out of EC2 gets expensive pretty quickly.
Therefore, if you have a large EC2 deployment and you want to perform regular scanning, it often makes sense to perform this scanning from within the EC2 environment to reduce costs and improve scan performance. We've prepared some instructions for installing and running NeXpose in Amazon EC2.
Instructions for installing NeXpose in Amazon EC2:
These instructions assume that you have already signed up for an Amazon AWS account and that you have downloaded your SSH keypair to your local system. Amazon has a very simple tutorial called Get Started with EC2, which shows you how to get started in less than 5 minutes.
- Create an EC2 instance from Ubuntu 10.04 LTS x64 AMI using 8gb of RAM
- Create an EC2 security group called "NeXpose consoles" and allow TCP ports 22 and 443 inbound
- Startup the machine instance
- SSH in as ec2-user with your private key: ssh -i ec2-user.pem ec2-user@<your-system-ip>
- sudo to root: sudo -i
- Install the ‘screen’ package: apt-get install screen
- Download the NeXpose 64-bit Linux installer and run the installer as root in console mode: ./NeXposeSetup-Linux64.bin -console
- After NeXpose is installed, configure the HTTPS management port to run on port 443 instead of the default 3780:
- Edit /opt/rapid7/nexpose/nsc/conf/httpd.xml
- Where it says <serverport="3780", change that to be 443
- Start NeXpose: /etc/init.d/nexposeconsole start
- If you want to view console activity, attach to the screen: screen -r nexpose
- Obtain an activation key from Rapid7 and activate NeXpose once you log in
That's it! Don't forget to shut the image down when you're not using it
Let me know if you have any questions.
Update: Instructions updated for Ubuntu 10.04 LTS. Nexpose is not officially supported on Amazon Linux.