Coder Social home page Coder Social logo

alexandreborges / malwoverview Goto Github PK

View Code? Open in Web Editor NEW
2.9K 120.0 442.0 39.01 MB

Malwoverview is a first response tool used for threat hunting and offers intel information from Virus Total, Hybrid Analysis, URLHaus, Polyswarm, Malshare, Alien Vault, Malpedia, Malware Bazaar, ThreatFox, Triage, InQuest and it is able to scan Android devices against VT.

Home Page: https://github.com/alexandreborges/malwoverview

License: GNU General Public License v3.0

Python 100.00%
malware virustotal malpedia urlhaus alienvault malshare threathunting malwarebazaar threatfox cybersecurity

malwoverview's People

Contributors

alexandreborges avatar cclauss avatar digitalsleuth avatar macmod avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

malwoverview's Issues

error while connecting to virus total

i have trying to run the tool one a example url and also try to get a report from a while but "Error While connecting to Viru Total" error is thrown

ModuleNotFoundError: No module named 'malwoverview.modules'; 'malwoverview' is not a package

Cloning repo
Creating virtual env python 3.9.2(also tried with 3.12)
Installing requirements using pip install -r requirements.txt
then running
python .\malwoverview\malwoverview.py -d "c:\TestPath"

Its giving the error below, am I doing it wrong currently working to fix it but wanted to bring it up,
malwoverview\malwoverview.py", line 33, in
from malwoverview.modules.alienvault import AlienVaultExtractor
ModuleNotFoundError: No module named 'malwoverview.modules'; 'malwoverview' is not a package

Threatcrowd API is not working

Threatcrowd can not connect anymore. Is this because they are Alien vaults now? Will there be a fix for this?
Polyswarm also seems to have problem with the connection

unable to run : configparser.NoSectionError: No section: 'INQUEST'

remnux@remnux:~/Downloads/malwaretest1$ ls 
VybMP.dll
remnux@remnux:~/Downloads/malwaretest1$ openssl sha256 VybMP.dll 
SHA256(VybMP.dll)= c0fd1b90093268665e744a6d283fbb250a712020a2bbb138122fbc4fb3185b28

remnux@remnux:~$ malwoverview -d /home/remnux/Downloads/malwaretest1/
Traceback (most recent call last):
  File "/home/remnux/.local/bin/malwoverview", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/remnux/.local/lib/python3.12/site-packages/malwoverview/malwoverview.py", line 117, in main
    INQUESTAPI = config_dict.get('INQUEST', 'INQUESTAPI')
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/configparser.py", line 759, in get
    d = self._unify_values(section, vars)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/configparser.py", line 1132, in _unify_values
    raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'INQUEST'
remnux@remnux:~$ 

remnux@remnux:~$ cat /etc/os-release 
NAME="Ubuntu"
VERSION="20.04.6 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.6 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
remnux@remnux:~$ 

remnux@remnux:~$ python3.12
Python 3.12.5 (main, Aug 13 2024, 12:01:39) [GCC 9.4.0] on linux

remnux@remnux:~$ locate malwapi.conf
/home/remnux/.malwapi.conf
/home/remnux/.local/lib/python3.12/site-packages/home/remnux/.malwapi.conf



remnux@remnux:~$ pip3.12 install -U pefile
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pefile in ./.local/lib/python3.12/site-packages (2023.2.7)
remnux@remnux:~$ pip3.12 install -U colorama
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: colorama in ./.local/lib/python3.12/site-packages (0.4.6)
remnux@remnux:~$ pip3.12 install -U simplejson
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: simplejson in ./.local/lib/python3.12/site-packages (3.19.2)
remnux@remnux:~$ pip3.12 install -U python-magic
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: python-magic in ./.local/lib/python3.12/site-packages (0.4.27)
remnux@remnux:~$ pip3.12 install -U requests
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: requests in ./.local/lib/python3.12/site-packages (2.32.3)
Requirement already satisfied: charset-normalizer<4,>=2 in ./.local/lib/python3.12/site-packages (from requests) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in ./.local/lib/python3.12/site-packages (from requests) (3.7)
Requirement already satisfied: urllib3<3,>=1.21.1 in ./.local/lib/python3.12/site-packages (from requests) (2.2.2)
Requirement already satisfied: certifi>=2017.4.17 in ./.local/lib/python3.12/site-packages (from requests) (2024.7.4)
remnux@remnux:~$ pip3.12 install -U validators
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: validators in ./.local/lib/python3.12/site-packages (0.33.0)
remnux@remnux:~$ pip3.12 install -U geocoder
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: geocoder in ./.local/lib/python3.12/site-packages (1.38.1)
Requirement already satisfied: click in ./.local/lib/python3.12/site-packages (from geocoder) (8.1.7)
Requirement already satisfied: future in ./.local/lib/python3.12/site-packages (from geocoder) (1.0.0)
Requirement already satisfied: ratelim in ./.local/lib/python3.12/site-packages (from geocoder) (0.1.6)
Requirement already satisfied: requests in ./.local/lib/python3.12/site-packages (from geocoder) (2.32.3)
Requirement already satisfied: six in ./.local/lib/python3.12/site-packages (from geocoder) (1.16.0)
Requirement already satisfied: decorator in ./.local/lib/python3.12/site-packages (from ratelim->geocoder) (5.1.1)
Requirement already satisfied: charset-normalizer<4,>=2 in ./.local/lib/python3.12/site-packages (from requests->geocoder) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in ./.local/lib/python3.12/site-packages (from requests->geocoder) (3.7)
Requirement already satisfied: urllib3<3,>=1.21.1 in ./.local/lib/python3.12/site-packages (from requests->geocoder) (2.2.2)
Requirement already satisfied: certifi>=2017.4.17 in ./.local/lib/python3.12/site-packages (from requests->geocoder) (2024.7.4)
remnux@remnux:~$ pip3.12 install -U polyswarm-api
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: polyswarm-api in ./.local/lib/python3.12/site-packages (3.9.0)
Requirement already satisfied: requests~=2.31 in ./.local/lib/python3.12/site-packages (from polyswarm-api) (2.32.3)
Requirement already satisfied: python-dateutil~=2.9 in ./.local/lib/python3.12/site-packages (from polyswarm-api) (2.9.0.post0)
Requirement already satisfied: six>=1.5 in ./.local/lib/python3.12/site-packages (from python-dateutil~=2.9->polyswarm-api) (1.16.0)
Requirement already satisfied: charset-normalizer<4,>=2 in ./.local/lib/python3.12/site-packages (from requests~=2.31->polyswarm-api) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in ./.local/lib/python3.12/site-packages (from requests~=2.31->polyswarm-api) (3.7)
Requirement already satisfied: urllib3<3,>=1.21.1 in ./.local/lib/python3.12/site-packages (from requests~=2.31->polyswarm-api) (2.2.2)
Requirement already satisfied: certifi>=2017.4.17 in ./.local/lib/python3.12/site-packages (from requests~=2.31->polyswarm-api) (2024.7.4)
remnux@remnux:~$ pip3.12 install -U pathlib
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pathlib in ./.local/lib/python3.12/site-packages (1.0.1)
remnux@remnux:~$ pip3.12 install -U configparser
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: configparser in ./.local/lib/python3.12/site-packages (7.0.0)
remnux@remnux:~$ 

Suggestion - Add support for Any.Run

Hi, this seems to be an awesome project! Congrats!

Would it be possible to add Any.Run for the following features:

  • Show hash information
  • Check suspect files
  • Check URLs
  • Download malware samples
  • Submit malware samples (still unsure if this is a great idea as any.run main interest is to interact with malware submitted, but still...)
  • List last suspected URLs
  • List last payloads

Regards

pathlib broken in requirements.txt

Downloaded malwoverview-4.4.2.zip from the releases section @ github/alexandreborges/maloverview

PS> pip install -r requirements.txt
While installing dependencies on 3.10 in Windows 11 I got this error:

ERROR: Could not find a version that satisfies the requirement pathlib>=1.0.1 (from versions: 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.97, 1.0, 1.0.1)
ERROR: No matching distribution found for pathlib>=1.0.1

I am attempting to use pathlib2 instead (https://pypi.org/project/pathlib2/)

PS> pip install pathlib2

If you don't hear back from me I'll be knee-deep in malware samples.

That is all

Cleaning up logical errors and syntax

Hi Alexander,

This is a great tool, and it can be improved quite a lot by refactoring and tweeking the code a little so that it can be easily maintainable and easy to follow up for someone who wants to improve.

As I'm going through the code I noticed a lot of places where the logics are shortcircuited, like in packed function, the condition n<3 will never reach, and the whole if conditions block can be replaced with a single return condition.

Also, in some functions there is a repeated code in both if and else conditions which can be easily refactored to make it less confusing and more self explanatory.

I'm making changes as I'm going through the code, so you can expect a pull request by tomorrow or day after tomorrow. Meanwhile I'm informing you for ensuring that you're not adding any new features or changing the existing code which can broke my pull request.

I've few more suggestions on how we can refactor the code into small pieces, which we can discuss if you're interested after I go through the complete code.

Have a good day.

Thanks & Regards,
Naveen Namani

.malwapi.conf file is not in its expected location since v5.4.3

When installing malwoverview, the .malwapi.conf file has typically been placed in lib/python3.8/site-packages/root/.malwapi.conf, however since v5.4.3, it's now located in lib/python3.8/site-packages/home/aborges/.malwapi.conf

This behavior is identical for 5.4.3 and 5.4.4, but does not exist in 5.4.2 or earlier. I believe this may have occurred during build time, where sudo may have been used previously, but was not for these builds.

Convert malwoverview to use a CLI framework

Hi,

This is more of a question than an issue but malwoverview is just one massive file with what appears to be a bunch of different modules (VirusTotal, URLHaus, etc). Have you considered changing it to use a CLI framework such as Click or Typer to make it more modular and easier for people writing their own tools to use?

Error while connecting to Virus Total

Greetings,
I am facing with the issue while trying to integrate my VT API key with the tool.

I inserted the API key in the config files in my home directory and everywhere else where malwapi.conf would be located just in case
image

Whenever I try to scan a hash it tells me that it can't connect VT database

image

Virus total connection issue

running the cmd with both arg -u or -r returns back with error message "Error while connecting to Virus Total!" given that I am using Notebook terminal.
aaa

Add dedicated changelog

Hi @alexandreborges,

Nice project 👍 I was looking at your project today and I have a small documentation proposal. I suggest having a dedicated changelog for the project. Would you be open to have one like it is documented in Keep a Changelog? It's easier to follow the changes and have a quick overview of the current changes, than scrolling through the readme, and it allows linking directly to the corresponding version's section.

What do you think?

Cheers
Andreas

parsing issue with -v 6

command:
python malwoverview.py -v 6 -V 1.1.1.1 -c .malwapi.conf
output:

Traceback (most recent call last):
  File "malwoverview.py", line 11043, in <module>
    vtipwork(ipaddrvtx, urlipvt3)
  File "malwoverview.py", line 803, in vtipwork
    if('as_owner' in vttext['data']['attributes']):
KeyError: 'data'

Python 3.8.10

Malwoverview commands on memory dump files.

While trying to execute malwoverview command on memorydump i.e .mem files the command to export to virus total doesnt seems to work.
Is there a way out such that the processes in a memory dump could be analyzed and exported to virus total or malshare?
malwoverview1
malwoverview2

Three undefined names in Python code

flake8 testing of https://github.com/alexandreborges/malwoverview on Python 3.8.3

$ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics

./malwoverview/malwoverview.py:1664:28: F821 undefined name 'polywarm'
                artifact = polywarm.download(DOWN_DIR, sha256)
                           ^
./malwoverview/malwoverview.py:5603:58: F821 undefined name 'package'
            print((mycolors.foreground.green + "%-08s" % package), end=' ')
                                                         ^
./malwoverview/malwoverview.py:6430:9: F821 undefined name 'alien_urls'
        alien_urls(urlalien,argx)
        ^
3     F821 undefined name 'polywarm'
3

https://flake8.pycqa.org/en/latest/user/error-codes.html

On the flake8 test selection, this PR does not focus on "style violations" (the majority of flake8 error codes that psf/black can autocorrect). Instead, these tests are focus on runtime safety and correctness:

  • E9 tests are about Python syntax errors usually raised because flake8 can not build an Abstract Syntax Tree (AST). Often these issues are a sign of unused code or code that has not been ported to Python 3. These would be compile-time errors in a compiled language but in a dynamic language like Python, they result in the script halting/crashing on the user.
  • F63 tests are usually about the confusion between identity and equality in Python. Use ==/!= to compare str, bytes, and int literals is the classic case. These are areas where a == b is True but a is b is False (or vice versa). Python >= 3.8 will raise SyntaxWarnings on these instances.
  • F7 tests logic errors and syntax errors in type hints
  • F82 tests are almost always undefined names which are usually a sign of a typo, missing imports, or code that has not been ported to Python 3. These also would be compile-time errors in a compiled language but in Python, a NameError is raised which will halt/crash the script on the user.

Hoisting Nursing Instruction: The Effect of Composing Administrations

Nursing understudies face an extraordinary arrangement of difficulties that require a sensitive harmony between clinical practice and scholarly obligations. In this requesting climate, nursing composing administrations have arisen as a urgent emotionally supportive network, giving genuinely necessary help to understudies. These administrations offer masterfully made papers that satisfy scholarly guidelines as well as assist understudies with dealing with their time all the more really, upgrade how they might interpret complex points, and keep up with scholastic honesty. This paper investigates the multi-layered advantages of nursing composing administrations and their part in supporting nursing understudies' instructive and proficient excursions.

One of the essential benefits of nursing composing administrations is the arrangement of top caliber, well-informed scholastic papers. Nursing programs request a profound comprehension of clinical ideas and the capacity to verbalize these thoughts obviously recorded as a hard copy. Composing administrations utilize experts who are knowledgeable in nursing and scholastic composition, it is both precise and understandable to guarantee that the substance. This mastery permits understudies to submit papers that satisfy the thorough guidelines of their scholastic establishments, prompting better grades and a more profound comprehension of the topic.

Using time effectively is another basic region where nursing writing services demonstrate significant. Nursing understudies frequently shuffle clinical revolutions, talks, and individual responsibilities, allowing for broad examination and composing. The additional strain of fulfilling tight time constraints can prompt pressure and burnout. By re-appropriating composing undertakings to proficient administrations, understudies can save time to zero in on their clinical practice and other significant obligations. This designation assists understudies with fulfilling time constraints as well as advances a better balance between serious and fun activities, which is fundamental for their general prosperity and scholastic execution.

Additionally, nursing composing administrations offer customized help custom-made to the remarkable requirements of every understudy. Whether it is an exposition, research paper, contextual investigation, or exposition, these administrations furnish tweaked help that lines up with the particular prerequisites of the task. This individualized methodology is especially useful for understudies who might battle with specific parts of composing, like creating reasonable contentions, coordinating their papers, or complying to explicit arranging rules. By tending to these difficulties, composing administrations assist understudies with further developing their composing abilities and accomplish better scholarly results.

Nursing composing administrations likewise assume a critical part in advancing scholastic trustworthiness. Legitimate administrations accentuate the significance of innovation and appropriate reference, assisting understudies with staying away from counterfeiting and different types of scholarly wrongdoing. By giving direction on the most proficient method to reference sources accurately and foster unique substance, these administrations add to the scholarly and proficient uprightness of nursing understudies. This emphasis on moral composing rehearses is fundamental in cultivating a culture of trustworthiness and responsibility inside the nursing calling.

Also, nursing composing administrations offer important learning valuable open doors for understudies. Teaming up with proficient authors permits understudies to acquire bits of knowledge into powerful composing procedures, decisive reasoning, and scientific abilities. These abilities are fundamental for both scholarly achievement and expert practice. Clear and powerful correspondence is essential in nursing, whether it includes composing patient reports, creating care plans, or directing exploration. The mentorship and direction given by composing administrations can improve understudies' abilities to compose and set them up for fruitful professions in nursing.

All in all, nursing composing administrations are irreplaceable devices that help nursing understudies in their scholar and expert excursions. By giving superior grade, customized help, these administrations assist understudies with dealing with their time actually, diminish pressure, and make scholarly progress. They advance moral composing practices and proposition important opportunities for growth that add to the improvement of fundamental abilities. As the requests of nursing training keep on advancing, the help given by nursing composing administrations stays basic in assisting understudies with exploring their scholarly obligations and get ready for their future professions in medical care.

feature to download by hash from any available services

My primary use-case for malwoverview would be to download a hash by name from whatever services had it available. I'd love to have an option to simply provide the sha256 and have the script try all services for which I have API keys included until a download is found. Is this a feature you'd consider accepting a PR for or adding yourself?

Unrelated (happy to file a separate issue but don't want to spam you with too many requests!): have you considered using pathlib.Path so you don't have to do things like https://github.com/alexandreborges/malwoverview/blob/master/malwoverview/malwoverview.py#L68-L74 ?

configmalw.py is not used in version 2.0.8

Config file appears not being used in pip version of malwoverview (2.0.8), which forces end user to provide API keys directly in malwoverview to work with tool. (In my case it worked as temporary workaround)
2019-12-30_13-32

Multiprocessing or threading for bulk file scans

Right now the app only performs one operation at a time and even with a private key for VirusTotal it is very time consuming to lookup say 100 files or even more so 5000 files.

It seems like the logic of what to do with a file/URL (which functions and checks to run) should be outside of main in their own Class(es) or Functions with the arguments on which functions to run passed along as kwargs or whatnot, and then let main handle dispatching files/URLs for multiprocessing or multithreading if the number of files is above some arbitrary or user defined limit.

Is this something you’d be interested in implementing? I can help with (or directly submit) the PR. Just think it’d be super useful to speed up private key lookups

malshare negative result downloaded

~ ❱ malwoverview -l 1 -L 04af0519d0dbe20bc8dc8ba4d97a791ae3e3474c6372de83087394d219babd47

Sample not found by the provided hash.



MALWARE SAMPLE SAVED!
~ ❱ file 04af0519d0dbe20bc8dc8ba4d97a791ae3e3474c6372de83087394d219babd47
04af0519d0dbe20bc8dc8ba4d97a791ae3e3474c6372de83087394d219babd47: ASCII text, with no line terminators
~ ❱ cat 04af0519d0dbe20bc8dc8ba4d97a791ae3e3474c6372de83087394d219babd47
Sample not found by hash (04af0519d0dbe20bc8dc8ba4d97a791ae3e3474c6372de83087394d219babd47)⏎

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.