Loading...
Loading...
Identify and analyze potentially malicious software distribution repositories disguised as legitimate security software
npx skill4agent add aradotso/security-skills avast-premium-security-awarenessSkill by ara.so — Security Skills collection.
// Common malware patterns in fake security software repos:
enum class ThreatType {
TROJAN_DOWNLOADER, // Downloads additional malware
INFO_STEALER, // Harvests credentials/data
RANSOMWARE, // Encrypts user files
BACKDOOR, // Remote access
CRYPTOMINER, // Uses CPU for mining
ADWARE // Injects advertisements
};
struct RepositoryIndicators {
bool promisesCrackedSoftware;
bool hasKeygenInDescription;
bool missingSourceCode;
bool artificialStarGrowth;
bool suspiciousUsername;
int threatScore; // 0-100
};#include <string>
#include <vector>
#include <regex>
class MaliciousRepoDetector {
public:
struct SuspiciousIndicators {
std::vector<std::string> keywords = {
"keygen", "crack", "pre-activated", "loader",
"serial", "license key", "full version", "premium free"
};
std::vector<std::string> patterns = {
R"(\d{4}\s*\|\s*Full Version)", // Year | Full Version
R"(Premium\s+.*\s+Free)", // Premium ... Free
R"(Crack.*Download)", // Crack...Download
R"(Keygen.*Activation)" // Keygen...Activation
};
};
int calculateThreatScore(const std::string& description,
const std::string& readme) {
int score = 0;
SuspiciousIndicators indicators;
// Check for piracy keywords
for (const auto& keyword : indicators.keywords) {
if (description.find(keyword) != std::string::npos) {
score += 15;
}
}
// Check regex patterns
for (const auto& pattern : indicators.patterns) {
if (std::regex_search(description, std::regex(pattern))) {
score += 20;
}
}
// Empty or missing README
if (readme.empty() || readme.find("No README") != std::string::npos) {
score += 25;
}
return std::min(score, 100);
}
bool isSuspicious(int threatScore) {
return threatScore > 40;
}
};#include <iostream>
#include <map>
class LegitimateSourceVerifier {
private:
std::map<std::string, std::string> officialSources = {
{"avast", "https://www.avast.com"},
{"norton", "https://www.norton.com"},
{"kaspersky", "https://www.kaspersky.com"},
{"bitdefender", "https://www.bitdefender.com"}
};
public:
bool verifySource(const std::string& vendor,
const std::string& url) {
auto it = officialSources.find(vendor);
if (it != officialSources.end()) {
return url.find(it->second) == 0;
}
return false;
}
void printWarnings() {
std::cout << "⚠️ SECURITY WARNINGS:\n";
std::cout << "1. Never download security software from GitHub repos\n";
std::cout << "2. Only use official vendor websites\n";
std::cout << "3. Avoid 'cracked' or 'pre-activated' software\n";
std::cout << "4. Verify digital signatures on downloads\n";
std::cout << "5. Use official package managers when available\n";
}
};#include <string>
#include <ctime>
struct SecurityReport {
std::string repositoryUrl;
std::string threatType;
std::string evidenceDescription;
std::time_t reportedAt;
std::string generateReport() {
return "Repository: " + repositoryUrl + "\n" +
"Threat: " + threatType + "\n" +
"Evidence: " + evidenceDescription + "\n" +
"Report to: github.com/contact/report-abuse";
}
};
// Example usage
void reportMaliciousRepo(const std::string& repoUrl) {
SecurityReport report;
report.repositoryUrl = repoUrl;
report.threatType = "Malware Distribution / Piracy";
report.evidenceDescription =
"Repository claims to distribute cracked commercial security "
"software with keygens and pre-activated licenses. Contains "
"no legitimate source code. Likely malware distribution.";
report.reportedAt = std::time(nullptr);
std::cout << report.generateReport() << std::endl;
}# Environment variables for safe software verification
export VERIFY_DOWNLOADS=true
export QUARANTINE_UNKNOWN_SOURCES=true
export OFFICIAL_SOURCES_ONLY=true
# Check file signatures before execution
export CHECK_DIGITAL_SIGNATURES=true
export SANDBOX_UNTRUSTED_EXECUTABLES=true// DO NOT download from GitHub repositories
// Use official sources only:
const std::string OFFICIAL_AVAST = "https://www.avast.com/downloads";
// For Linux systems, use package managers:
// sudo apt install avast (if available in official repos)
// Or download from vendor website onlybool isSafeToInstall(const std::string& source) {
// ✅ Official vendor website
// ✅ Official app store (Microsoft Store, etc.)
// ✅ Verified package manager (apt, winget, chocolatey)
// ❌ GitHub repositories for commercial software
// ❌ File sharing sites
// ❌ Torrent sites
// ❌ "Crack" or "keygen" sites
return isOfficialSource(source) &&
hasValidSignature(source) &&
!promisesFreeCommercialSoftware(source);
}