-
Notifications
You must be signed in to change notification settings - Fork 383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Endless processing / Task #failed: Analysis X #2103
Comments
cuckoo.conf kvm.conf routing.conf |
hey, yes we suspect the bug is here https://github.com/kevoreilly/CAPEv2/pull/2036/files we probably will revert that |
@doomedraven |
you can revert that commit that i mention, i can-t guarantee that one cause the problem but is our suspicion. well is open source so you can help us dig into issue, is not our paid job so we have to first handle our job and then work on this |
I have been able to recreate this issue on an instance of mine, and found that reverting the changes in #2306 fixes the issue. I haven't had time to look into why it is occurring. @qux-bbb perhaps you can help diagnose this issue? |
I'll diagnose this issue in a few days. |
@wuuuw It's not a bug, you run the wrong process command.
You should run process.py just like in cape-processor. service:
|
Er hang on. I use -d -r all the time in my daily work. It was working before, it needs to work. |
I want to know all the status about cape* services before you do anything. |
@wuuuw @kevoreilly If the cape-processor service is not running at the begining, the behavior is like that. |
@qux-bbb мая 16 17:07:04 nan-pc python3[2550]: Missed dependency flare-floss: poetry run pip install -U flare-floss ● cape-processor.service - CAPE report processor ● cape.service - CAPE мая 16 17:06:57 nan-pc python3[1402]: _.-'.i__i__i.' ● cape-rooter.service - CAPE rooter мая 16 17:06:52 nan-pc systemd[1]: Starting CAPE rooter... |
@wuuuw Can your cape-processor.service be runing status? |
~$ systemctl status cape-processor.service мая 17 10:10:03 nan-pc systemd[1]: cape-processor.service: Consumed 5.530s CPU time. ~$ sudo systemctl restart cape-processor.service ~$ systemctl status cape-processor.service |
@wuuuw Can you run these commands and give me the output? sudo systemctl stop cape-processor.service
cd /opt/CAPEv2/utils/
sudo su cape
/usr/bin/python3 -m poetry run python process.py -p7 auto -pt 900 -d |
@AghaHannan You need to create a new issue. |
@qux-bbb 2024-05-17 22:16:51,809 [root] DEBUG: |-- LinuxReadsFiles |
@wuuuw Sorry, I pulled the latest code, but I can't reproduce that error. |
@wuuuw Can you run the command and give me the output? free -h |
Oh looks like someone doesn't have enought ram to run processing |
@qux-bbb |
@wuuuw Can You try to install CAPE on a computer with more RAM, for example 16G? |
i have added better message in those cases with ram b1df219 |
@doomedraven Thanks! |
ok i finally found some time to jump to this and test latest master on my side, i cant reproduce it. |
To reproduce that "Cannot allocate memory", you can do like this: First, stop cape-processor.service: sudo systemctl stop cape-processor.service Second, use many RAM, my computer RAM is 16G, so I will use 10G(10240M): mkdir /tmp/memory
sudo mount -t tmpfs -o size=10240M tmpfs /tmp/memory
dd if=/dev/zero of=/tmp/memory/block Third, try to start process.py: cd /opt/CAPEv2/utils/
sudo su cape
/usr/bin/python3 -m poetry run python process.py -p7 auto -pt 900 -d Then you can get the error message. Finally, restore your RAM: rm /tmp/memory/block
sudo umount /tmp/memory
rm /tmp/memory -r Maybe the issue can be closed. |
yes, i can't reproduce, and the user side low hardware, we cant do nothing there |
Prerequisites
Yes, but it didn't help me Analysis timeout #2019
Expected Behavior
The web interface will complete the scanning and I can check the scan report
Current Behavior
In the web interface in the Recent window the status is processing and I cannot view the scanning report. But in the Dashboard window it is listed as completed. The terminal displays INFO: Task #5: analysis procedure completed
Steps to Reproduce
Also tried sudo systemctl restart cape-processor
and this poetry run python cleaners.py --clean
sudo systemctl restart cape
Context
Failure Logs
Terminal from poetry run python3 cuckoo.py
OPTIONAL! Missed dependency: pip3 install https://github.com/CAPESandbox/peepdf/archive/20eda78d7d77fc5b3b652ffc2d8a5b0af796e3dd.zip#egg=peepdf==0.4.2
OPTIONAL! Missed dependency: poetry run pip install -U git+https://github.com/DissectMalware/batch_deobfuscator
OPTIONAL! Missed dependency: poetry run pip install -U git+https://github.com/CAPESandbox/httpreplay
/usr/bin/tcpdump
2024-05-06 17:51:45,486 [lib.cuckoo.core.scheduler] INFO: Using "kvm" machine manager with max_analysis_count=0, max_machines_count=10, and max_vmstartup_count=5
2024-05-06 17:51:45,494 [lib.cuckoo.core.scheduler] INFO: Loaded 1 machine/s
2024-05-06 17:51:45,511 [lib.cuckoo.core.scheduler] INFO: Waiting for analysis tasks
2024-05-06 17:52:54,972 [lib.cuckoo.core.scheduler] INFO: Task #5: Starting analysis of FILE '/tmp/cuckoo-tmp/upload_atx723hk/b5e6dde637ff9dbc4dc8.exe'
2024-05-06 17:52:55,016 [lib.cuckoo.core.scheduler] INFO: Task #5: acquired machine win10 (label=win10, arch=x64, platform=windows)
2024-05-06 17:53:20,352 [lib.cuckoo.core.scheduler] INFO: Enabled route 'internet'.
/usr/bin/tcpdump
2024-05-06 17:53:20,414 [modules.auxiliary.sniffer] INFO: Started sniffer with PID 15295 (interface=virbr0, host=192.168.122.240, dump path=/opt/CAPEv2/storage/analyses/5/dump.pcap)
2024-05-06 17:53:20,435 [lib.cuckoo.core.guest] INFO: Task #5: Starting analysis on guest (id=win10, ip=192.168.122.240)
2024-05-06 17:53:20,461 [lib.cuckoo.core.guest] INFO: Task #5: Guest is running CAPE Agent 0.17 (id=win10, ip=192.168.122.240)
2024-05-06 17:53:26,773 [lib.cuckoo.core.guest] INFO: Task #5: Uploading script files to guest (id=win10, ip=192.168.122.240)
2024-05-06 17:53:32,047 [lib.cuckoo.core.guest] INFO: Task #failed: Analysis 5 (id=win10, ip=192.168.122.240)
2024-05-06 17:53:33,289 [lib.cuckoo.core.scheduler] INFO: Disabled route 'internet'
2024-05-06 17:53:33,343 [lib.cuckoo.core.scheduler] INFO: Task #5: analysis procedure completed
^C
Session terminated, killing shell... ...killed.
Terminal from poetry run python utils/process.py -r 5 -d
2024-05-06 18:37:18,932 [root] DEBUG: Importing modules...
OPTIONAL! Missed dependency: pip3 install https://github.com/CAPESandbox/peepdf/archive/20eda78d7d77fc5b3b652ffc2d8a5b0af796e3dd.zip#egg=peepdf==0.4.2
OPTIONAL! Missed dependency: poetry run pip install -U git+https://github.com/DissectMalware/batch_deobfuscator
OPTIONAL! Missed dependency: poetry run pip install -U git+https://github.com/CAPESandbox/httpreplay
2024-05-06 18:37:19,894 [capa.rules] DEBUG: reading rules from directory /opt/CAPEv2/data/capa-rules
2024-05-06 18:37:19,933 [capa.rules.cache] DEBUG: loading rule set from cache: /home/cape/.cache/capa/capa-fa8c13d6.cache
2024-05-06 18:37:19,993 [capa.loader] DEBUG: reading signatures from directory /opt/CAPEv2/data/flare-signatures
2024-05-06 18:37:19,994 [capa.loader] DEBUG: found signature file: /opt/CAPEv2/data/flare-signatures/1_flare_msvc_rtf_32_64.sig
2024-05-06 18:37:19,994 [capa.loader] DEBUG: found signature file: /opt/CAPEv2/data/flare-signatures/2_flare_msvc_atlmfc_32_64.sig
2024-05-06 18:37:19,994 [capa.loader] DEBUG: found signature file: /opt/CAPEv2/data/flare-signatures/3_flare_common_libs.sig
2024-05-06 18:37:19,996 [root] DEBUG: Imported "auxiliary" modules:
2024-05-06 18:37:19,996 [root] DEBUG:
-- Sniffer 2024-05-06 18:37:19,996 [root] DEBUG: Imported "processing" modules: 2024-05-06 18:37:19,996 [root] DEBUG: |-- CAPE 2024-05-06 18:37:19,996 [root] DEBUG: |-- AnalysisInfo . 2024-05-06 18:37:20,039 [root] DEBUG: Imported "machinery" modules: 2024-05-06 18:37:20,039 [root] DEBUG:
-- KVM2024-05-06 18:37:20,039 [Task 5] [root] DEBUG: Processing task
2024-05-06 18:37:20,197 [Task 5] [lib.cuckoo.core.plugins] DEBUG: Executing processing module "CAPE" on analysis at "/opt/CAPEv2/storage/analyses/5"
2024-05-06 18:37:20,218 [Task 5] [lib.cuckoo.common.objects] DEBUG: Initializing Yara...
2024-05-06 18:37:20,301 [Task 5] [lib.cuckoo.common.objects] DEBUG: |-- binaries AutoIT.yar
.
2024-05-06 18:37:20,591 [Task 5] [lib.cuckoo.common.objects] DEBUG: |-- CAPE xRAT.yar
2024-05-06 18:37:20,591 [Task 5] [lib.cuckoo.common.objects] DEBUG: |-- CAPE zgRAT.yar
2024-05-06 18:37:21,998 [Task 5] [lib.cuckoo.core.plugins] DEBUG: Executing processing module "AnalysisInfo" on analysis at "/opt/CAPEv2/storage/analyses/5"
2024-05-06 18:37:22,046 [Task 5] [lib.cuckoo.core.plugins] DEBUG: Processing module autoruns not found in configuration file
2024-05-06 18:37:22,047 [Task 5] [lib.cuckoo.core.plugins] DEBUG: Executing processing module "BehaviorAnalysis" on analysis at "/opt/CAPEv2/storage/analyses/5"
2024-05-06 18:37:22,047 [Task 5] [modules.processing.behavior] DEBUG: Analysis results folder does not contain any file or injection was disabled
2024-05-06 18:37:22,047 [Task 5] [lib.cuckoo.core.plugins] DEBUG: Executing processing module "Debug" on analysis at "/opt/CAPEv2/storage/analyses/5"
2024-05-06 18:37:22,051 [Task 5] [lib.cuckoo.core.plugins] DEBUG: Executing processing module "NetworkAnalysis" on analysis at "/opt/CAPEv2/storage/analyses/5"
2024-05-06 18:37:22,055 [Task 5] [lib.cuckoo.core.plugins] DEBUG: Executing processing module "Suricata" on analysis at "/opt/CAPEv2/storage/analyses/5"
2024-05-06 18:37:22,640 [Task 5] [modules.processing.suricata] DEBUG: pcapfile list: {'message': {'count': 0, 'files': []}, 'return': 'OK'} current pcap: {'message': '/opt/CAPEv2/storage/analyses/5/dump.pcap', 'return': 'OK'}
2024-05-06 18:37:27,644 [Task 5] [modules.processing.suricata] DEBUG: pcapfile list: {'message': {'count': 0, 'files': []}, 'return': 'OK'} current pcap: {'message': 'None', 'return': 'OK'}
2024-05-06 18:37:27,644 [Task 5] [modules.processing.suricata] DEBUG: Pcap not in list and not current pcap lets assume it's processed
2024-05-06 18:37:27,688 [Task 5] [lib.cuckoo.core.plugins] DEBUG: Executing processing module "UrlAnalysis" on analysis at "/opt/CAPEv2/storage/analyses/5"
2024-05-06 18:37:27,689 [Task 5] [lib.cuckoo.core.plugins] DEBUG: Executing processing module "script_log_processing" on analysis at "/opt/CAPEv2/storage/analyses/5"
2024-05-06 18:37:27,690 [Task 5] [lib.cuckoo.core.plugins] DEBUG: Executing processing module "ProcessMemory" on analysis at "/opt/CAPEv2/storage/analyses/5"
2024-05-06 18:37:27,749 [Task 5] [lib.cuckoo.core.plugins] DEBUG: Applying signature overlays for signatures: creates_exe
2024-05-06 18:37:27,752 [Task 5] [lib.cuckoo.core.plugins] DEBUG: Running 252 evented signatures
2024-05-06 18:37:27,752 [Task 5] [lib.cuckoo.core.plugins] DEBUG: |-- packer_themida
.
2024-05-06 18:37:27,953 [Task 5] [lib.cuckoo.core.plugins] DEBUG: Running signature "dharma_mutexes"
2024-05-06 18:37:27,953 [Task 5] [lib.cuckoo.core.plugins] DEBUG: Running signature "ransomware_extensions"
/opt/CAPEv2/utils/../lib/cuckoo/common/abstracts.py:1058: FutureWarning: Possible nested set at position 5
exp = re.compile(pattern, re.IGNORECASE)
2024-05-06 18:37:27,962 [Task 5] [lib.cuckoo.core.plugins] DEBUG: Running signature "ransomware_files"
2024-05-06 18:37:27,975 [Task 5] [lib.cuckoo.core.plugins] DEBUG: Running signature "fonix_mutexes"
2024-05-06 18:37:27,975 [Task 5] [lib.cuckoo.core.plugins] DEBUG: Running signature "gandcrab_mutexes"
.
2024-05-06 18:37:28,046 [Task 5] [lib.cuckoo.core.plugins] DEBUG: Executing reporting module "CAPASummary"
2024-05-06 18:37:28,058 [Task 5] [lib.cuckoo.common.integrations.capa] INFO: FLARE CAPA -> No process data available
2024-05-06 18:37:28,060 [Task 5] [lib.cuckoo.core.plugins] DEBUG: Executing reporting module "PCAP2CERT"
2024-05-06 18:37:28,062 [Task 5] [lib.cuckoo.core.plugins] DEBUG: Executing reporting module "JsonDump"
2024-05-06 18:37:28,063 [Task 5] [lib.cuckoo.core.plugins] DEBUG: Executing reporting module "MongoDB"
2024-05-06 18:37:28,078 [Task 5] [modules.reporting.mongodb] DEBUG: Deleted previous MongoDB data for Task 5
2024-05-06 18:37:28,235 [Task 5] [root] DEBUG: Finished processing task
The text was updated successfully, but these errors were encountered: