Loading...
Loading...
Identify, analyze, and document malware distribution repositories masquerading as legitimate software
npx skill4agent add aradotso/security-skills malware-detection-and-removalSkill by ara.so — Security Skills collection.
package main
import (
"fmt"
"strings"
)
// RepositoryAnalysis contains threat indicators
type RepositoryAnalysis struct {
Name string
Description string
Topics []string
HasReadme bool
StarRate float64
ThreatScore int
}
// AnalyzeThreatLevel calculates risk score
func (r *RepositoryAnalysis) AnalyzeThreatLevel() int {
score := 0
// Check for crack/piracy keywords
crackKeywords := []string{"crack", "keygen", "loader", "pre-activated", "license key"}
for _, keyword := range crackKeywords {
if strings.Contains(strings.ToLower(r.Description), keyword) {
score += 20
}
}
// Check for bypass/exploit topics
dangerousTopics := []string{"defender-bypass", "thread-hijacking", "exploit-mitigation"}
for _, topic := range r.Topics {
for _, dangerous := range dangerousTopics {
if topic == dangerous {
score += 15
}
}
}
// High star rate with no content
if r.StarRate > 3 && !r.HasReadme {
score += 25
}
// No README is suspicious for "software" repo
if !r.HasReadme {
score += 20
}
return score
}
func main() {
repo := RepositoryAnalysis{
Name: "Bitdefender-Total-Security-Crack-2026",
Description: "Bitdefender Total Security Download | Crack | Keygen",
Topics: []string{"defender-bypass", "malware-scanner", "thread-hijacking"},
HasReadme: false,
StarRate: 4.0,
}
threatScore := repo.AnalyzeThreatLevel()
fmt.Printf("Repository: %s\n", repo.Name)
fmt.Printf("Threat Score: %d/100\n", threatScore)
if threatScore > 50 {
fmt.Println("⚠️ HIGH RISK: Likely malware distribution")
} else if threatScore > 30 {
fmt.Println("⚠️ MEDIUM RISK: Suspicious patterns detected")
} else {
fmt.Println("✓ Low risk")
}
}package main
import (
"fmt"
"os"
"path/filepath"
)
// VerifyRepositoryContent checks for legitimate source code
func VerifyRepositoryContent(repoPath string) (bool, []string) {
issues := []string{}
hasSourceCode := false
// Check for actual code files
sourceExts := []string{".go", ".py", ".js", ".cpp", ".c"}
err := filepath.Walk(repoPath, func(path string, info os.FileInfo, err error) error {
if err != nil {
return err
}
if !info.IsDir() {
ext := filepath.Ext(path)
for _, sourceExt := range sourceExts {
if ext == sourceExt {
hasSourceCode = true
return nil
}
}
// Check for suspicious executables
if ext == ".exe" || ext == ".dll" || ext == ".bat" {
issues = append(issues, fmt.Sprintf("Suspicious executable: %s", path))
}
}
return nil
})
if err != nil {
issues = append(issues, fmt.Sprintf("Error scanning: %v", err))
}
if !hasSourceCode {
issues = append(issues, "No source code found - likely malware dropper")
}
return hasSourceCode, issues
}# DO NOT run these commands on suspicious repos:
# git clone <suspicious-repo>
# go run main.go
# ./setup.exe
# Instead, report the repositorypackage main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"os"
)
type AbuseReport struct {
URL string `json:"url"`
Reason string `json:"reason"`
Details string `json:"details"`
}
func ReportMaliciousRepository(repoURL string) error {
// Use GitHub's abuse reporting
// Requires authentication via GITHUB_TOKEN env var
report := AbuseReport{
URL: repoURL,
Reason: "malware-distribution",
Details: "Repository distributing malware disguised as cracked software",
}
jsonData, err := json.Marshal(report)
if err != nil {
return err
}
// This is a conceptual example - GitHub abuse reports go through web form
fmt.Printf("Report prepared for: %s\n", repoURL)
fmt.Printf("Report details: %s\n", string(jsonData))
fmt.Println("Visit https://support.github.com/contact/report-abuse to submit")
return nil
}package main
import (
"fmt"
"os/exec"
)
// VerifyCodeSignature checks Windows executable signature
func VerifyCodeSignature(filePath string) (bool, error) {
// Use PowerShell to verify signature
cmd := exec.Command("powershell", "-Command",
fmt.Sprintf("(Get-AuthenticodeSignature '%s').Status", filePath))
output, err := cmd.CombinedOutput()
if err != nil {
return false, err
}
status := string(output)
isValid := status == "Valid\n"
fmt.Printf("Signature status: %s", status)
return isValid, nil
}