Content-Length: 223954 | pFad | http://github.com/Velocidex/velociraptor/issues/4062

51 Yara Scan Failure on Linux · Issue #4062 · Velocidex/velociraptor · GitHub
Skip to content
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

Yara Scan Failure on Linux #4062

Open
denizciftci-sec opened this issue Feb 13, 2025 · 3 comments
Open

Yara Scan Failure on Linux #4062

denizciftci-sec opened this issue Feb 13, 2025 · 3 comments

Comments

@denizciftci-sec
Copy link

denizciftci-sec commented Feb 13, 2025

Hi Team,

I would like test sample yara rules on Linux via Offline Collector.

Exported the offline collector via Linux.Detection.Yara.Process and used that following sample yara rule.

I confirm that there is no hits under the results files.

could you please assist me to tackle this issue?

/uploads/scope/results# ls -rlt
total 0
-rw-r----- 1 root root 0 Dec 31 1979 Linux.Detection.Yara.Process.json.index
-rw-r----- 1 root root 0 Dec 31 1979 Linux.Detection.Yara.Process.json

:/tmp# cat malicious_file
malware_signature
http://malicious-site.com

/tmp# hexdump -C /tmp/malicious_file
00000000 6d 61 6c 77 61 72 65 5f 73 69 67 6e 61 74 75 72 |malware_signatur|
00000010 65 0a 68 74 74 70 3a 2f 2f 6d 61 6c 69 63 69 6f |e.http://malicio|
00000020 75 73 2d 73 69 74 65 2e 63 6f 6d 0a e8 90 90 90 |us-site.com.....|
00000030 90 5d c3 |.].|

rule testingyara {
    meta:
        description = "Detects a specific malicious file stored in /tmp"
        author = "User"
        date = "2025-02-13"
    
    strings:
        $malicious_string = "malware_signature" nocase
        $hex_pattern = { E8 ?? ?? ?? ?? 5D C3 }
        $url = "http://malicious-site.com"
    
    condition:
        any of ($malicious_string, $hex_pattern, $url) and 
        filepath matches "/tmp/malicious_file"
}
@scudette
Copy link
Contributor

You can not use filepath confitions when scanning a process because a process does not have a file. How are you loading the sample malicious file into a running process?

@denizciftci-sec
Copy link
Author

actually I want to run generic yara scanning apart from checking in processes.

@scudette
Copy link
Contributor

You probably want to use the file finder then.

https://docs.velociraptor.app/artifact_references/pages/linux.search.filefinder/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/Velocidex/velociraptor/issues/4062

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy