Git Product home page Git Product logo

manalyze's Introduction

Manalyze Build Status Coverage Status Documentation

Introduction

Manalyze is a static analysis tool for PE files that you can use to conduct primary assessment on an executable (or set of executables). It collects weak signals that could indicate malicious behavior and displays information that can help a subsequent manual analysis.

If you want to see some sample reports generated by the tool, feel free to try out the web service I created for it: manalyzer.org.

Table of Contents

A static analyzer for PE files

Manalyze was written in C++ for Windows and Linux and is released under the terms of the GPLv3 license. It is a robust parser for PE files with a flexible plugin architecture which allows users to statically analyze files in-depth. Manalyze...

  • Identifies a PE's compiler
  • Detects packed executables
  • Applies ClamAV signatures
  • Searches for suspicious strings
  • Looks for malicious import combinations (i.e. WriteProcessMemory + CreateRemoteThread)
  • Detects cryptographic constants (just like IDA's findcrypt plugin)
  • Can submit hashes to VirusTotal
  • Verifies authenticode signatures (on Windows only)

How to build

There are few things I hate more than checking out an open-source project and spending two hours trying to build it. This is why I did my best to make Manalyze as easy to build as possible. If these few lines don't work for you, then I have failed at my job and you should drop me a line so I can fix this.

On Linux and BSD (tested on Debian Bullseye and FreeBSD 10.2)

$> [sudo or as root] apt-get install libboost-regex-dev libboost-program-options-dev libboost-system-dev libboost-filesystem-dev libssl-dev build-essential cmake git
$> [alternatively, also sudo or as root] pkg install boost-libs-1.55.0_8 libressl cmake git
$> git clone https://github.com/JusticeRage/Manalyze.git && cd Manalyze
$> cmake .
$> make -j5
$> cd bin && ./manalyze --version

Finally, if you want to access Manalyze from every directory on your machine, install it using $> make install from the root folder of the project.

On Windows

  • Get the Boost libraries from boost.org and install CMake.
  • Build the boost libraries
    • cd boost_1_XX_0 && ./bootstrap.bat && ./b2.exe --build-type=complete --with-regex --with-program_options --with-system --with-filesystem
    • Add an environment variable BOOST_ROOT which contains the path to your boost_1_XX_0 folder.
  • Download and install Git
  • git clone https://github.com/JusticeRage/Manalyze.git && cd Manalyze && cmake .
  • A Visual Studio project manalyze.sln should have appeared in the Manalyze folder!

On OS X (tested on Mojave)

# Skip these two lines if you already have a sane build environment
user$ xcode-select --install
user$ sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /

user$ git clone https://github.com/JusticeRage/Manalyze.git && cd Manalyze
user$ brew install openssl boost
user$ cmake . -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl/ && make -j5
user$ bin && ./manalyze --version

Offline builds

If you need to build Manalyze on a machine with no internet access, you have to manually check out the following projects:

Place the two folders in the external folder as external/yara and external/hash-library respectively. Then run cmake . -DGitHub=OFF and continue as you normally would.

Binaries

Docker image

A Docker image for Manalyze is provided by the community. Run docker pull evanowe/manalyze and get additional information here.

Generating ClamAV rules

Since ClamAV signatures are voluminous and updated regularly, it didn't make a lot of sense to distribute them from GitHub or with the binary. When you try using the ClamAV plugin for the first time, you will likely encounter the following error message: [!] Error: Could not load yara_rules/clamav.yara. In order to generate them, simply run the update_clamav_signatures.py Python script located in bin/yara_rules.

Run the script whenever you want to refresh the signatures.

Usage

$ ./manalyze.exe --help
Usage:
  -h [ --help ]         Displays this message.
  -v [ --version ]      Prints the program's version.
  --pe arg              The PE to analyze. Also accepted as a positional
                        argument. Multiple files may be specified.
  -r [ --recursive ]    Scan all files in a directory (subdirectories will be
                        ignored).
  -o [ --output ] arg   The output format. May be 'raw' (default) or 'json'.
  -d [ --dump ] arg     Dump PE information. Available choices are any
                        combination of: all, summary, dos (dos header), pe (pe
                        header), opt (pe optional header), sections, imports,
                        exports, resources, version, debug, tls, config, delay, rich
  --hashes              Calculate various hashes of the file (may slow down the
                        analysis!)
  -x [ --extract ] arg  Extract the PE resources to the target directory.
  -p [ --plugins ] arg  Analyze the binary with additional plugins. (may slow
                        down the analysis!)

Available plugins:
  - clamav: Scans the binary with ClamAV virus definitions.
  - compilers: Tries to determine which compiler generated the binary.
  - peid: Returns the PEiD signature of the binary.
  - strings: Looks for suspicious strings (anti-VM, process names...).
  - findcrypt: Detects embedded cryptographic constants.
  - packer: Tries to structurally detect packer presence.
  - imports: Looks for suspicious imports.
  - resources: Analyzes the program's resources.
  - mitigation: Displays the enabled exploit mitigation techniques (DEP, ASLR, etc.).
  - overlay: Analyzes data outside of the PE's boundaries.
  - authenticode: Checks if the digital signature of the PE is valid.
  - virustotal: Checks existing AV results on VirusTotal.
  - all: Run all the available plugins.

Examples:
  manalyze.exe program.exe
  manalyze.exe -dresources -dexports -x out/ program.exe
  manalyze.exe --dump=imports,sections --hashes program.exe
  manalyze.exe -r malwares/ --plugins=peid,clamav --dump all

People using Manalyze

Contact me or open a pull request if you would like to be added to this list!

Contact

E-Mail Twitter GnuPG

manalyze's People

Contributors

gy741 avatar itayc0hen avatar jeromeleonard avatar justicerage avatar kaganisildak avatar rc0r avatar wesinator 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

manalyze's Issues

Version Disclosure (nginx)

Hello team,
I've detected a version disclosure (Nginx) in the target web server's HTTP response. This information might help an attacker gain a greater understanding of the systems in use and potentially develop further attacks targeted at the specific version of Nginx.

URL: https://manalyzer.org/
HTTP Response:
HTTP/1.1 200 OK
Server: nginx/1.2.1
Connection: keep-alive
Content-Encoding:
Strict-Transport-Security: max-age=15768000
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Date: Tue, 11 Apr 2017 00:02:26 GMT

identified version: 1.2.1

and you are using an out-of-date version of Nginx. Since this is an old version of the software, it may be vulnerable to attacks.

Error parsing ldb file

Hello,

This might be a case of user error, but when I try to run parse_clamav.py against a custom set of clam rules (https://raw.githubusercontent.com/wmetcalf/clam-punch/master/miscreantpunch099.ldb) it'll generate an error

Unable to understand the following offset: 48344426616d703b48354126616d703b*48353426616d703b48363826616d703b48363926616d703b48373326616d703b48323026616d703b48373026616d703b48373226616d703b48366626616d703b48363726616d703b48373226616d703b48363126616d703b48366426616d703b

This appears to be from this line in the ldb file.

MiscreantPunch.EXEInsideOfDoc.ASASCII.2;Target:0;(0);48344426616d703b48354126616d703b*48353426616d703b48363826616d703b48363926616d703b48373326616d703b48323026616d703b48373026616d703b48373226616d703b48366626616d703b48363726616d703b48373226616d703b48363126616d703b48366426616d703b::i

Any help you can give would be greatly appreciated!

Clamav Cloudflare DDoS protection causes signature updater to fail.

Clamav has recently started using Cloudflare to front their signature download page. If you use Python, then the response will be a 403. The text says that it wants cookies to be enabled. Using a web browser works fine to download the AV update package.

>>> import requests
>>> r = requests.get("http://database.clamav.net/daily.cvd")
>>> r
<Response [403]>

Add a make install command

E-mail received a few days ago:

I've been using your Manalyzer for a few days on Linux to try to triage some binaries. Thanks for all your work, btw. I'd like to start using it on a wider basis and would like to be able to do a "make install" to have it available to everyone on my Linux system. After a successful, build, though:

[gcomeaux@localhost Manalyze]$ make install
make: *** No rule to make target `install'. Stop.

... Is there any way to easily get an installation with all dependencies in their proper place? I'm not a CMake expert, but there must be some way to specify a CMake target to get that working.

Thank you for any thoughts or suggestions.

Unable to parse ClamAV signatures

C:\Users\50CAL\Manalyze\bin\yara_rules>python update_clamav_signatures.py
Downloading: main.cvd Bytes: 117892267
Rule Win.Trojan.EOL-1 seems to be malformed. Skipping...
Downloading: daily.cvd Bytes: 41899296
Rule Eicar-Test-Signature already exists!
Unable to translate a logical signature for Html.Phishing.DropboxVM-1. Skipping...
Unable to translate a logical signature for Win.Worm.Njrat-2. Skipping...
Unable to translate a logical signature for Win.Trojan.B-468. Skipping...
Unable to translate a logical signature for Win.Dropper.Agent-1388636. Skipping...
Unable to translate a logical signature for Win.Dropper.Kuluoz-2905. Skipping...
Unable to translate a logical signature for Win.Trojan.Zbot-64725. Skipping...
Unable to translate a logical signature for Win.Downloader.Dalexis-24. Skipping...
Unable to translate a logical signature for Win.Trojan.Fareit-403. Skipping...
Unable to translate a logical signature for Win.Trojan.PoseidonURL-1. Skipping...
Unable to translate a logical signature for Win.Downloader.Upatre-6142. Skipping...
Unable to translate a logical signature for Legacy.Trojan.Agent-1388638. Skipping...
Unable to translate a logical signature for Win.Trojan.Mrblack-2. Skipping...
Unable to translate a logical signature for Win.Trojan.ProjectHook-1. Skipping...
Rule Win.Trojan.ssid18332-1 seems to be malformed. Skipping...
Unable to translate a logical signature for Win.Trojan.UPS-1. Skipping...
Unable to translate a logical signature for Win.Ransomware.Cerber-8. Skipping...
Unable to translate a logical signature for Win.Ransomware.Cerber-10. Skipping...
Rule Img.Exploit.CVE_2016_5684-1 seems to be malformed. Skipping...
Unable to translate a logical signature for Win.Trojan.Athena-5329665-0. Skipping...
Rule Txt.Downloader.Generic-5657804-1 seems to be malformed. Skipping...
Rule Txt.Downloader.Generic-5657855-0 seems to be malformed. Skipping...
Rule Win.Downloader.Upatre-5744087-0 seems to be malformed. Skipping...
Rule Win.Downloader.Upatre-5744089-0 seems to be malformed. Skipping...
Rule Win.Downloader.Upatre-5744090-0 seems to be malformed. Skipping...
Rule Win.Downloader.Upatre-5744092-0 seems to be malformed. Skipping...
Rule Win.Downloader.Upatre-5744093-0 seems to be malformed. Skipping...
Rule Win.Downloader.Upatre-5744094-0 seems to be malformed. Skipping...
Rule Win.Trojan.Xtreme-5744910-0 seems to be malformed. Skipping...
Unable to translate a logical signature for Win.Trojan.Vbswap-5909855-1. Skipping...
Unable to translate a logical signature for Win.Ransomware.Cerber-6162245-0. Skipping...
Rule Win.Exploit.CVE_2017_0080-6184298-0 seems to be malformed. Skipping...
Unable to translate a logical signature for Win.Ransomware.PyCL-6185098-3. Skipping...
Unable to translate a logical signature for Win.Trojan.ROKRAT-6189297-0. Skipping...
Unable to translate a logical signature for Win.Trojan.ROKRAT-6189299-0. Skipping...
Unable to translate a logical signature for Win.Trojan.Bladabindi-6196648-0. Skipping...
Unable to translate a logical signature for Win.Trojan.Bladabindi-6196650-0. Skipping...
Unable to translate a logical signature for Win.Virus.Hematite-6232506-0. Skipping...
Rule Swf.Exploit.CVE_2017_2934-6261685-0 seems to be malformed. Skipping...
Unable to translate a logical signature for Win.Trojan.Generic-6268209-0. Skipping...
Rule Win.Exploit.CVE_2016_3301-5259504-1 seems to be malformed. Skipping...
Rule Js.Downloader.Generic-6296416-0 seems to be malformed. Skipping...
Unable to translate a logical signature for Win.Trojan.Generic-6297788-0. Skipping...
Rule Win.Exploit.CVE_2017_3036-6309463-0 seems to be malformed. Skipping...
Rule Archive.Exploit.CVE_2017_2823-6316562-0 seems to be malformed. Skipping...
Unable to translate a logical signature for Win.Trojan.Generic-6323528-0. Skipping...
Rule Html.Exploit.CVE_2016_7288-6327688-0 seems to be malformed. Skipping...
Rule Win.Exploit.CVE_2017_2781-6316049-1 seems to be malformed. Skipping...
Unable to understand the following offset: 5c6a706567626c6970{-250}66666438

Use of potentially uninitialized FILE pointer in PE::get_raw_bytes()

Hi,

I came across just another minor issue. Consider the following:

int main(int argc, char *argv[]) {
  // check argc == 2
  mana::PE pe(argv[1]);
  pe.get_raw_bytes(-1);
  return 0;
}

In case argv[1] is set to a nonexistent file this will segfault during fseek() called from PE::get_raw_bytes() since PE::_file_handle is not initialized and doesn't point to a proper FILE object.
Since all the other methods of the PE class that operate on _file_handle have a nullptr check I assumed such a check wasn't intentionally omitted.

Cheers
rc0r

Exporting JSON to a File

Is there any way to save the JSON output to a file? I guess I could also parse through the console output, but it would be helpful to download it directly to a file.

Infinite loop when parsing resources

manalyze_infloop.zip

CAUTION: malware attached

The file in the attached zip gives an infinite loop when parsing resources, spamming the following error messages:

[*] Warning: The PE contains duplicate resources. It was almost certainly crafted manually.
[*] Warning: Could not locate the section containing resource 65280. Trying to use the RVA as an offset...
[*] Warning: Resource 65280 has a size of 0!

Seems to be related to size 0 resources.

Installation error: Ubuntu 18.04

Hi there,

I'm trying to install Manalyze following the instructions on the documentation in the Linux section.
uname -a
Output:
Linux 4.18.0-17-generic #18~18.04.1-Ubuntu SMP Fri Mar 15 15:27:12 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

When I run sudo cmake . I get the following error stacktrace:

james@james-Aspire-VN7-593G:/home/Manalyze$ sudo cmake .
[sudo] password for james: 
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/bin/git (found version "2.17.1") 
-- Boost version: 1.65.1
-- Found the following Boost libraries:
--   regex
--   system
--   filesystem
--   program_options
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.0g") 
Checking out yara...
Cloning into 'external/yara'...
fatal: unable to access 'https://github.com/JusticeRage/yara.git/': Could not resolve host: github.com
Checking out hash-library...
Cloning into 'external/hash-library'...
CMake Error at CMakeLists.txt:131 (add_subdirectory):
  add_subdirectory given source "external/yara" which is not an existing
  directory.


-- Configuring incomplete, errors occurred!
See also "/home/Manalyze/CMakeFiles/CMakeOutput.log".

Any assistance would be greatly appreciated!
Many thanks

Slowdowns on malformed PEs which have a high number of sections

It was reported that PE files with a very high number of sections cause the analysis to be extremely slow.
The issue has been traced down to Section::get_raw_data() which opens and closes the input file with every call. The file handle should be cached and sanity checks need to be put in place to prevent unnecessary operations.

The result of PE::get_filesize should also be cached instead of being computed with every call.

Nullptr dereference in Resource::extract()

Hi,

in case Resource::extract() is called with an invalid destination argument the calling process segfaults because fwrite() tries to write to a FILE * object which in fact is NULL.

I'd consider this a minor bug, since one could argue using the API in a wrong way is the user's fault. However in that case you may want to avoid the segmentation fault and guide your users by providing an appropriate error message.

So a patch could look sth. like the following (disclaimer: untested!):

FILE* out = fopen(destination.string().c_str(), "a+");

+ if(out == nullptr) {
+     PRINT_ERROR << "Opening file " << destination.string().c_str() << " failed!" << std::endl;
+     return false;
+ }

Cheers
rc0r

Import analyzer plugin rule suggestions

  • EnumDeviceDrivers|GetDeviceDriverFileNameW Checks for drivers
  • EvtClearLog|ClearEventLog Empties the system event log
  • TerminateProcess Messes with other processes
  • PrintWindow Takes screenshots
  • SetKernelObjectSecurity|SetFileSecurity|SetNamedSecurityInfo|SetSecurityInfo Manipulates DACLs
  • OpenSCManagerW|CreateService|DeleteService Manipulates services
  • CoLoadLibrary Replacement for LoadLibrary

update_clamav_signatures.py skips yara rules

Hello,

While updating our FileInfo Analyzer (TheHive Project) to include manalyzer binaries, we face lots of errors with the update of yara rules in clamav (bin/update_clamav_signatures.py):

[..]
Rule Win.Trojan.Emotet-9778251-0 seems to be malformed. Skipping...
Rule Win.Trojan.Generic-9778253-0 seems to be malformed. Skipping...
Rule Win.Malware.Fsysna-9778257-0 seems to be malformed. Skipping...
Rule Win.Packed.Vobfus-9778258-0 seems to be malformed. Skipping...
Rule Win.Trojan.Azorult-9778259-0 seems to be malformed. Skipping...
Rule Win.Malware.Sctk-9778260-0 seems to be malformed. Skipping...
Rule Win.Trojan.Fareit-9778261-0 seems to be malformed. Skipping...
Rule Win.Trojan.Fareit-9778262-0 seems to be malformed. Skipping...
Rule Win.Trojan.Generic-9778278-0 seems to be malformed. Skipping...
Rule Win.Malware.Zusy-9778280-0 seems to be malformed. Skipping...
[..]

I also tried to run it from the docker image and get similar results.

install error

Hi

I am writing to you regarding an issue I encountered while installing the Manalyze program. After installing the necessary dependencies, when I proceeded to execute the command "make -j5," I encountered the following error:

/home/rpadmin/Manalyze-master/plugins/plugin_virustotal/json_spirit/json_spirit_reader_template.h:446:114: error: ‘boost::placeholders’ has not been declared
Uint64_action new_uint64 ( boost::bind( &Semantic_actions_t::new_uint64, &self.actions_, boost::placeholders::_1 ) );

I believe this error is related to the use of 'boost::placeholders' in the code, which seems to be causing a declaration issue. In order to resolve this problem, I would greatly appreciate your guidance and assistance.

Could you please provide me with instructions on how to address this error? I would be grateful for any insights or suggestions you can offer. I am eager to successfully install and utilize the Manalyze program for my needs.

Thank you for your attention to this matter. I look forward to your prompt response.
OS: UbuntuServer 16.04

Import analyzer plugin rule suggestions vol. 2

LoadDriver Yet another LoadLibrary replacement
LoadTypeLib Possible LoadLibrary replacement?
waveInOpen|DirectSoundCaptureCreate Records audio
EnableRouter|SetAdapterIpAddress|SetIpInterfaceEntry Messes with the network configuration
OleGetClipboard Reads the clipboard
CertAddCertificateContextToStore|CertOpenSystemStore Manipulates the system certificate store
InitiateShutdown|ExitWindows Turns the system off
Wmi* Uses WMI
SHTestTokenMembership|CheckTokenMembership|IsUserAnAdmin Checks for privileges
SHEnumKeyEx Another way to access the registery

when i run on win7,it error accured.

error info:
C:\Users\xxx\Desktop\manalyze>manalyze.exe --plugins=peid,clamav --dump all Churrasco.exe
[!] Error: [Yara compiler] yara_rules/clamav.yara(845778) : internal fatal error

i am confused how to use it on win7 and how yara integrate it ? thanks

Rule Seems to be Malformed, skipping

I get that when I run update_clamav_signatures.py. Cropped result of this is below:

Rule Win.Dropper.Zeus-9956976-0 seems to be malformed. Skipping...
Rule Win.Malware.Generic-9956990-0 seems to be malformed. Skipping...
Unable to translate a logical signature for Win.Malware.Wingo-9956993-0. Skipping...
Rule Win.Virus.Expiro-9957000-0 seems to be malformed. Skipping...
Rule Win.Dropper.Zeus-9957002-0 seems to be malformed. Skipping...
Rule Win.Packed.Vbkryjetor-9957003-0 seems to be malformed. Skipping...
Rule Win.Malware.Conjar-9957004-0 seems to be malformed. Skipping...
Rule Win.Dropper.Detected-9957005-0 seems to be malformed. Skipping...
Rule Win.Dropper.Detected-9957006-0 seems to be malformed. Skipping...
Rule Win.Packed.Trojanx-9957008-0 seems to be malformed. Skipping...
Rule Win.Packed.Coantor-9957009-0 seems to be malformed. Skipping...
Rule Win.Packed.Msilheracles-9957011-0 seems to be malformed. Skipping...
Rule Win.Trojan.Generic-9957017-0 seems to be malformed. Skipping...
Rule Win.Packed.Generickdz-9957018-0 seems to be malformed. Skipping...
Rule Win.Dropper.LokiBot-9957019-0 seems to be malformed. Skipping...
Rule Win.Virus.Ramnit-9957027-0 seems to be malformed. Skipping...
Rule Win.Dropper.LokiBot-9957036-0 seems to be malformed. Skipping...
Rule Win.Dropper.Zeus-9957041-0 seems to be malformed. Skipping...

It happens for all of the downloaded updates

Server-side request forgery on manalyzer.org via url upload

Hi manalyzer team

there an ssrf on the request via url upload , as you can see here ssh version u used is leaked in the Response :

  • Request
POST /upload HTTP/1.1
Host: manalyzer.org
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:92.0) Gecko/20100101 Firefox/92.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: multipart/form-data; boundary=---------------------------210165242507531672849060397
Content-Length: 186
Origin: https://manalyzer.org
Connection: close
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin

-----------------------------210165242507531672849060397
Content-Disposition: form-data; name="url"

http://127.0.0.1:22/
-----------------------------210165242507531672849060397--
  • Response
HTTP/1.1 200 OK
Server: nginx/1.10.3
Date: Sun, 03 Oct 2021 14:26:10 GMT
Content-Type: application/json
Content-Length: 192
Connection: close
Strict-Transport-Security: max-age=63072000; includeSubdomains
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=63072000
X-Frame-Options: DENY
X-Content-Type-Options: nosniff

{"data":{"error_message":"An error occurred while retrieving the requested file ((
'Connection aborted.', BadStatusLine('SSH-2.0-OpenSSH_7.9p1 Debian-10+deb10u2\\r\\n')))."},"status":"failed"}

s

Attacker able to scan internal ports also can make a directory enumeration on http://127.0.0.1/$FUZZ$ ... for fixing block access to internal hosts

Got a Question

Where can I learn to use the functions in the windows.h file ?

Error converting the latest ClamAV rules

The latest ClamAV rules are not converted properly and cause the ClamAV plugin to be dysfunctional.

[!] Error: Could not compile yara rules (1 error(s)).
[!] Error: ClamAV rules haven't been generated yet!
[!] Error: Please run yara_rules/update_clamav_signatures.py to create them, and refer to the documentation for additional information.```

error: ‘SSL_R_SHORT_READ’ was not declared in this scope

System info:
uname -svrom: Linux 4.9.0-1-amd64 #1 SMP Debian 4.9.6-3 (2017-01-28) x86_64 GNU/Linux lsb_release -c: stretch
When invoking command: make
The following error appear:
/home/pierre/Manalyze/plugins/plugin_virustotal/plugin_virustotal.cpp: In function ‘bool plugin::vt_api_interact(const string&, const string&, std::__cxx11::string&, plugin::sslsocket&)’: /home/pierre/Manalyze/plugins/plugin_virustotal/plugin_virustotal.cpp:276:84: error: ‘SSL_R_SHORT_READ’ was not declared in this scope if (error != boost::asio::error::eof && error.value() != ERR_PACK(ERR_LIB_SSL, 0, SSL_R_SHORT_READ)) { ^ CMakeFiles/plugin_virustotal.dir/build.make:62 : la recette pour la cible « CMakeFiles/plugin_virustotal.dir/plugins/plugin_virustotal/plugin_ virustotal.cpp.o » a échouée

PolyEnE_0_01 false positive

Hello,

In the file bin/yara_rules/peid.yara, the rule for PolyEnE_0_01__by_Lennart_Hedlund should be deleted because it detects false positives.

So please remove the following lines :

rule PolyEnE_0_01__by_Lennart_Hedlund
{
meta:
packer_name = "PolyEnE 0.01+ by Lennart Hedlund"
strings:
$a0 = { 60 00 00 E0 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 60 00 00 E0 }

condition:
$a0
}

crash in Section::get_raw_data() const

    FILE* f = fopen(_path.c_str(), "rb");
    if (f == nullptr || fseek(f, _pointer_to_raw_data, SEEK_SET))
    {
        fclose(f);
        return res;
    }

This condition is wrong, if (f == nullptr) will trigger fclose(nullptr) which will lead to crash.

manalyze memory/CPU time exhaustion

Hi,

fuzzing manalyze discovered the following crash:

original sample - DoS.dll (28K) (md5: acf1bffb70226d182bc0fef847f5c867)

The crash surfaced because afl-fuzz uses a memory limit during fuzzing. Running manalyze directly on the provided sample did not crash the process on my quite decent box. However massive amounts of virtual memory (>80Gb) were used when processing the file. This probably just didn't cause any real havoc because I have quite a large swap partition. Nevertheless this whole process bogged down my box for several minutes:

$ time manalyze DoS.dll
# ...
manalyze   170.76s user 280.52s system 65% cpu 11:28.31 total

To simulate a less powerful machine I used ulimit -v 10000000 limiting the virtual memory to ~10G. Using this setup manalyze SIGABRT's very soon:

$ ulimit -v 10000000 # kbytes
$ time manalyze DoS.dll
# ...
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
[2]    17055 abort (core dumped)  ./manalyze 
manalyze   7.59s user 8.62s system 14% cpu 1:52.14 total

$ ls -l core.17055 
-rw------- 1 rc0r rc0r 9.5G Oct 24 11:20 core.17055

I did not try running this on a system with much less memory available then I had. But at best I'd expect the memory allocation to fail as in the ulimited test I did.

Let me know if you need any further info or assistance in order to diagnose the problem!

Could not compile yara rules

Ran the clamav update script but when running manalyze it does not compile the yara rules due to syntax errors

[!] Error: [Yara compiler] yara_rules/clamav.yara(972693) : syntax error, unexpected '{', expecting text string
[!] Error: [Yara compiler] yara_rules/clamav.yara(1003499) : syntax error, unexpected string identifier, expecting '}'
[!] Error: Could not compile yara rules (2 error(s)).
[!] Error: ClamAV rules haven't been generated yet!
[!] Error: Please run yara_rules/update_clamav_signatures.py to create them, and refer to the documentation for additional information.

I have run yara_rules/update_clamav_signatures.py however it seems to skip a lot of rules due to them being malformed.

Error parsing main.cvd file

C:\Users\50CAL\Manalyze\bin\yara_rules>python update_clamav_signatures.py
Downloading: main.cvd Bytes: 117892267
Rule Win.Trojan.EOL-1 seems to be malformed. Skipping...

Unusual section name found: .orpc

This is from the proxy stub code generated by midl.

Example: test_p.c

/* this ALWAYS GENERATED file contains the proxy stub code */

 /* File created by MIDL compiler version 8.01.0628 */

...

#pragma code_seg(".orpc")
static const unsigned short IChildFrame_FormatStringOffsetTable[] =
    {
    0,
    42,
    84,
    126
    };

Macos 13.5 cmake error

ld: unknown option: -rpath=$ORIGIN
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [bin/manalyze] Error 1
make[1]: *** [CMakeFiles/manalyze.dir/all] Error 2
make: *** [all] Error 2

error running update_clamav_signatures.py

This is a snippet of the output. It seems nearly every rule breaks this.

Rule Win.Downloader.Upatre-9937450-0 seems to be malformed. Skipping...
Rule Win.Downloader.Upatre-9937452-0 seems to be malformed. Skipping...
Rule Win.Downloader.Upatre-9937455-0 seems to be malformed. Skipping...
Rule Win.Trojan.Generic-9937463-0 seems to be malformed. Skipping...
Rule Win.Ransomware.TeslaCrypt-9937465-0 seems to be malformed. Skipping...
Rule Win.Downloader.Stantinko-9937476-0 seems to be malformed. Skipping...
Rule Win.Trojan.Emotet-9937498-0 seems to be malformed. Skipping...
Rule Win.Packed.Msilzilla-9937499-0 seems to be malformed. Skipping...

Bug report

In need of suggestions. I'm not familiar with protocol.

Could not load yara rules

Hi!

I have a problem with the Yara rules. When I try to run an analysis (Example: manalyze sample.exe -p strings), I have the following error:

[!] Error: Could not load yara_rules/suspicious_strings.yara!
[!] Error: Could not load yara_rules/domains.yara!
* Manalyze 0.9 *

I checked the folder "/usr/local/manalyze/yara_rules" and there are Yara's rules.

Can you help me with this problem, please?

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.