Example bash script for cloud environments

The following bash script example, is a script which can be used to automate some basic tasks, associated with setting up a virtual resource, such as an Amazon AWS EC2 instance:

#!/bin/bash
yum update -y
yum install httpd -y
service httpd start
chkconfig httpd on
aws s3 cp s3:///index.html /var/www/html/

What this bash script will perform on your behalf, will update the instance repositories (yum update), and also install Apache web server (install httpd). This particular script was used in Amazon AWS for an EC2 instance and a static website hosted on a S3 bucket storage resource.

The script will also ensure that the Apache web server will persist during system reboots (chkconfig), and the last instruction, will copy the contents between locations.

List of Tenable Nessus plugins

AIX Local Security Checks
Amazon Linux Local Security Checks
Backdoors
Brute force attacks
CentOS Local Security Checks
CGI abuses
CGI abuses : XSS
CISCO
Databases
Debian Local Security Checks
Default Unix Accounts
Denial of Service
DNS
F5 Networks Local Security Checks
Fedora Local Security Checks
Firewalls
FreeBSD Local Security Checks
FTP
Gain a shell remotely
General
Gentoo Local Security Checks
HP-UX Local Security Checks
Huawei Local Security Checks
Incident Response
Junos Local Security Checks
MacOS X Local Security Checks
Mandriva Local Security Checks
Misc.
Netware
Oracle Linux Local Security Checks
OracleVM Local Security Checks
Palo Alto Local Security Checks
Peer-To-Peer File Sharing
PhotonOS Local Security Checks
Red Hat Local Security Checks
RPC
SCADA
Scientific Linux Local Security Checks
Service detection
Settings
Slackware Local Security Checks
SMTP problems
SNMP
Solaris Local Security Checks
SuSE Local Security Checks
Ubuntu Local Security Checks
Virtuozzo Local Security Checks
VMware ESX Local Security Checks
Web Servers
Windows
Windows : Microsoft Bulletins
Windows : User management

Fix “Could not validate this preference file” in Nessus

If you receive the below error message when downloading the latest Nessus plugin updates, the following fix may help:

/opt/nessus/sbin/nessuscli update --plugins-only

----- Fetching the newest updates from nessus.org -----

Could not validate this preference file. Have installation files been copied from another system?
Nessus Plugins: Failed

The first step to fix the error, is to request a new activation code from Tenable for the Nessus program: Link.

Then you will need to register your new activation key, received by email and associate to Nessus:
/opt/nessus/sbin/nessuscli fetch --register

Alien Vault – How to Prepare to Take the OSCP

Offensive Security Certified Professional (OSCP) – Most recognized penetration testing certification in the industry.

  1. Earn after passing the 24-hour performance based exam
  2. Pre-requisite Course: Penetration Testing with Kali Linux (PWK)
  3. Certification proves you have a clear and practical understanding of the penetration testing process and life-cycle
  4. Virtual network containing targets of varying configurations and operating systems
  5. An OSCP is able to identify vulnerabilities and execute attacks in a controlled and focused manner.

Alien Vault – How to Prepare to Take the OSCP: Link

How to install Hyperion in Linux

Hyperion is a runtime encrypter for 32-bit portable executables. It is a reference implementation and bases on the paper “Hyperion: Implementation of a PE-Crypter”.

Hyperion is not included in Kali Linux repositories. To install Hyperion in Linux, run the following commands:

Download the files from Github:
wget https://github.com/nullsecuritynet/tools/raw/master/binary/hyperion/release/Hyperion-1.2.zip

Unzip the archive file:
unzip Hyperion-1.2.zip

Invoke the MingGW compiler to compile Hyperion in to a executable file:
i686-w64-mingw32-c++ Hyperion-1.2/Src/Crypter/*.cpp -o hyperion.exe

How to install Ming C compiler in Linux

MinGW, a contraction of “Minimalist GNU for Windows”, is a minimalist development environment for native Microsoft Windows applications.

MinGW provides a complete Open Source programming tool set which is suitable for the development of native MS-Windows applications, and which do not depend on any 3rd-party C-Runtime DLLs. (It does depend on a number of DLLs provided by Microsoft themselves, as components of the operating system; most notable among these is MSVCRT.DLL, the Microsoft C runtime library. Additionally, threaded applications must ship with a freely distributable thread support DLL, provided as part of MinGW itself).

The Ming compiler is included in Kali Linux repositories, but is not installed by default. To install Ming C compiler in Linux, run the following command:

apt-get install mingw-w64

MinGW (mingw-w64) is the successor to mingw32.