Loading...
Loading...
Analyze and understand malware distribution tactics, security software bypass techniques, and threat detection for cybersecurity research
npx skill4agent add aradotso/security-skills bitdefender-malware-analysisSkill by ara.so — Security Skills collection.
// Example: How malware repos disguise payloads
package main
import (
"os"
"os/exec"
)
// DO NOT RUN - Example of malicious dropper pattern
func executeHiddenPayload() {
// Downloads additional malware
// Steals credentials from browsers
// Establishes persistence
// Communicates with C2 servers
}// Safe analysis methodology
package analyzer
import (
"log"
"os"
)
type MalwareIndicator struct {
RepoName string
Topics []string
StarPattern float64
HasReadme bool
HasSource bool
}
func AnalyzeRepository(repo MalwareIndicator) bool {
suspiciousScore := 0
// Check for crack/bypass terms
if containsIllegalTerms(repo.Topics) {
suspiciousScore += 50
}
// Check star inflation
if repo.StarPattern > 2.0 { // More than 2 stars/day
suspiciousScore += 25
}
// No documentation
if !repo.HasReadme {
suspiciousScore += 15
}
// No actual source code
if !repo.HasSource {
suspiciousScore += 30
}
return suspiciousScore > 75 // Likely malicious
}
func containsIllegalTerms(topics []string) bool {
dangerousTerms := []string{
"crack", "keygen", "bypass",
"thread-hijacking", "defender-bypass",
}
for _, topic := range topics {
for _, term := range dangerousTerms {
if topic == term {
return true
}
}
}
return false
}# NEVER run suspected malware on host systems
# Use isolated VM or container
# Create analysis environment
docker run -it --rm --network none \
-v $(pwd)/samples:/samples:ro \
ubuntu:latest /bin/bash
# Install analysis tools
apt-get update
apt-get install -y file strings binutils hexdump// Example: Safe file inspection
package main
import (
"crypto/sha256"
"fmt"
"io"
"os"
)
func SafeFileAnalysis(filepath string) error {
// Get file hash without executing
file, err := os.Open(filepath)
if err != nil {
return err
}
defer file.Close()
hash := sha256.New()
if _, err := io.Copy(hash, file); err != nil {
return err
}
checksum := fmt.Sprintf("%x", hash.Sum(nil))
fmt.Printf("SHA256: %s\n", checksum)
// Check against VirusTotal API
// Use environment variable for API key
apiKey := os.Getenv("VIRUSTOTAL_API_KEY")
if apiKey != "" {
// Query VirusTotal with hash only
// Never upload files directly
}
return nil
}# Report to GitHub Security
# Visit: https://github.com/contact/report-abuse
# Required information:
# - Repository URL
# - Description of malicious content
# - Evidence (screenshots, analysis)// Example: Document findings
type ThreatReport struct {
RepoURL string
ReportDate string
Indicators []string
FileHashes []string
Behavior string
C2Servers []string
}
func GenerateReport(repo string) ThreatReport {
return ThreatReport{
RepoURL: repo,
ReportDate: "2026-05-20",
Indicators: []string{
"Fake Bitdefender crack",
"Credential stealer suspected",
"Bot-driven star inflation",
},
FileHashes: []string{
// SHA256 hashes of malicious files
},
Behavior: "Downloads additional payloads, steals browser data",
}
}VIRUSTOTAL_API_KEY