Script install OpenVAS 8, DB Redis and Debian 8.1 (Jessie) x86_64

#OpenVAS 8
#version 8.0.4
#Debian 8.1
#Mauro Risonho de Paula Assumpção aka firebits
#11.12.2015 17:51:03

apt-get install -y build-essential devscripts dpatch libassuan-dev libglib2.0-dev libgpgme11-dev libpcre3-dev libpth-dev libwrap0-dev libgmp-dev libgmp3-dev libgpgme11-dev libpcre3-dev libpth-dev quilt cmake pkg-config libssh-dev libglib2.0-dev libpcap-dev libgpgme11-dev uuid-dev bison libksba-dev doxygen sqlfairy xmltoman sqlite3 libsqlite3-dev wamerican redis-server libhiredis-dev libsnmp-dev libmicrohttpd-dev libxml2-dev libxslt1-dev xsltproc libssh2-1-dev libldap2-dev autoconf nmap libgnutls28-dev libpopt-dev heimdal-dev heimdal-multidev libpopt-dev mingw32 texlive-full rpm alien nsis rsync python2.7 python-setuptools

cp /etc/redis/redis.conf /etc/redis/redis.orig
echo “unixsocket /tmp/redis.sock” >> /etc/redis/redis.conf
service redis-server restart

mkdir openvas8
cd openvas8/

wget –no-check-certificate
wget –no-check-certificate
wget –no-check-certificate
wget –no-check-certificate
wget –no-check-certificate
wget –no-check-certificate
wget –no-check-certificate
wget –no-check-certificate
wget –no-check-certificate
wget –no-check-certificate
wget –no-check-certificate
wget –no-check-certificate
wget –no-check-certificate
wget –no-check-certificate
wget –no-check-certificate
wget –no-check-certificate
wget –no-check-certificate

find | grep “.tar.gz$” | xargs -i tar zxvfp ‘{}’


cd openvas-smb*
mkdir build
cd build/
cmake ..
make doc-full
make install
cd ../../

cd openvas-libraries-*
mkdir build
cd build
cmake ..
make doc-full
make install
cd ../../

cd openvas-scanner-*
mkdir build
cd build/
cmake ..
make doc-full
make install
cd ../../

cd openvas-manager-*
mkdir build
cd build/
cmake ..
make doc-full
make install
cd ../../

cd openvas-cli-*
mkdir build
cd build/
cmake ..
make doc-full
make install
cd ../../

cd greenbone-security-assistant-*
mkdir build
cd build/
cat ../src/xslt_i18n.h | sed ‘s///’ > test; cat test > ../src/xslt_i18n.h
cmake ..
make doc-full
make install
cd ../../


cd ospd-1*
python install –prefix=/usr/local
cd ../

cd ospd-ancor-*
python install –prefix=/usr/local
cd ../

cd ospd-debsecan-*
python install –prefix=/usr/local
cd ../

cd ospd-ovaldi-*
python install –prefix=/usr/local
cd ../

cd ospd-paloalto-*
python install –prefix=/usr/local
cd ../

cd ospd-w3af-*
python install –prefix=/usr/local
cd ../

cd ospd-acunetix-*
python install –prefix=/usr/local
cd ../

cd ospd-ikescan-*
python install –prefix=/usr/local
cd ../

cd ospd-ikeprobe-*
python install –prefix=/usr/local
cd ../

cd ospd-ssh-keyscan-*
python install –prefix=/usr/local
cd ../

cd ospd-netstat-&
python install –prefix=/usr/local
cd ../

#reload libraries


#create cert
openvas-mkcert-client -n -i

#create user
openvasmd –create-user=admin –role=Admin && openvasmd –user=admin –new-password=admin
#(write down the password)


echo ‘#!/bin/bash’ > /usr/local/sbin/openvas-update
echo ‘/usr/local/sbin/openvas-nvt-sync’ >> /usr/local/sbin/openvas-update
echo ‘/usr/local/sbin/openvas-scapdata-sync’ >> /usr/local/sbin/openvas-update
echo ‘/usr/local/sbin/openvas-certdata-sync’ >> /usr/local/sbin/openvas-update
chmod +x /usr/local/sbin/openvas-update

echo ‘#!/bin/bash’ > /usr/local/sbin/openvas-start
echo ‘/usr/local/sbin/openvasmd –rebuild’ >> /usr/local/sbin/openvas-start
echo ‘/usr/local/sbin/openvasmd’ >> /usr/local/sbin/openvas-start
echo ‘/usr/local/sbin/openvassd’ >> /usr/local/sbin/openvas-start
echo ‘/usr/local/sbin/gsad’ >> /usr/local/sbin/openvas-start
chmod +x /usr/local/sbin/openvas-start

echo ‘#!/bin/bash’ > /usr/local/sbin/openvas-kill
echo “ps aux | egrep \”(openvas.d|gsad)\” | awk ‘{print \$2}’ | xargs -i kill ‘{}'” >> /usr/local/sbin/openvas-kill
chmod +x /usr/local/sbin/openvas-kill

rclocal=`cat /etc/rc.local | grep -v “exit 0” | grep -v “openvas”`
echo “$rclocal” > /etc/rc.local
echo “date >> /var/log/openvas_init” >> /etc/rc.local
echo “echo ‘openvas init started’ >> /var/log/openvas_init” >> /etc/rc.local
echo “/usr/local/sbin/openvas-kill >> /var/log/openvas_init || /bin/true” >> /etc/rc.local
echo “/usr/local/sbin/openvas-start >> /var/log/openvas_init || /bin/true” >> /etc/rc.local
echo “echo ‘openvas init finished’ >> /var/log/openvas_init” >> /etc/rc.local
echo “exit 0” >> /etc/rc.local



# check installation
wget –no-check-certificate
chmod 0755 openvas-check-setup
./openvas-check-setup –v8 –server


List of plugins/scripts for IDA Pro (both RE malware, vulnerabilities and exploits)


A great list of plugins /scripts for IDA Pro (both RE malware, vulnerabilities and exploits):

  • 3DSX Loader

    IDA PRO Loader for 3DSX files

  • Adobe Flash disassembler

    The 2 plugins present in this archive will enable IDA to parse SWF files, load all SWF tags as segments for fast search and retrieval, parse all tags that can potentially contain ActionScript2 code, discover all such code(a dedicated processor module has been written for it) and even name the event functions acording to event handled in it (eg. OnInitialize). Download

  • Android Debugging

    This version have both support for native arm debugging via usb and sdk ADV manager.

  • Android Scripts Collection

    Collection of Android reverse engineering scripts that make my life easier

  • BinClone

    BinClone: detecting code clones in malware [SERE 2014]

  • BinNavi

    BinNavi is a binary analysis IDE – an environment that allows users to inspect, navigate, edit, and annotate control-flow-graphs of disassembled code, do the same for the callgraph of the executable, collect and combine execution traces, and generally keep track of analysis results among a group of analysts.

  • Bin Sourcerer

    BinSourcerer (a.k.a RE-Source Online) is an assembly to source code matching framework for binary auditing and malware analysis.

  • Bootroom Analysis Library

    IBAL is the IDA Pro Bootrom Analysis Library, which contains a number of useful functions for analyzing embedded ROMs.

  • Bosch ME7

    Siemens Bosch ME7.x Disassembler Helper for IDA Pro

  • collabREate

    collabREate is a plugin for IDA Pro that is designed to provide a collaborative reverse engineering capability for multiple IDA users working on the same binary file.

  • Class Informer

    Scans an MSVC 32bit target IDB for vftables with C++ RTTI, and MFC RTCI type data. Places structure defs, names, labels, and comments to make more sense of class vftables (“Virtual Function Table”) and make them read easier as an aid to reverse engineering. Creates a list window with found vftables for browsing.

  • Crowd Detox

    The CrowdDetox plugin for Hex-Rays automatically removes junk code and variables from Hex-Rays function decompilations.

  • Dalvik Header

    This is a simple Dalvik header plugin for IDA Pro

  • Data Xref Counter

    Enumerates all of the the x-references in a specific segment and counts the frequency of usage. The plugin displays the data in QtTableWidget and lets the user filter and sort the references. You can also export the data to a CSV file.

  • Diaphora

    Diaphora (διαφορά, Greek for ‘difference’) is a program diffing plugin for IDA Pro, similar to Zynamics Bindiff or the FOSS counterparts DarunGrim, TurboDiff, etc… It was released during SyScan 2015.

  • DOXBox Debugger

    Eric Fry’s IDA/DOSBox debugger plugin

  • DWARF Plugin

    IDADWARF is an IDA plugin that imports DWARF debugging symbols into an IDA database.Download

  • Dynamic IDA Enrichment

    DIE is an IDA python plugin designed to enrich IDA`s static analysis with dynamic data. This is done using the IDA Debugger API, by placing breakpoints in key locations and saving the current system context once those breakpoints are hit.

  • EFI Scripts

    Some IDA scripts and tools to assist with reverse engineering EFI executables.

  • EtherAnnotate

    Parses the specialized instruction trace files that are generated using the EtherAnnotate Xen modification ( From the instruction trace, register values and code coverage of the run-time information are visualized in IDA Pro through instruction comments and line colorations.

  • Extract Macho-O

    This is a very simple IDA plugin to extract all Mach-O binaries contained anywhere in the disassembly.

  • Flare Plugins

    Shellcode Hashes, Struct Typer, StackStrings, MSDN Annotations, ApplyCalleType

  • FLS Loader

    IDA Pro loader module for IFX iPhone baseband firmwares. Based on a universal scatter loader script by roxfan.

  • Frida

    This is plugin for ida pro thar uses the Frida api. Mainly trace functions.

  • Funcap

    This script records function calls (and returns) across an executable using IDA debugger API, along with all the arguments passed. It dumps the info to a text file, and also inserts it into IDA’s inline comments. This way, static analysis that usually follows the behavioral runtime analysis when analyzing malware, can be directly fed with runtime info such as decrypted strings returned in function’s arguments.

  • Function Tagger

    This IDAPython script tags subroutines according to their use of imported functions

  • Gamecube Extension

    This is a Gekko CPU Paired Single extension instructions plug-in for IDA Pro 5.2

  • Gamecube DSP

    This project adds support for the DSP present in the Gamecube and the Wii to IDA, the Interactive Disassembler [1]. This allows easy analyze of a DSP ucode, handling cross-references, control flow, and so on.

  • Graph Slick

    Automated detection of inlined functions. It highlights similar groups of nodes and allows you to group them, simplifying complex functions. The authors provide an accompanying presentation which explains the algorithms behind the plugin and shows sample use cases.

  • HexRays CodeXplorer

    The Hex-Rays Decompiler plugin for better code navigation in RE process. CodeXplorer automates code REconstruction of C++ applications or modern malware like Stuxnet, Flame, Equation, Animal Farm …

  • HexRays Tools

    • Assist in creation of new structure definitions / virtual calls detection
    • Jump directly to virtual function or structure member definition
    • Gives list of structures with given size, with given offset
    • Finds structures with same “shape” as is used.
    • convert function to __usercall or __userpurge
    • and more….

    As the name implies this plugin can be used to export information from IDA databases to SQL databases. This allows for further analysis of the collected data: statstical analysis, building graphs, finding similarities between programs, etc.

  • IDA C#

    Scripting IDA with C#

  • IDA Compare

    IDA disassembly level diffing tool, find patches and modifications between malware variants. See mydoom A/B sample database and video trainer for usage.

  • IDA Eye

    Plugin that enables you to perform different operations at the mnemonic level, independent of any particular processor type. These operations are facilitated through a parameterized template, which include the capabilities to de/highlight instructions, gather statistical information about the frequency of each instruction, and search for sequences of mnemonics, among other features.

  • IDA Extrapass

    An IDA Pro Win32 target clean up plug-in by Sirmabus. It does essentially four cleaning/fixing steps: Convert stray code section values to “unknown”, fix missing “align” blocks, fix missing code bytes, and locate and fix missing/undefined functions.

  • IDA Patchwork

    Stitching against malware families with IDA Pro (tool for the talk at Spring9, In essence, I use a somewhat fixed / refurbished version of PyEmu along IDA to demonstrate deobfuscation of the different patterns found in the malware family Nymaim.

  • IDA Rest

    A simple REST-like API for basic interoperability with IDA Pro.

  • IDA Scope

    IDAscope is an IDA Pro extension with the goal to ease the task of (malware) reverse engineering with a current focus on x86 Windows. It consists of multiple tabs, containing functionality to achieve different goals such as fast identification of semantically interesting locations in the analysis target, seamless access to MSDN documentation of Windows API, and finding of potential crypto/compression algorithms.

  • IDA Signature Matching Tool

    Tool for searching signatures inside files, extremely useful as help in reversing jobs like figuring or having an initial idea of what encryption/compression algorithm is used for a proprietary protocol or file. It can recognize tons of compression, multimedia and encryption algorithms and many other things like known strings and anti-debugging code which can be also manually added since it’s all based on a text signature file read at run-time and easy to modify.

  • IDA Sploiter

    IDA Sploiter is a plugin for Hex-Ray’s IDA Pro disassembler designed to enhance IDA’s capabilities as an exploit development and vulnerability research tool. Some of the plugin’s features include a powerful ROP gadgets search engine, semantic gadget analysis and filtering, interactive ROP chain builder, stack pivot analysis, writable function pointer search, cyclic memory pattern generation and offset analysis, detection of bad characters and memory holes, and many others.

  • IDA Stealth

    IDAStealth is a plugin which aims to hide the IDA debugger from most common anti-debugging techniques. The plugin is composed of two files, the plugin itself and a dll which is injected into the debuggee as soon as the debugger attaches to the process. The injected dll actually implements most of the stealth techniques either by hooking system calls or by patching some flags in the remote process.

  • IDA Toolbag

    The IDA Toolbag plugin provides many handy features, such as:

    • A ‘History’ view, that displays functions in the disassembly that you have decided are important, and the relationships between them.
    • A code path-searching tool, that lets you find what functions (or blocks) are forming a path between two locations.
    • Manage and run your IDC/Python scripts
    • Something that’s also of considerable importance is that the IDA Toolbag lets you collaborate with other IDA users: one can publish his ‘History’, or import another user’s history & even merge them!
    • See the official documentation for an extensive feature list.
  • IDA Xtensa

    This is a processor plugin for IDA, to support the Xtensa core found in Espressif ESP8266. It does not support other configurations of the Xtensa architecture, but that is probably (hopefully) easy to implement.

  • idb2pat

    IDB to Pat.

  • MSDN Helper

    This tool will help you to get to Offline MSDN help while using IDA Pro.

  • MyNav

    MyNav is a plugin for IDA Pro to help reverse engineers in the most typical task like discovering what functions are responsible of some specifical tasks, finding paths between “interesting” functions and data entry points.

  • NES Loader

    Nintendo Entertainment System (NES) ROM loader module for IDA Pro.

  • Optimice

    This plugin enables you to remove some common obfuscations and rewrite code to a new segment. Currently supported optimizations are: Dead code removal, JMP merging, JCC opaque predicate removal, Pattern based deobfuscations

  • Patcher

    IDA Patcher is a plugin for Hex-Ray’s IDA Pro disassembler designed to enhance IDA’s ability to patch binary files and memory.

  • Plus22

    Plus22 transforms x86_64 executables to be processed with 32-bit version of Hex-Rays Decompiler.

  • Plympton

    A gem to read program disassembly from a YAML dump. The YAML dump is generated from an IDA Pro python script. This script is included along with this Gem (

  • Pomidor

    IDA Pomidor is a plugin for Hex-Ray’s IDA Pro disassembler that will help you retain concentration and productivity during long reversing sessions.

  • Qualcomm Loader

    IDA loader plugin for Qualcomm Bootloader Stages

  • qb-sync

    qb-sync is an open source tool to add some helpful glue between IDA Pro and Windbg. Its core feature is to dynamically synchronize IDA’s graph windows with Windbg’s position.

  • Recompiler

    IDA recompiler

  • REProgram

    A way of making almost-arbitrary changes to an executable when run under a debugger — even changes that don’t fit.

  • REtypedef

    REtypedef is an IDA PRO plugin that allows defining custom substitutions for function names. It comes with a default ruleset providing substitutions for many common STL types.

  • Samsung S4 Rom Loader

    IDA Pro Loader Plugin for Samsung Galaxy S4 ROMs

  • Sark

    Sark, (named after the notorious Tron villain,) is an object-oriented scripting layer written on top of IDAPython. Sark is easy to use and provides tools for writing advanced scripts and plugins.

  • Sega Genesis/Megadrive Tools

    Special IDA Pro tools for the Sega Genesis/Megadrive romhackers. Tested work on v5.2, v6.6. Should work on other versions.

  • Sig Maker

    Can create sigs automatically and has a wide variety of functions (might be unstable on IDA 6.2).

  • Snippt Detector

    Snippet Detector is an IDA Python scripts project used to detect snippets from 32bit disassembled files. snippet is the word used to identify a generic sequence of instructions (at the moment a snippet is indeed a defined function). The aim of the tool is to collect many disassembled snippets inside a database for the detection process.

  • Snowman Decompiler

    Snowman is a native code to C/C++ decompiler. Standalone and IDA Plugin. Source Code

  • Splode

    Augmenting Static Reverse Engineering with Dynamic Analysis and Instrumentation

  • spu3dbg

    Ida Pro debugger module for the anergistic SPU emulator.

  • Synergy

    A combination of an IDAPython Plugin and a control version system that result in a new reverse engineering collaborative addon for IDA Pro. By

  • Tarkus

    Tarkus is a plugin manager for IDA Pro, modelled after Python’s pip.

  • VirusBattle

    The plugin is an integration of Virus Battle API to the well known IDA Disassembler. Virusbattle is a web service that analyses malware and other binaries with a variety of advanced static and dynamic analyses.

  • Win32 LST to Inline Assembly

    Python script which extracts procedures from IDA Win32 LST files and converts them to correctly dynamically linked compilable Visual C++ inline assembly.

  • WinIOCtlDecoder

    An IDA Pro plugin which decodes a Windows Device I/O control code into DeviceType, FunctionCode, AccessType and MethodType.

  • Xex Loader for IDA 6.6

    This adds the ability to load xex files into IDA directly without having to first process them in any way. It processes the xex file as much as possible while loading to minimise the work required by the user to get it to a state fit for reversing.

  • X86Emu

    Its purpose is to allow a reverse engineer the chance to step through x86 code while reverse engineering a binary. The plugin can help you step through any x86 binary from any platform. For Windows binaries, many common library calls are trapped and emulated by the emulator, allowing for a higher fidelity emulation. I find it particularly useful for stepping through obfuscated code as it automatically reorganizes an IDA disassembly based on actual code paths.

Como executar um binário do Windows/DOS no Linux (Continuação do Post anterior sobre compilar binário de Windows, dentro do Linux)

Continuação do post:

Para testar seu binário de Windows, no próprio Linux, com se fosse um Windows…rss:) (Wine tá bugado na VM de testes).

[test@localhost sampler]$ wine cmd
fixme:winediag:start_process Wine Staging 1.7.49 is a testing version containing experimental patches.
fixme:winediag:start_process Please report bugs at (instead of
Microsoft Windows 5.2.3790 (1.7.49)

Z:\home\test\sampler>fixme:ole:RemUnknown_QueryInterface No interface for iid {00000019-0000-0000-c000-000000000046}
Volume in drive Z has no label.
Volume Serial Number is 0000-0000

Directory of Z:\home\test\sampler

8/31/2015 1:49 PM <DIR> .
8/31/2015 1:45 PM <DIR> ..
8/31/2015 1:15 PM 103 HelloWorld.c
8/31/2015 1:27 PM 67,385 HelloWorld.exe
8/31/2015 10:19 AM 717 HelloWorldCPL.c
8/31/2015 1:35 PM 67,385 HelloWorldCPL01
8/31/2015 1:15 PM 103 HelloWorldCPL01.c
8/31/2015 1:35 PM 67,385 HelloWorldCPL01.cpl
6 files 203,078 bytes
2 directories 95,160,651,776 bytes free
Sampler Test!

Não adiantar usar comandos de Linux, agora você estará no Windows

Can’t recognize ‘clear’ as an internal or external command, or batch script.

[test@localhost sampler]$ clear

Espero ter ajudado!


Cross-Compiling de Arquivo em Linguagem C (Compilando em Linux, Executando em Windows)

Estava fazendo um PoC (Proof of Concept) e precisava criar um sampler para testes, mas não queria criar uma VM com Windows, instalar GCC ou VS, só para criar um PE32 (Executável para Windows 32bits, arquitetura x86), então fui pesquisar sobre MinGW.

O problema é que a máquina de testes do Lab está usando um Fedora 22 e quando você procura no terminal por “MinGW”, não aparece nada rapidamente.

Buscando nesta wiki, achei o MinGW versão Fedora, que está com outra nomeclatura no package: (x86_64-w64-mingw32-gcc)

[root@localhost sampler]# x86_64-w64-mingw32-gcc HelloWorld.c -o HelloWorld


[root@localhost sampler]# file HelloWorld
HelloWorld: PE32+ executable (console) x86-64, for MS Windows

Agora sim!:)

Espero ter ajudado alguém!:)



Running nmap via golang

Hi. Another post about golang 😉

I was developing a small source code in golang to automate the use of nmap , based on these examples:

But it was not succeed until I developed it and it worked :

[root@localhost golang]# vim go-nmap.go

// Mauro Risonho de Paula Assumpção aka firebits
// example os/exec nmap
// 24.07.2015 15:04:23
// fedora 22 x86-64
// go version go1.4.2 linux/amd64
// go build

package main

import “syscall”
import “os”
import “os/exec”

func main() {

// For our example we’ll exec `ls`. Go requires an
// absolute path to the binary we want to execute, so
// we’ll use `exec.LookPath` to find it (probably
// `/bin/nmap`).

binary, lookErr := exec.LookPath(“/usr/bin/nmap”)
if lookErr != nil {

// `Exec` requires arguments in slice form (as
// apposed to one big string). We’ll give `ls` a few
// common arguments. Note that the first argument should
// be the program name.
// args := []string{“nmap”, “-A”, “-O”, “”}
args := []string{“nmap”, “-A”, “”}

// `Exec` also needs a set of [environment variables](environment-variables)
// to use. Here we just provide our current
// environment.
env := os.Environ()

// Here’s the actual `syscall.Exec` call. If this call is
// successful, the execution of our process will end
// here and be replaced by the `/bin/ls -a -l -h`
// process. If there is an error we’ll get a return
// value.
execErr := syscall.Exec(binary, args, env)
if execErr != nil {

I installed a vm with Fedora 22 x86_64 and CUPS server and did a spot scanning in localhost

[root@localhost golang]# go build go-nmap.go
[root@localhost golang]# ./go-nmap

Starting Nmap 6.47 ( ) at 2015-07-24 15:06 BRT
Nmap scan report for localhost.localdomain (
Host is up (0.00015s latency).
Not shown: 999 closed ports
631/tcp open ipp CUPS 2.0
| http-methods: Potentially risky methods: PUT
| http-robots.txt: 1 disallowed entry
|_http-title: Home – CUPS 2.0.3
Device type: general purpose
Running: Linux 3.X
OS CPE: cpe:/o:linux:linux_kernel:3
OS details: Linux 3.7 – 3.15
Network Distance: 0 hops

OS and Service detection performed. Please report any incorrect results at .
Nmap done: 1 IP address (1 host up) scanned in 8.06 seconds

So it works!