‏إظهار الرسائل ذات التسميات Python. إظهار كافة الرسائل
‏إظهار الرسائل ذات التسميات Python. إظهار كافة الرسائل

الثلاثاء، 27 سبتمبر 2016

A Simple Static Malware Analyzer SSMA Tool Written in Python 3

A Simple Static Malware Analyzer SSMA Tool

SSMA is a simple malware analyzer written in Python 3. 


Features: 


  1. Analyze PE file’s header and sections (number of sections, entropy of sections/PE file, suspicious section names, suspicious flags in the characteristics of the PE file, etc.) 
  2. Searches for possible domains, e-mail addresses, IP addresses in the strings of the file. 
  3. Checks if domain is blacklisted based on abuse.ch’s Ransomware Domain Blocklist and malwaredomains.com’s blocklist. 
  4. Looks for Windows functions commonly used by malware. 
  5. Get results from VirusTotal and/or upload files. 
  6. Malware detection based on Yara-rules 
  7. Detect well-known software packers. 
  8. Detect the existence of cryptographic algorithms. 
  9. Detect anti-debug and anti-virtualization techniques used by malware to evade automated analysis. 
  10. Find if documents have been crafted to leverage malicious code. 


Usage: 

git clone https://github.com/secrary/SSMA
cd SSMA
sudo pip3 install -r requirements.txt
python3 ssma.py -h
python3 ssma.py -k api-key file.exe

You can just statically scan the file or upload to VirustTotal using your API-KEY.

python3 ssma.py file.exe
python3 ssma.py -k api-key file.exe

Download

الأربعاء، 24 أغسطس 2016

OWASP Mth3l3m3nt Framework: A Penetration Testing Aiding And Exploitation Framework Tool

OWASP Mth3l3m3nt Framework: A Penetration Testing Aiding And Exploitation Framework Tool


OWASP Mth3l3m3nt Framework: A Penetration Testing Aiding Tool And Exploitation Framework


It fosters a principle of attack the web using the web as well as pentest.


Modules Packed in so far are:

  • Payload Store
  • Shell Generator (PHP/ASP/JSP/JSPX/CFM)
  • Payload Encoder and Decoder (Base64/Rot13/Hex/Hexwith \x seperator/ Hex with 0x Prefix)
  • CURL GUI (GET/POST/TRACE/OPTIONS/HEAD)
  • LFI Exploitation module (currently prepacked with: Koha Lib Lime LFI/ Wordpress Aspose E-book generator LFI/ Zimbra Collaboration Server LFI)
  • HTTP Bot Herd to control web shells.
  • WHOIS
  • String Tools
  • Client Side Obfuscator
  • Cookie Theft Database (Enables you to steal session cookies & download page content if a stored XSS is present)

Screenshot Mth3l3m3nt Shell Generator

Currently it is set to use a flat file database.

Copy all the files into your webroot except db_dump_optional

Ensure the Folders Below are writeable:

  • tmp
  • framework/data
  • framework/data/site_config.json
  • incoming/
  • scripts/


It should run from the get go All just navigate to it.

the login url is: /cnc

username:mth3l3m3nt password:mth3l3m3nt

By Default I have set it to use the JIG database but this you can change at any point in the backend. The DB Dump in place is for users who use MySQL and need demo data. Unfortunately I have only done for MySQL. It's my DB of choice.

If you would like to switch from JIG you can do so in the settings. Please note the DB has to be created, it only populates it with the required tables, it doesn't drop or create the DB , other supported Databases are:

  • Mongo DB
  • MSSQL
  • PostgreSQL
  • SQLite
  • MySQL

Screenshot Mth3l3m3nt Dashboard

Other than SQLite please ensure that you have the PHP extensions for the Databases above so that it can access them through PHP Data Objects.

For MySQL users needing MySQL Sample Data like alot of it especially payloads switch the database to MySQL and import data from the Dump to populate.

You may also send them or subscribe to the mailing list: https://lists.owasp.org/mailman/listinfo/owasp-mth3l3m3nt-framework-project

It's been tested on :

  • Apache
  • Litespeed
  • Nginx
  • Lighttpd


Incase you test on another server please give your review.

If installing it in a subfolder edit the .htaccess file to reflect the RewriteBase as the subfolder.

Download

الأحد، 14 أغسطس 2016

Pompem - Exploit and Vulnerability Finder Pentester Tool

Exploit and Vulnerability Finder Pentester Tool


Pompem - Exploit and Vulnerability Finder Pentester Tool


Pompem is an open source tool, designed to automate the search for Exploits and Vulnerability in the most important databases. 


Its's Developed in Python, has a system of advanced search, that help the work of pentesters and ethical hackers. In the current version, it performs searches in PacketStorm security, CXSecurity, ZeroDay, Vulners, National Vulnerability Database, WPScan Vulnerability Database.

Source code

You can download the latest tarball by clicking here or latest zipball by clicking here.

You can also download Pompem directly from its Git repository:

$ git clone https://github.com/rfunix/Pompem.git

Dependencies

Pompem works out of the box with Python 3.5 on any platform and requires the following packages:

Requests 2.9.1+

Installation

Get Pompem up and running in a single command:

$ pip3.5 install -r requirements.txt

Usage

To get the list of basic options and information about the project:

$ python3.5 pompem.py -h

Options:

  -h, --help              show this help message and exit
  -s, --search <keyword,keyword,keyword> text for search
  --txt                           Write txt File
  --html                          Write html File

Examples of use:

$ python3.5 pompem.py -s Wordpress
$ python3.5 pompem.py -s Joomla --html
$ python3.5 pompem.py -s "Internet Explorer,joomla,wordpress" --html
$ python3.5 pompem.py -s FortiGate --txt
$ python3.5 pompem.py -s ssh,ftp,mysql

Download

الأربعاء، 10 أغسطس 2016

A2SV: Auto Scanning Tool To Find SSL Vulnerability

Auto Scanning to SSL Vulnerability

A2SV: Auto Scanning Tool To Find SSL Vulnerability


What is A2SV?
Its an Auto Scanning tool to find SSL Vulnerability and its featured with HeartBleed, CCS Injection, SSLv3 POODLE, FREAK... etc

A. Support Vulnerability

[CVE-2014-0160] CCS Injection
[CVE-2014-0224] HeartBleed
[CVE-2014-3566] SSLv3 POODLE
[CVE-2015-0204] FREAK Attack
[CVE-2015-4000] LOGJAM Attack
[CVE-2016-0703] SSLv2 DROWN

B. Dev Plan

[PLAN] SSL ACCF

2. How to Install?

A. Download(clone) & Unpack A2SV

git clone https://github.com/hahwul/a2sv.git
cd a2sv
B. Install Python Package / OpenSSL

pip install argparse
pip install netaddr

apt-get install openssl
C. Run A2SV

python a2sv.py -h

3. How to Use?

usage: a2sv.py [-h] [-t TARGET] [-p PORT] [-m MODULE] [-v]

Optional arguments:
-h, --help            show this help message and exit
-t TARGET, --target TARGET
                      Target URL/IP Address
-p PORT, --port PORT  Custom Port / Default: 443
-m MODULE, --module MODULE
                      Check SSL Vuln with one module
                      [h]: HeartBleed
                      [c]: CCS Injection
                      [p]: SSLv3 POODLE
                      [f]: OpenSSL FREAK
                      [l]: OpenSSL LOGJAM
                      [d]: SSLv2 DROWN
-u, --update          Update A2SV (GIT)
-v, --version         Show Version

[Scan SSL Vulnerability]
python a2sv.py -t 127.0.0.1
python a2sv.py -t 127.0.0.1 -m heartbleed
python a2sv.py -t 127.0.0.1 -p 8111

[Update A2SV]
python a2sv.py -u
python a2sv.py --update

Download

الثلاثاء، 5 يوليو 2016

A Small Linux Operating System TinyCore 7.2 Is Available To Download


TinyCore Linux 7.2 Operating System Is Available To Download


Tiny Core Linux is available for 32 bit and 64 bit with multiple editions Core and Core Plus.

The Core Project is a highly modular based system with community build extensions.

What is TinyCore Linux?
Tiny Core distribution is like a customized version of the Linux kernel and other tools. Tiny Core is very small at Megabytes size and uses the Linux Kernel and a set of command-line (text interface) tools including busybox.

It starts with a recent Linux kernel, vmlinuz, and our root filesystem and start-up scripts packaged with a basic set of kernel modules in core.gz. Core (11MB) is simply the kernel + core.gz - this is the foundation for user created desktops, servers, or appliances. TinyCore is Core + Xvesa.tcz + Xprogs.tcz + aterm.tcz + fltk-1.3.tcz + flwm.tcz + wbar.tcz

TinyCore becomes simply an example of what the Core Project can produce, an 16MB FLTK/FLWM desktop.

Screenshot TinyLinux 7.2

CorePlus ofers a simple way to get started using the Core philosophy with its included community packaged extensions enabling easy embedded frugal or pendrive installation of the user's choice of supported desktop, while maintaining the Core principal of mounted extensions with full package management.

It is not a complete desktop nor is all hardware completely supported. It represents only the core needed to boot into a very minimal X desktop typically with wired internet access.

The user has complete control over which applications and/or additional hardware to have supported, be it for a desktop, a netbook, an appliance, or server, selectable by the user by installing additional applications from online repositories, or easily compiling most anything you desire using tools provided.

Change Logs for 7.2:

  • * tc-functions: ondemand improvements, from Misalf
  • * tc-config, rcS: move clear from tc-config to rcS, requested by andyj
  • * tc-functions: allow passing args to ondemand items without .desktop files, from Misalf
  • * ondemand, tc-functions: quote args
  • * tc-functions, ondemand: pass arguments, patch from Misalf
  • * ondemand: Don't start yourself, space cleanup


Note: The last four changes had been previously implemented in corepure64, but omitted from core by mistake.

Download TinyCore Linux 7.2

الجمعة، 1 أبريل 2016

Shocker: A Tool To Find And Exploit Servers Vulnerable To Shellshock



Shocker: A Tool To Find And Exploit Servers Vulnerable To Shellshock


A tool to find and exploit servers vulnerable to Shellshock.

usage: shocker.py


  • -h, --help show this help message and exit

  • --Host HOST, -H HOST A target hostname or IP address

  • --file FILE, -f FILE File containing a list of targets

  • --port PORT, -p PORT The target port number (default=80)

  • --exploit EXPLOIT, -e EXPLOIT Command to execute (default=/bin/uname -a)

  • --cgi CGI, -c CGI Single CGI to check (e.g. /cgi-bin/test.cgi)

  • --proxy PROXY A BIT BROKEN RIGHT NOW Proxy to be used in the form 'ip:port'

  • --ssl, -s Use SSL (default=False)

  • --threads THREADS, -t THREADS Maximum number of threads (default=10, max=100)

  • --verbose, -v Be verbose in output


Usage Examples

./shocker.py -H 127.0.0.1 -e "/bin/cat /etc/passwd" -c /cgi-bin/test.cgi

Scans for http://127.0.0.1/cgi-bin/test.cgi and, if found, attempts to cat /etc/passwd

./shocker.py -H www.example.com -p 8001 -s

Scan www.example.com on port 8001 using SSL for all scripts in cgi_list and attempts the default exploit for any found

./shocker.py -f ./hostlist

Scans all hosts listed in the file ./hostlist with the default options

Dependencies

Python 2.7+

Change Log

Changes in version 1.0 (March 2016)

  • Some additional scripts contributed and updates to some comments, URLs and contact details


Changes in version 0.72 (December 2014)

  • Minor corrections to logic and typos


Changes in version 0.71 (December 2014)

  • Added timeout to urllib2.urlopen requests using a global 'TIMEOUT'


Changes in version 0.7 (November 2014)

  • Add interactive 'psuedo console' for further exploitation of a chosen vulnerable server
  • Attemped to clean up output buffering issues by wrapping sys.stdout in a class which flushes on every call to write
  • Added a progress indicator for use in time consuming tasks to reassure non vebose users


Changes in version 0.6 (October 2014)


  • Preventing return codes other than 200 from being considered successes
  • Added ability to specify multiple targets in a file
  • Moved the 'cgi_list' list of scripts to attempt to exploit to a file
  • Fixed some output formatting issues
  • Fixed valid hostname/IP regex to allow single word hostnames


Changes in version 0.5 (October 2014)


  • Added ability to specify a single script to target rather than using cgi_list
  • Introduced a timeout on socket operations for host_check
  • Added some usage examples in the script header
  • Added an epilogue to the help text indicating presence of examples


Changes in version 0.4 (October 2014)


  • Introduced a thread count limit defaulting to 10
  • Removed colour support until I can figure out how to make it work in Windows and *nix equally well
  • Spelling corrections
  • More comprehensive cgi_list
  • Removes success_flag from output


TODO

  • Identify and respond correctly to HTTP/200 response - false positives - Low priority/hassle
  • Implement curses for *nix systems - For the whole application or only psuedo terminal? - Low priority/prettiness
  • Thread the initial host check now that multiple targets are supported (and could be make this bit time consuming)
  • Change verbose to integer value - quiet, normal, verbose, debug?
  • Add option to skip initial host checks for the sake of speed?
  • Add a summary of results before exiting
  • Save results to a file? Format?
  • Eventually the idea is to include multiple possible vectors but currently only one is checked.
  • Add Windows and *nix colour support - Low priority/prettiness
  • Add a timeout in interactive mode for commands which don't return, e.g. /bin/cat /dev/zero
  • Prettify - Low priority/pretinness (obviously)
  • Add support for scanning and explointing SSH and SMTP? https://isc.sans.edu/diary/Shellshock+via+SMTP/18879
  • Add SOCKS proxy support, potentially using https://github.com/rpicard/socksonsocks/ from Rober Picard

Developed By:

Tom Watson, tom [dot] watson [at] nccgroup [dot] trust

Download

الاثنين، 7 مارس 2016

Block-Parser For Parsing Windows PowerShell Script Block Logging Events

Script Codding


Matthewdunwoody/Block-parser: For Parsing Windows PowerShell Script Block Logging Events


Definition:

A tool for parsing Windows PowerShell script block logging events. All the PowerShell code are invoked by Script block logging records. It also provides valuable forensic and auditing data. If the scripts are large then it will give hundreds of event log entries. The script block logging events that have been parsed by the script to the output are easily readable and executable code. 


Technique which is used:

Step 1: Firstly, the PowerShell scripting engine executed all the script block logging records code.

Step 2: Each and Every executed block are recorded in an event log entry having unique script block ID.

Step 3: The script block split into multiple event logs if the size of script block exceeds the maximum size of an event log message.

Step 4: Based on the script block IDs, full contents of script blocks are parses and outputs.

Step 5: Whatever are the script block logging events all are recorded in Event ID(EID) 4104 within the Microsoft-Windows-PowerShell%4Operational.evtx event log.


Example of usage:

Parse all multi-part script blocks from a log to separate files:
python block-parser.py -o C:\path C:\data\Microsoft-Windows-PowerShell%4Operational.evtx

Parse ALL script blocks to a single output file:
python block-parser.py -a -f C:\path\file.txt C:\data\Microsoft-Windows-PowerShell%4Operational.evtx

Parse metadata for ALL script blocks:
python block-parser.py -a -m C:\path\metadata.csv C:\data\Microsoft-Windows-PowerShell%4Operational.evtx

Parse a specified script block with metadata:
python block-parser.py -o C:\path -s 00000000-0000-0000-0000-000000000000 -m C:\path\metadata.csv C:\data\Microsoft-Windows-PowerShell%4Operational.evtx


Each command supports:

--output or --file, --scriptid or --all, --metadata


Limitations of this tool:

Some entries for a multi-part script block may be lost if the PowerShell operational log rolls. If it occurs then "-partial" will be appended to the file name or script block ID in output files, and the "First Message Number" in the metadata for the corresponding script block ID will be greater than one.

الأحد، 6 مارس 2016

Portable Efficient Assembly Code-generator in Higher-level Python (PeachPy)


Portable Efficient Assembly Code-generator in Higher-level Python (PeachPy)


Definition: 

For writing high-performance assembly kernels PeachPy(a Python framework) is used.

Features of PeachPy are:
  • It has a universal assembly syntax for OS like Windows, Unix and Golang.
  • It has also an automatic adaption of function to different calling conventions and ABIs. 
  • It has also a capability of automatic register allocation and it is flexible also.
  • It also generated a function prolog and epilog.
  • It also supports x86-64 instructions up to AVX-512 and SHA.
  • It can auto-generate the metadata files.
  • It is based on Python metaprogramming and code-generation.
  • It is compatible on any of these Python 2 and Python 3, CPython and PyPy.

How to install it?

As PeachPy is actively developed so we don't have any stable release of it, just use the master version:
  • you can download it from this link(git clone https://github.com/Maratyszcza/PeachPy.git).
  • And use the following command to install:
  • cd PeachPy
  • pip install -r requirements.txt
  • python setup.py generate
  • pip install.

For Using PeachPy as a command-line tool

# These two lines are not needed for PeachPy, but will help you get autocompletion in good code editors
from peachpy import *
from peachpy.x86_64 import *

# Lets write a function float DotProduct(const float* x, const float* y)

# If you want maximum cross-platform compatibility, arguments must have names
x = Argument(ptr(const_float_), name="x")
# If name is not specified, it is auto-detected
y = Argument(ptr(const_float_))

# Everything inside the `with` statement is function body
with Function("DotProduct", (x, y), float_,
  # Enable instructions up to SSE4.2
  # PeachPy will report error if you accidentially use a newer instruction
  target=uarch.default + isa.sse4_2):

  # Request two 64-bit general-purpose registers. No need to specify exact names.
  reg_x, reg_y = GeneralPurposeRegister64(), GeneralPurposeRegister64()

  # This is a cross-platform way to load arguments. PeachPy will map it to something proper later.
  LOAD.ARGUMENT(reg_x, x)
  LOAD.ARGUMENT(reg_y, y)

  # Also request a virtual 128-bit SIMD register...
  xmm_x = XMMRegister()
  # ...and fill it with data
  MOVAPS(xmm_x, [reg_x])
  # It is fine to mix virtual and physical (xmm0-xmm15) registers in the same code
  MOVAPS(xmm2, [reg_y])

  # Execute dot product instruction, put result into xmm_x
  DPPS(xmm_x, xmm2, 0xF1)

  # This is a cross-platform way to return results. PeachPy will take care of ABI specifics.
  RETURN(xmm_x)

Now compile this code in binary object file which you can link into a program.

# Use MS-COFF format with Microsoft ABI for Windows
python -m peachpy.x86_64 -mabi=ms -mimage-format=ms-coff -o example.obj example.py
# Use Mach-O format with SysV ABI for OS X
python -m peachpy.x86_64 -mabi=sysv -mimage-format=mach-o -o example.o example.py
# Use ELF format with SysV ABI for Linux x86-64
python -m peachpy.x86_64 -mabi=sysv -mimage-format=elf -o example.o example.py
# Use ELF format with x32 ABI for Linux x32 (x86-64 with 32-bit pointer)
python -m peachpy.x86_64 -mabi=x32 -mimage-format=elf -o example.o example.py
# Use ELF format with Native Client x86-64 ABI for Chromium x86-64
python -m peachpy.x86_64 -mabi=nacl -mimage-format=elf -o example.o example.py

What else? You can convert the program to Plan 9 assembly for use with Go programming language:

# Use Go ABI (asm version) with -S flag to generate assembly for Go x86-64 targets
python -m peachpy.x86_64 -mabi=goasm -S -o example_amd64.s example.py
# Use Go-p32 ABI (asm version) with -S flag to generate assembly for Go x86-64 targets with 32-bit pointers
python -m peachpy.x86_64 -mabi=goasm-p32 -S -o example_amd64p32.s example.py

If Plan 9 assembly is too restrictive for your use-case, generate .syso objects which can be linked into Go programs:

# Use Go ABI (syso version) to generate .syso objects for Go x86-64 targets
# Image format can be any (ELF/Mach-O/MS-COFF)
python -m peachpy.x86_64 -mabi=gosyso -mimage-format=elf -o example_amd64.syso example.py
# Use Go-p32 ABI (syso version) to generate .syso objects for Go x86-64 targets with 32-bit pointers
# Image format can be any (ELF/Mach-O/MS-COFF)
python -m peachpy.x86_64 -mabi=gosyso-p32 -mimage-format=elf -o example_amd64p32.syso example.py


Dependencies:
  • In PeachPy the instruction classes are generated from Opcodes Database.
  • Using auto-generated tests the encodings are validated against binutils.
  • A six and enum34 packages is used by PeachPy as a compatibility layer between Python 2 and Python 3. 

The Zoo A Project That Allow Malware Analysis

The Zoo A Project That Allow Malware Analysis


TheZoo: A Project That Allow Malware Analysis


Ytisf/TheZoo is a project. This project is available to public and it also make the possibility of malware analysis open. All the versions of malware are very hard to come by in a way which will allow analysis. TheZoo is developed by Yuval tisf Nativ but now it is maintained by Shahak Shalev.

Features of TheZoo:
  • It allow the study of malware.
  • It enable people who are interested in malware analysis.
  • It offer fast and easy way of retrieving malware samples and source code for promoting malware research.

These malware are very dangerous, never run them unless you are absolutely aware of that malware, because they come encrypted and locked for a reason. For using this malware you can use it in a VM because it doesn't have internet connection. If you run them unconstrained then it may harm you and that will be very dangerous.

This malware is free available on malware database and the licence is Copyright (C) 2015, Yuval Nativ, Lahad Ludar. You can easily redistribute it and you can modify it also in terms of GNU General Public License as published by the Free Software Foundation. The copy of the GNU General Public License must be needed along with this program. You can also download it from the link: http://www.gnu.org/licenses/.


What are the root files?

The version 0.42 of TheZoo now runs on both CLI and ARGVS modes, but the command line arguments for calling the program is same. The CLI modes is the deafult state of theZoo runtime. Here are the files and directories that are responsible for the application's behaviour.

/conf

Whatever the information is needed for the running of the program the conf folder holds those files. 

/imports

It Contains .py and .pyc import files used by the rest of the application

/malwares/Binaries

It contains the actual malwares samples.

/malware/Source

The source code of Malware is in this files.


The Directory Structure contains only 4 files:

The name of that files are following:
  • Password file for the archive.
  • SHA256 sum of the 1st file.
  • Malware files in an encrypted ZIP archive.
  • MD5 sum of the 1st file.

TheZoo is acting on maldb.db in order to find malwares indexed on your drive, which is a DB. 
If you want to see the full structure of this db then just visit the link TheZoo.

الثلاثاء، 1 مارس 2016

Generate Your Own Amalgamated Host Files

Generate Your Own Amalgamated Host Files

StevenBlack/hosts: A amalgamated Hosts Files


Amalgamated hosts file was last updated on February 26 2016, which contains 27,149 unique entries. The several reputable hosts file can be merged into a single amalgamated hosts file, and no duplicity is allowed. Using the Python script you can also download the amalgamated hosts file and clone this repo.


The main goal of amalgamated hosts file are:
  • Provide easy extensions.
  • De-dupe the resultant combined list.
  • Automatically combine high-quality lists of hosts.
  • Keep the resultant file reasonably sized.

With both additions and removals, a hosts source should be frequently updated, by its maintainers. If the hosts file is larger, then a higher level of curation is expected. On various Operating System, this amalgamated hosts file, will expect to serve both the mobile devices and the desktop.

Host files of the following locations are amalgamated.
  • The Adaway hosts file, updated regularly.
  • MVPs.org Hosts file at http://winhelp2002.mvps.org/hosts.htm, updated monthly, or thereabouts.
  • Dan Pollock at http://someonewhocares.org/hosts/ updated regularly.
  • Malware Domain List at http://www.malwaredomainlist.com/, updated regularly.
  • Peter Lowe at http://pgl.yoyo.org/adservers/, updated regularly.
  • My own small list in raw form here.

For generating your own amalgamated hosts file:

Based on the sources in local data/ subfolder, the updateHostsFile.py script will generate amalgamated hosts. The updateHostsFile.py script is compatible on python 2.7 and Python 3. There will be a script which prompts you that it will use the already existing hosts file ar fetch updated versions.

How to use it?

If you are using Python 3 then:
python3 updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]

If you are using Python 2.7 then:
python updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]


The Command line options is:
On using the command --auto, or -a: it run the script without prompting. When --auto is invoked, Host data sources, including extensions, are updated.

How to find which sources are amalgamated?
Just add additional sources by placing each in a subfolder of the data. A new hosts file copy is provided of that and place its update URL in update.info.

What is hosts file?
A plain text file which is used by all the Operating System in order to map hostnames to IP addresses. The hosts file is preferential to DNS, in many OS.

For example, to nullify requests to some doubleclick.net servers, adding these lines to your hosts file will do it:

# block doubleClick's servers
127.0.0.1 ad.ae.doubleclick.net
127.0.0.1 ad.ar.doubleclick.net
127.0.0.1 ad.at.doubleclick.net
127.0.0.1 ad.au.doubleclick.net
127.0.0.1 ad.be.doubleclick.net
# etc...

We recommend using 0.0.0.0 instead of 127.0.0.1

Location of your hosts file:
You can easily modify your current hosts file with a text editor. Mac OS X, iOS, Android, Linux: /etc/hosts folder.

Use the following command:
Windows: %SystemRoot%\system32\drivers\etc\hosts folder.

For reloading hosts file:
You can use the following commands to manually flush your DNS cache once the new hosts file is in place.

Open the terminal and run:
For Mac OS X
sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder

For Windows open the command prompt:

Windows XP: Start -> Run -> cmd
Windows Vista, 7: Start Button -> type cmd -> right-click Command Prompt -> "Run as Administrator"
Windows 8: Start -> Swipe Up -> All Apps -> Windows System -> right-click Command Prompt -> "Run as Administrator"
and run:
ipconfig /flushdns

Open a Terminal and run with root privileges in Linus OS:

Debian/Ubuntu sudo /etc/rc.d/init.d/nscd restart



Image Source: Shutterstock

الاثنين، 22 فبراير 2016

ROPInjector: To Convert Shellcode Into ROP

ROPInjector: To Convert Shellcode Into ROP


ROPInjector: To Convert Shellcode Into ROP



ROPInjector is a tool by which any shellcode can be converted into ROP and is written in C(Win32). It only supports 32-bit and the x86 instruction set.


ROPInjector is published in Blackhat USA 2015, Abbreviation of "ROPInjector: Return Oriented Programming for Polymorphism and Antivirus Evasion


If you need white paper then go to this link:

•(WhitePaper)


For presentation just need to visit this link:

•(Presentation)


How to Use it:

Usage

ropinjector <file-to-infect> <shellcode-file> <output-file>* [options]*

e.g.
ropinjector.exe firefox.exe revshell.txt

• file-to-infect : any 32-bit, non-packed PE
• shellcode-file : the shellcode to patch in the PE file
• output-file (optional) : The name of the output file. If not specified, ROPInjector will choose a suitable filename indicating the type of injection performed.
• options :


    text        Force reading of shellcode file as text file. Shellcode in text
                form must be in the \xHH\xHH\xHH format.

    norop       Don't transform shellcode to ROP.

    nounroll    Don't unroll SIBs.

    noinj       Don't inject missing gadgets.

    getpc       Don't replace getPC constructs in the shellcode.

    entry       Have shellcode run before the original PE code. Without this
                option, ROPInjector will try to hook calls to ExitProcess(),
                exit() and the like so that the shellcode runs last, right
                before process exit.

    -d<secs>    Number of seconds to Sleep() before executing the shellcode.
                When this option is specified, "entry" is also implicitly used.


The order of output with some comma-delimited stats in the end given by ROPInjector tool are:

• the carrier PE filename
• the output filename of the resulting patched file
• initial size of the PE file in bytes
• size of shellcode in bytes
• size of patch in bytes
• whether unroll is performed
• whether shellcode has been converted to ROP
• whether getPC constructs are replaced in the shellcode
• whether access is given to the shellcode during entry (run first) or during exit (run last)
• the delay the shellcode sleeps before it runs in seconds
• initial number of instructions in the shellcode
• number of instructions in the shellcode after unrolling and other manipulations, but before ROP
• number of instructions replaced by ROP gadgets (out of the ones in the previous metric, and not the initial number of instructions)
• number of gadgets injected
• number of gadget segments
• number of instructions replaced by injected gadgets


LICENSE

The license is under the GPLv2.0, You can also go to this link for further information (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html).

Download

الجمعة، 19 فبراير 2016

FFmpeg 2.8.5 Version Has Been Released

FFmpeg 2.8.5 Version Has Been Released

FFmpeg 2.8.5 Version Has Been Released 


Recently the development team of FFmpeg multimedia backend team has announced that the FFmpeg version 2.8.5 has been released. The FFmpeg multimedia backend is having features of well-known, open-source and cross-platform. 

Now, FFmpeg 2.8.5 is available for downloading for all Operating Systems that are supported like Microsoft Windows, GNU/Linux and Mac OS X etc.

According to the release notes of FFmpeg 2.8.5, it is same as other maintenance version from the FFmpeg 2.8 "Feynman" series. A couple of days ago, a zero-day vulnerability has been reported which allow the attacker for stealing files from remote machines.  

The developers of FFmpeg found that 2.8.5 version is the stable release comparing from the 2.8 version release. Version 2.8.5 consist of many new features:

It bring many new updates to various core components. Core components include (libav master, libav 11 and ffmpeg-mt).
Upgradation of Several libraries to their latest versions.

"2.8.5 was released on 2016-01-15. It is the latest stable FFmpeg release from the 2.8 release branch, which was cut from master on 2015-09-05. Amongst lots of other changes, it includes all changes from ffmpeg-mt, libav master of 2015-08-28, libav 11 as of 2015-08-28," reads today's announcement.

A softpedia Linux tweet:



The core libraries that have been updated in FFmpeg 2.8.5 are:


  • libavformat 56.40.101
  • libavutil 54.31.100
  • libavcodec 56.60.100
  • libavdevice 56.4.100
  • libswscale 3.1.101
  • libavresample 2.1.0
  • libswresample 1.2.101
  • libpostproc 53. 3.100
  • libavfilter 5.40.101



If you want to patch the critical security issue then you have to update your FFmpeg 2.8.5 version. To avoid issues and crashes in the system, they recommend updating to FFmpeg 2.8.5. 

الثلاثاء، 16 فبراير 2016

CTF-Tool: A Tool To Create An Installer Of Various Security Research Tools



CTF-Tool: A Tool To Create An Installer Of Various Security Research Tools


Definition: CTF-tool (a collection of scripts) that can be easily used to create an install of various security research tools. It can be easily deployable to new machines as they all are in one place.


Installer's features for the following tools are here:





For more you can go through this link (https://github.com/zardus/ctf-tools).


Usage:

To use, do:

# set up the path
/path/to/ctf-tools/bin/manage-tools setup
source ~/.bashrc

# list the available tools
manage-tools list

# install gdb, allowing it to try to sudo install dependencies
manage-tools -s install gdb

# install pwntools, but don't let it sudo install dependencies
manage-tools install pwntools

# uninstall gdb
manage-tools uninstall gdb

# uninstall all tools
manage-tools uninstall all

# search for a tool
manage-tools search preload

Installed things of these tools are saved in tool/directory, and the uninstalls are clean by calling git. You have to create a virtualenv so that it support Python dependencies, before installing and using tools.

Docker

Because of demand, a Dockerfile has also been included. If you want to make docker image then you can make with:

git clone https://github.com/zardus/ctf-tools
docker build -t ctf-tools .


Run it by using below command:

docker run -it ctf-tools

Vagrant


For building a Vagrant VM with:

wget https://raw.githubusercontent.com/zardus/ctf-tools/master/Vagrantfile
vagrant up

And connect to it via:

vagrant ssh


For adding Tools:

Follow the given steps, if you want to add a tool:

Create a toolname directory.
Create an install script.
Create an uninstall script.





Install Scripts:

$PWD run the install script. And it should be installed into the directory. For fully uninstallation you can call git clean. Bin directory is created by install script that contains all the executables there which can be automatically linked into the main bin directory.






License:

For ctf-tools the license is "starware". You can also go through the following link (https://github.com/zardus/ctf-tools).

Download Link: Click Here

الأحد، 14 فبراير 2016

Fingerping: A Security Tool For Fingerprint PNG Files Of Web Applications



Fingerping: A Security Tool For Fingerprint PNG Files Of Web Applications


When we audit web applications Fingerprinting is the most important step. The tool which is able to fingerprint the PNG files of web applications is Fingerping.



Purpose:

By using this tool we can easily determine about the framework, PNG image library, which a web application used. Fingerping tools are mostly used for forensic investigation, bu they can also be used during security audits.


Technique:

The techniques are based on analysis of cookies, static files, header files and mainly it relies on various PNG coders/decoders by which we can easily differentiate between the treatment of invalid or ambiguous PNG images. Some crafted images are accepted by the libraries but not all images. Fingerping tool already contains more than 50 specially crafted PNG images.

Requirements:

The basic requirements of Fingerping tool are:

Python 2.x versions
Web applications must accept uploads PNG files to fingerperint the web application.
Web application should return a re-encoded version of the image. 

Usage:

For the usage purpose firstly you have to upload all the PNG images files from the directory "images" to the target website. The name of the input and output image should be same. For those images that are failed to decode we can't do anything for that. If the output files are JPG files then convert them first into PNG files. After that run the fingerping tool with the folder that contains all your output images.

$ python fingerping.py ../site.com/

After then, tool (fingerping) will count the fingerprint matches between the folder of image and in database library. The line at the bottom is the most likely match.

$ python fingerping.py ../site.com/
Dart                            30/ 60
Ruby chunky_png       32/ 60
.Net 4.5                       33/ 60
Erlang erl_img           34/ 60
Nodejs pngjs               34/ 60
Haskell JuicyPixels    38/ 60
Python PIL                 38/ 60
Python png.py            39/ 60
OpenJDK 7                40/ 60
Go 1.0.2                     41/ 60
LodePNG                   42/ 60
ImageMagick             49/ 60
Mono                         50/ 60
PHP5                         60/ 60


Adding new fingerprints:

For adding new fingerprints to fingerping's database we have to follow some steps:

Firstly, generate the image folder for target.
Run the fingerping tool with "-gen".
Tool will then output the library's fingerprint as a Python dictionary.

$ python fingerping.py -gen ../newPNG/
{'black_white': 4, 'control_8bit_i': 4, 'Compression': 13, 'ihdr_too_long': 0, 'ihdr_height_0': 0, ...}

After then you can simply add a variable for the library to the fingerprints.py file, like below, replacing {fingerprint} with the aformentioned dictionary. And after that rest is on Python reflection.

newPNG = Fingerprint("newPNG","newPNG v1.0 64bit",{fingerprint})


Listing the fingerprint database:

When you Runn fingerping tool with the "-csv" option, it will give output of a tab delimited table containing all the fingerprints in fingerping's database.

Download Link: Click Here

الخميس، 11 فبراير 2016

AWS Scout-2: A Security Tool For Accessing AWS Environment (Security Posture)

AWS Scout-2: A Security Tool For Accessing AWS Environment (Security Posture)
Image Source: n0where.net

AWS Scout-2: A Security Tool For Accessing AWS (Security Posture) 


AWS Scout2 is an open-source security tool by which assessing of AWS environments security posture becomes very easy. 


AWS Scout2 gathers EC2, CloudTrail, RDS, S3 and IAM, configuration data by using the AWS API. Once after the gathering of configuration data, it is being analyzed and stored and it also automatically highlights the high-risk area. A clear view of the attack surface has applied by the Scout2 automatically. AWS Scout2 software is still under maintenance, it's not fully developed. It can make so many changes to their existing features.

How to Install:

For the installation purpose:

# Clone this repository.
$ git clone git@github.com:iSECPartners/Scout2.git

# install required packages:
$ pip install -r requirements.txt

What are the Requirements?

Valid credentials should be there to run the AWS Scout2. For read-only access to all resources we need the credentials like user account, the role and the Access Key in the following services written below:

  • Cloudtrail
  • Elastic Compute Cloud (EC2)
  • Identity and Access Management (IAM)
  • Relational Database Service (RDS)
  • Redshift
  • Simple Storage Service (S3)

By default, all the permissions which are necessary for running Scout2 have been listed by the Scout2-Default IAM policy.

Usage:

To run Scout2 from an EC2 instance with an appropriate role or from a computer already configured to use the AWS CLI, boto, or another AWS SDK (via environment variables or configuration files), run the following command:

$ python Scout2.py

For running the configured multiple profiles, we have to run the following command:
$ python Scout2.py --profile <PROFILE_NAME>

For running the Scout2 using an access key downloaded from AWS, run the following command:
$ python Scout2.py --csv-credentials <CREDENTIALS.CSV>

For running the Scout2 when MFA-Protected API Access has configured, add the following parameters to your command:
--mfa_serial <ARN_MFA_SERIAL_NUMBER> --mfa_code <MFA CODE>

If we want to view the report, just open report.html in your browser.

Format of the CSV file that contains credentials:

Users get access to download access keys in CSV file from AWS. And the format of the CSV file that includes credentials is as follow:

User Name,Access Key Id,Secret Access Key (,MFA Serial)
f00b4r,YOUR_ACCESS_KEY_ID,YOUR_ACCESS_KEY_SECRET (,arn:aws:iam::YOUR_AWS_ACCOUNT:mfa/f00b4r)


Advanced documentation:

If you want command line options then run the command:

$ python Scout2.py --help

You can also go through the GitHub pages

License:
The license is under GPLv2. 

DOWNLOAD: Click Here