Skip to content

Commit

Permalink
Malwoverview 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandreborges committed Sep 23, 2020
1 parent d77e22e commit 387240a
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1,058 deletions.
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Malwoverview

[<img alt="GitHub release (latest by date)" src="https://img.shields.io/github/v/release/alexandreborges/malwoverview?color=Red&style=for-the-badge">](https://github.com/alexandreborges/malwoverview/releases/tag/4.1) [<img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/alexandreborges/malwoverview?color=Yellow&style=for-the-badge">](https://github.com/alexandreborges/malwoverview/releases) [<img alt="GitHub Release Date" src="https://img.shields.io/github/release-date/alexandreborges/malwoverview?label=Release%20Date&style=for-the-badge">](https://github.com/alexandreborges/malwoverview/releases) [<img alt="GitHub" src="https://img.shields.io/github/license/alexandreborges/malwoverview?style=for-the-badge">](https://github.com/alexandreborges/malwoverview/blob/master/LICENSE)
[<img alt="GitHub release (latest by date)" src="https://img.shields.io/github/v/release/alexandreborges/malwoverview?color=Red&style=for-the-badge">](https://github.com/alexandreborges/malwoverview/releases/tag/4.2) [<img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/alexandreborges/malwoverview?color=Yellow&style=for-the-badge">](https://github.com/alexandreborges/malwoverview/releases) [<img alt="GitHub Release Date" src="https://img.shields.io/github/release-date/alexandreborges/malwoverview?label=Release%20Date&style=for-the-badge">](https://github.com/alexandreborges/malwoverview/releases) [<img alt="GitHub" src="https://img.shields.io/github/license/alexandreborges/malwoverview?style=for-the-badge">](https://github.com/alexandreborges/malwoverview/blob/master/LICENSE)
[<img alt="GitHub stars" src="https://img.shields.io/github/stars/alexandreborges/malwoverview?logoColor=Red&style=for-the-badge">](https://github.com/alexandreborges/malwoverview/stargazers) [<img alt="Twitter Follow" src="https://img.shields.io/twitter/follow/ale_sp_brazil?color=blueviolet&style=for-the-badge">](https://twitter.com/ale_sp_brazil)
[<img alt="PayPal" src="https://img.shields.io/badge/Donate-Paypal-brightgreen?style=for-the-badge&logo=appveyor">](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=M8F458EZH8UZE&source=url)

Expand Down Expand Up @@ -99,7 +99,7 @@
See GNU Public License on <http://www.gnu.org/licenses/>.


# Current Version: 4.1
# Current Version: 4.2

Important note: Malwoverview does NOT submit samples to Virus Total or Hybrid Analysis by
default. It submits only hashes, so respecting Non-Disclosure Agreements (NDAs). Nonetheless,
Expand Down Expand Up @@ -418,7 +418,7 @@ optional arguments:
providing the job ID. Possible returned status values are: IN_QUEUE, SUCCESS,
ERROR, IN_PROGRESS and PARTIAL_SUCCESS.
-D DOWNLOAD, --download DOWNLOAD
Downloads the sample from Hybrid Analysis, Malshare and Polyswarm. Options i
Downloads the sample from Hybrid Analysis, Malshare and Polyswarm. Options
-H or -L (Hybrid Analysis and Malshare, respectively) must be specified as well
-O option for Polyswarm engine.
-e HA_ENVIRONMENT, --haenv HA_ENVIRONMENT
Expand Down Expand Up @@ -658,9 +658,20 @@ optional arguments:
malwoverview.py -E 4 -C 8a883a74702f83a273e6c292c672f1144fd1cce8ee126cd90c
95131e870744af
malwoverview.py -E 5 -C Casing_Anomaly_ByPass | more
malwoverview.py -H 9555ea9a1909120dd9be988d91cad345302b38884d2343ee16ab994ac6c5c7df -D 1
malwoverview.py -L 081dc7af98fe601e09d81a4698f0df119ac612be1984f1d365b4cd9c21f550a1 -D 1
malwoverview.py -O 081dc7af98fe601e09d81a4698f0df119ac612be1984f1d365b4cd9c21f550a1 -D 1

# HISTORY

Version 4.2:

This version:

* Fixes -L option from Malware.
* Introduces additional instruction on README.md (this file) to help professionals
to get the APIs.

Version 4.1:

This version:
Expand Down
18 changes: 9 additions & 9 deletions malwoverview/malwoverview.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# Corey Forman (https://github.com/digitalsleuth)
# Christian Clauss (https://github.com/cclauss)

# Malwoverview.py: version 4.1
# Malwoverview.py: version 4.2

import os
import sys
Expand Down Expand Up @@ -60,7 +60,7 @@
__author__ = "Alexandre Borges"
__copyright__ = "Copyright 2018-2020, Alexandre Borges"
__license__ = "GNU General Public License v3.0"
__version__ = "4.1"
__version__ = "4.2"
__email__ = "alexandreborges at blackstormsecurity.com"

haurl = 'https://www.hybrid-analysis.com/api/v2'
Expand Down Expand Up @@ -2560,19 +2560,19 @@ def malsharehashsearch(filehash):
maltext2 = json.loads(malresponse2.text)
if (maltext2):
try:
if (maltext2.get('sha256')):
urltemp = maltext2['source']
if ((maltext2[0])['sha256']):
urltemp = (maltext2[0])['source']
if (validators.url(urltemp)) == True:
loc = urltoip(urltemp)
else:
loc = ''
if (bkg == 1):
print((mycolors.reset + "sha256: " + mycolors.foreground.yellow + "%s\n" % maltext2['sha256'] + mycolors.reset + "sha1: " + mycolors.foreground.yellow + "%s\n" % maltext2['sha1'] + mycolors.reset + "md5: " + mycolors.foreground.yellow + "%s\n" % maltext2['md5'] + mycolors.reset + "type: " + mycolors.foreground.lightcyan + "%s\n" % maltext2['type'] + mycolors.reset + "source: " + mycolors.foreground.lightred + "%s\n" % maltext2['source'] + mycolors.reset + "city: " + mycolors.foreground.lightgreen + "%s" % loc))
for k in maltext2['yarahits']['yara']:
print((mycolors.reset + "sha256: " + mycolors.foreground.yellow + "%s\n" % (maltext2[0])['sha256'] + mycolors.reset + "sha1: " + mycolors.foreground.yellow + "%s\n" % (maltext2[0])['sha1'] + mycolors.reset + "md5: " + mycolors.foreground.yellow + "%s\n" % (maltext2[0])['md5'] + mycolors.reset + "type: " + mycolors.foreground.lightcyan + "%s\n" % (maltext2[0])['type'] + mycolors.reset + "source: " + mycolors.foreground.lightred + "%s\n" % (maltext2[0])['source'] + mycolors.reset + "city: " + mycolors.foreground.lightgreen + "%s" % loc))
for k in (maltext2[0])['yarahits']['yara']:
print(mycolors.reset + "Yara Hits: " + mycolors.foreground.lightgreen + str(k))
else:
print((mycolors.reset + "sha256: " + mycolors.foreground.green + "%s\n" % maltext2['sha256'] + mycolors.reset + "sha1: " + mycolors.foreground.green + "%s\n" % maltext2['sha1'] + mycolors.reset + "md5: " + mycolors.foreground.green +"%s\n" % maltext2['md5'] + mycolors.reset + "type: " + mycolors.foreground.cyan + "%s\n" % maltext2['type'] + mycolors.reset + "source: " + mycolors.foreground.red + "%s\n" % maltext2['source'] + mycolors.reset + "city: " + mycolors.foreground.blue + "%s" % loc))
for k in maltext2['yarahits']['yara']:
print((mycolors.reset + "sha256: " + mycolors.foreground.green + "%s\n" % (maltext2[0])['sha256'] + mycolors.reset + "sha1: " + mycolors.foreground.green + "%s\n" % (maltext2[0])['sha1'] + mycolors.reset + "md5: " + mycolors.foreground.green +"%s\n" % (maltext2[0])['md5'] + mycolors.reset + "type: " + mycolors.foreground.cyan + "%s\n" % (maltext2[0])['type'] + mycolors.reset + "source: " + mycolors.foreground.red + "%s\n" % (maltext2[0])['source'] + mycolors.reset + "city: " + mycolors.foreground.blue + "%s" % loc))
for k in (maltext2[0])['yarahits']['yara']:
print(mycolors.reset + "Yara Hits: " + mycolors.foreground.purple + str(k))

if (maldownload == 1):
Expand Down Expand Up @@ -6255,7 +6255,7 @@ def dirchecking(repo2):
valhallaarg = ''
VALHALLAAPIx = ''

parser = argparse.ArgumentParser(prog=None, description="Malwoverview is a malware triage tool written by Alexandre Borges. The current version is 4.1", usage= "python malwoverview.py -c <API configuration file> -d <directory> -f <fullpath> -b <0|1> -v <0|1|2|3> -a <0|1|2|3|4|5> -x <0|1> -w <0|1> -u <url> -H <hash file> -V <filename> -D <0|1> -e<0|1|2|3|4> -A <filename> -g <job_id> -r <domain> -t <0|1> -l <1-14> -L <hash> -U <url> -S <url> -z <tags> -K <0|1|2> -j <hash> -J <hash> -P <filename> -R <PE file, IP address, domain or URL> -G <0|1|2|3|4> -y <0|1|2|3> -Y <file name> -Y <file name> -T <file name> -W <tag> -k <signature> -I <ip address> -n <1|2|3|4|5> -N <argument> -M <1-8> -m <argument> -Q <1-5> -q <argument> -E <1|2|3|4|5> -C <argument>")
parser = argparse.ArgumentParser(prog=None, description="Malwoverview is a malware triage tool written by Alexandre Borges. The current version is 4.2", usage= "python malwoverview.py -c <API configuration file> -d <directory> -f <fullpath> -b <0|1> -v <0|1|2|3> -a <0|1|2|3|4|5> -x <0|1> -w <0|1> -u <url> -H <hash file> -V <filename> -D <0|1> -e<0|1|2|3|4> -A <filename> -g <job_id> -r <domain> -t <0|1> -l <1-14> -L <hash> -U <url> -S <url> -z <tags> -K <0|1|2> -j <hash> -J <hash> -P <filename> -R <PE file, IP address, domain or URL> -G <0|1|2|3|4> -y <0|1|2|3> -Y <file name> -Y <file name> -T <file name> -W <tag> -k <signature> -I <ip address> -n <1|2|3|4|5> -N <argument> -M <1-8> -m <argument> -Q <1-5> -q <argument> -E <1|2|3|4|5> -C <argument>")
parser.add_argument('-c', '--config', dest='config', type=str, metavar = "CONFIG FILE", default = (USER_HOME_DIR + '.malwapi.conf'), help='Use a custom config file to specify API\'s')
parser.add_argument('-d', '--directory', dest='direct',type=str, metavar = "DIRECTORY", help='Specifies the directory containing malware samples.')
parser.add_argument('-f', '--filename', dest='fpname',type=str, metavar = "FILENAME", default = '', help='Specifies a full path to a malware sample. It returns general information about the file (any filetype)')
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

setup(
name="malwoverview",
version="4.1",
version="4.2",
author="Alexandre Borges",
author_email="[email protected]",
license="GNU GPL v3.0",
Expand Down
Loading

0 comments on commit 387240a

Please sign in to comment.