Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7a6aba5a2a | ||
|
|
ca0ec1f99d | ||
|
|
4e167486a1 | ||
|
|
503bbcd995 | ||
|
|
b160d2f634 | ||
|
|
2e7628a837 | ||
|
|
1259948ed7 | ||
|
|
81881ae1a4 | ||
|
|
0b5c581aca | ||
|
|
eb3614ed0c | ||
|
|
eb50513277 | ||
|
|
c3af73b8cf | ||
|
|
b552164a13 | ||
|
|
b6dc9ecadb | ||
|
|
0723dc8dbb | ||
|
|
0b1fffb5bf | ||
|
|
a39d87e5c5 | ||
|
|
0b0c3310cf | ||
|
|
f75c3750a5 | ||
|
|
3da760721b | ||
|
|
a9ad3feeec | ||
|
|
479c4ade67 | ||
|
|
84afa3e714 | ||
|
|
9a69665bab | ||
|
|
fea34ee937 | ||
|
|
ff2412c65d | ||
|
|
658953860a | ||
|
|
b473783527 | ||
|
|
7e590d4925 | ||
|
|
232fd3e2f2 | ||
|
|
9ea25fb77c | ||
|
|
6c47136de3 | ||
|
|
6fae29b488 | ||
|
|
7ed8cc9380 | ||
|
|
142e9d1028 | ||
|
|
c96c30ff9a | ||
|
|
337f1cc100 | ||
|
|
c3cb89dbea | ||
|
|
445bd1f668 | ||
|
|
1bded908c1 | ||
|
|
8d9dea4b08 | ||
|
|
4e98d6d8ce | ||
|
|
55b5cd939e | ||
|
|
d72f5a43c8 | ||
|
|
b406d8d30b | ||
|
|
f9c91c9ba0 | ||
|
|
0213d7eeb4 | ||
|
|
048c5c0970 | ||
|
|
728542fce8 | ||
|
|
81ca24c7a2 | ||
|
|
32ec272253 | ||
|
|
758982b660 | ||
|
|
a83bba10e3 | ||
|
|
4b9342fa8b | ||
|
|
a48162cf4a | ||
|
|
3fa61e777c | ||
|
|
01a2c55207 | ||
|
|
1a2376e6b7 | ||
|
|
dab0d6a47f | ||
|
|
b5d90b5cb7 | ||
|
|
25fd0bd2af | ||
|
|
a4bb63fcd4 | ||
|
|
9d85785c27 | ||
|
|
4206242627 | ||
|
|
f0149be9ad | ||
|
|
5d56a1f0e0 | ||
|
|
ad06c75058 | ||
|
|
d5b6e17e59 | ||
|
|
ffe2514e11 | ||
|
|
8621bed5d4 | ||
|
|
634031e6dc | ||
|
|
11fae36469 | ||
|
|
3d01e36a71 | ||
|
|
c2082b1ac5 | ||
|
|
c94bbf84fe | ||
|
|
930363cd3f | ||
|
|
085ca9eb58 | ||
|
|
f486d44804 |
No files matched your search
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"Suffix": [".com", ".exe", ".dll", ".sys", ".scr", ".bat", ".cmd", ".ps1", ".vbs", ".wsf"],
|
||||
|
||||
"Labels": ["Pefile/White", "Script/White", "Pefile/General", "Script/General"],
|
||||
|
||||
"Detect": ["Pefile/General", "Script/General"],
|
||||
|
||||
"Resize": [224, 224, 1, "nearest"],
|
||||
|
||||
"Values": 95
|
||||
}
|
||||
Binary file not shown.
@@ -772,31 +772,26 @@ rule General_28 {
|
||||
author = "PYAS Security"
|
||||
date = "2024-06-12"
|
||||
strings:
|
||||
$s1 = "GNU C11 6.3.0" ascii
|
||||
$s2 = "GCC: (MinGW.org GCC-6.3.0-1) 6.3.0" fullword ascii
|
||||
$s3 = "___mingw_readdir" fullword ascii
|
||||
$s4 = "___mingw_closedir" fullword ascii
|
||||
$s5 = "___mingw_seekdir" fullword ascii
|
||||
$s6 = "%d is not a prime number." fullword ascii
|
||||
$s7 = "___mingw_rewinddir" fullword ascii
|
||||
$s8 = "__mingw32_init_mainargs" fullword ascii
|
||||
$s9 = "___mingw_telldir" fullword ascii
|
||||
$s10 = "Enter an integer: " fullword ascii
|
||||
$s11 = "___mingw_opendir" fullword ascii
|
||||
$s12 = "/home/keith/" ascii
|
||||
$s13 = "../../../src/gcc-6.3.0/libgcc" ascii
|
||||
$s14 = "___mingw_dirname" fullword ascii
|
||||
$s15 = "_isPrime`" fullword ascii
|
||||
$s16 = "%d is a prime number." fullword ascii
|
||||
$s17 = ".weak.__Jv_RegisterClasses.___EH_FRAME_BEGIN__" fullword ascii
|
||||
$s18 = "-mtune=generic" ascii
|
||||
$s19 = "-march=i586" ascii
|
||||
$s20 = "-g -g -g -O2 -O2 -O2" ascii
|
||||
$s21 = "-fbuilding-libgcc" ascii
|
||||
$s22 = "-fno-stack-protector" ascii
|
||||
$x1 = "schemas.microsoft.com" wide
|
||||
$x2 = "Client Worker Thread" ascii
|
||||
$s1 = "A6BFEA43-501F-456F-A845-983D3AD7B8F0" wide
|
||||
$s2 = "upgrader" wide
|
||||
$s3 = "rtvscan.exe" wide
|
||||
$s4 = "Enable-WindowsOptionalFeature -FeatureName" wide
|
||||
$s5 = "remupd.exe" fullword wide
|
||||
$s6 = "Mcshield.exe" fullword wide
|
||||
$s7 = "mssecess.exe" fullword wide
|
||||
$s8 = "RavMonD.exe" fullword wide
|
||||
$s9 = "KvMonXP.exe" fullword wide
|
||||
$s10 = "baiduSafeTray.exe" fullword wide
|
||||
$s11 = "Qavanijeb.exe" fullword wide
|
||||
$s12 = "%s --> Error: %d, EC: %d" fullword ascii
|
||||
$s13 = "wscript.exe //E:vbscript" wide
|
||||
$s14 = "upgrader_64" wide
|
||||
$s15 = "Process Data Error" fullword wide
|
||||
condition:
|
||||
uint16(0) == 0x5a4d and filesize < 500KB and
|
||||
8 of them
|
||||
uint16(0) == 0x5a4d and filesize < 1000KB and
|
||||
1 of ($x*) and 6 of them
|
||||
}
|
||||
|
||||
rule General_29 {
|
||||
@@ -1442,31 +1437,3 @@ rule General_52 {
|
||||
uint16(0) == 0x5a4d and filesize < 2000KB and
|
||||
8 of them
|
||||
}
|
||||
|
||||
rule General_53 {
|
||||
meta:
|
||||
description = "53"
|
||||
author = "PYAS Security"
|
||||
date = "2024-06-12"
|
||||
strings:
|
||||
$x1 = "schemas.microsoft.com" wide
|
||||
$x2 = "Client Worker Thread" ascii
|
||||
$s1 = "A6BFEA43-501F-456F-A845-983D3AD7B8F0" wide
|
||||
$s2 = "upgrader" wide
|
||||
$s3 = "rtvscan.exe" wide
|
||||
$s4 = "Enable-WindowsOptionalFeature -FeatureName" wide
|
||||
$s5 = "remupd.exe" fullword wide
|
||||
$s6 = "Mcshield.exe" fullword wide
|
||||
$s7 = "mssecess.exe" fullword wide
|
||||
$s8 = "RavMonD.exe" fullword wide
|
||||
$s9 = "KvMonXP.exe" fullword wide
|
||||
$s10 = "baiduSafeTray.exe" fullword wide
|
||||
$s11 = "Qavanijeb.exe" fullword wide
|
||||
$s12 = "%s --> Error: %d, EC: %d" fullword ascii
|
||||
$s13 = "wscript.exe //E:vbscript" wide
|
||||
$s14 = "upgrader_64" wide
|
||||
$s15 = "Process Data Error" fullword wide
|
||||
condition:
|
||||
uint16(0) == 0x5a4d and filesize < 1000KB and
|
||||
1 of ($x*) and 6 of them
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,117 @@
|
||||
Windows Registry Editor Version 5.00
|
||||
|
||||
; Repair system restrictions
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MMC]
|
||||
; NoControlPanel
|
||||
"NoControlPanel"=dword:00000000
|
||||
; NoDrives
|
||||
"NoDrives"=dword:00000000
|
||||
; NoFileMenu
|
||||
"NoFileMenu"=dword:00000000
|
||||
; NoFind
|
||||
"NoFind"=dword:00000000
|
||||
; NoRealMode
|
||||
"NoRealMode"=dword:00000000
|
||||
; NoRecentDocsMenu
|
||||
"NoRecentDocsMenu"=dword:00000000
|
||||
; NoSetFolders
|
||||
"NoSetFolders"=dword:00000000
|
||||
; NoSetFolderOptions
|
||||
"NoSetFolderOptions"=dword:00000000
|
||||
; NoViewOnDrive
|
||||
"NoViewOnDrive"=dword:00000000
|
||||
; NoClose
|
||||
"NoClose"=dword:00000000
|
||||
; NoRun
|
||||
"NoRun"=dword:00000000
|
||||
; NoDesktop
|
||||
"NoDesktop"=dword:00000000
|
||||
; NoLogOff
|
||||
"NoLogOff"=dword:00000000
|
||||
; NoFolderOptions
|
||||
"NoFolderOptions"=dword:00000000
|
||||
; RestrictRun
|
||||
"RestrictRun"=dword:00000000
|
||||
; NoViewContextMenu
|
||||
"NoViewContexMenu"=dword:00000000
|
||||
; HideClock
|
||||
"HideClock"=dword:00000000
|
||||
; NoStartMenuMorePrograms
|
||||
"NoStartMenuMorePrograms"=dword:00000000
|
||||
; NoStartMenuMyGames
|
||||
"NoStartMenuMyGames"=dword:00000000
|
||||
; NoStartMenuMyMusic
|
||||
"NoStartMenuMyMusic"=dword:00000000
|
||||
; DisableCMD
|
||||
"DisableCMD"=dword:00000000
|
||||
; NoWinKeys
|
||||
"NoWinKeys"=dword:00000000
|
||||
; StartMenuLogOff
|
||||
"StartMenuLogOff"=dword:00000000
|
||||
; NoSimpleNetlDList
|
||||
"NoSimpleNetlDList"=dword:00000000
|
||||
; NoLowDiskSpaceChecks
|
||||
"NoLowDiskSpaceChecks"=dword:00000000
|
||||
; DisableLockWorkstation
|
||||
"DisableLockWorkstation"=dword:00000000
|
||||
; Restrict_Run
|
||||
"Restrict_Run"=dword:00000000
|
||||
; DisableTaskMgr
|
||||
"DisableTaskMgr"=dword:00000000
|
||||
; DisableRegistryTools
|
||||
"DisableRegistryTools"=dword:00000000
|
||||
; DisableChangePassword
|
||||
"DisableChangePassword"=dword:00000000
|
||||
; Wallpaper
|
||||
"Wallpaper"=dword:00000000
|
||||
; NoComponents
|
||||
"NoComponents"=dword:00000000
|
||||
; NoAddingComponents
|
||||
"NoAddingComponents"=dword:00000000
|
||||
; NoStartMenuPinnedList
|
||||
"NoStartMenuPinnedList"=dword:00000000
|
||||
; NoActiveDesktop
|
||||
"NoActiveDesktop"=dword:00000000
|
||||
; NoSetActiveDesktop
|
||||
"NoSetActiveDesktop"=dword:00000000
|
||||
; NoActiveDesktopChanges
|
||||
"NoActiveDesktopChanges"=dword:00000000
|
||||
; NoChangeStartMenu
|
||||
"NoChangeStartMenu"=dword:00000000
|
||||
; NoFavoritesMenu
|
||||
"NoFavoritesMenu"=dword:00000000
|
||||
; NoRecentDocsHistory
|
||||
"NoRecentDocsHistory"=dword:00000000
|
||||
; NoSetTaskbar
|
||||
"NoSetTaskbar"=dword:00000000
|
||||
; NoSMHelp
|
||||
"NoSMHelp"=dword:00000000
|
||||
; NoTrayContextMenu
|
||||
"NoTrayContextMenu"=dword:00000000
|
||||
; NoViewContextMenu
|
||||
"NoViewContextMenu"=dword:00000000
|
||||
; NoManageMyComputerVerb
|
||||
"NoManageMyComputerVerb"=dword:00000000
|
||||
; NoWindowsUpdate
|
||||
"NoWindowsUpdate"=dword:00000000
|
||||
; ClearRecentDocsOnExit
|
||||
"ClearRecentDocsOnExit"=dword:00000000
|
||||
; NoStartMenuNetworkPlaces
|
||||
"NoStartMenuNetworkPlaces"=dword:00000000
|
||||
|
||||
; Repair Image File Execution Options
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options]
|
||||
; (Delete all subkeys here if necessary)
|
||||
|
||||
; Repair executable file icon
|
||||
[HKEY_CLASSES_ROOT\exefile\DefaultIcon]
|
||||
@="%1"
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\exefile\DefaultIcon]
|
||||
@="%1"
|
||||
|
||||
; Repair executable file type
|
||||
[HKEY_CLASSES_ROOT\.exe]
|
||||
@="exefile"
|
||||
[HKEY_CLASSES_ROOT\exefile\shell\open\command]
|
||||
@="\"%1\" %*"
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
sfc /scannow
|
||||
@@ -0,0 +1 @@
|
||||
None
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020-2024 87owo (PYAS Security)
|
||||
Copyright (c) 2020-2025 87owo (PYAS Security)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"Suffix": [".com", ".exe", ".dll", ".sys", ".scr",
|
||||
".bat", ".cmd", ".ps1", ".vbs", ".wsf"],
|
||||
|
||||
"Labels": ["Pefile/White", "Script/White", "Pefile/General", "Script/General"],
|
||||
|
||||
"Detect": ["Pefile/General", "Script/General"],
|
||||
|
||||
"Pixels": [224, 224],
|
||||
|
||||
"Values": 85
|
||||
}
|
||||
Binary file not shown.
+85
-40
@@ -1,5 +1,5 @@
|
||||
import os, sys, time, json, yara
|
||||
import numpy, pefile, onnxruntime
|
||||
import os, sys, time, json, yara, numpy
|
||||
import chardet, pefile, onnxruntime
|
||||
from PIL import Image
|
||||
|
||||
class YRScan:
|
||||
@@ -9,7 +9,7 @@ class YRScan:
|
||||
|
||||
def load_rules(self, file_path):
|
||||
try:
|
||||
ftype = str(f".{file_path.split('.')[-1]}").lower()
|
||||
ftype = os.path.splitext(file_path)[-1].lower()
|
||||
if ftype in [".yara", ".yar"]:
|
||||
self.rules[file_path] = yara.compile(file_path)
|
||||
elif ftype in [".yc", ".yrc"]:
|
||||
@@ -38,19 +38,31 @@ class YRScan:
|
||||
class DLScan:
|
||||
def __init__(self):
|
||||
self.models = {}
|
||||
self.shells = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '!o',
|
||||
'cry', 'test', 'ace', 'yg', 'obr', 'tvm', 'dec', 'enc', 'b1_', 'base',
|
||||
'bss', 'clr_uef', 'cursors', 'trs_age', 'engine', 'enigma', 'protect',
|
||||
'nep', 'no_bbt', 'wpp_sf', 'retpol', 'rt', 'rwexec', 'rygs', 'poolmi',
|
||||
's:@', 'pgae', 'proxy', 'wisevec', 'segm', 'transit', 'vmp', 'extjmp',
|
||||
'upx', 'tracesup', 'res', 'lzma', 'malloc_h', 'miniex', 'ndr64', 'be',
|
||||
'mssmixer', 'wow', 'press', 'fio', 'pad', 'hexpthk', 'h~;', 'icapsec',
|
||||
'sanontcp', 'secur', 'asmstub', 'nsys_wr', 'orpc', 'pack', 'wow64svc',
|
||||
'uedbg', 'viahw', 'data', 'zk', 'fothk', 'qihoo']#"""
|
||||
self.valid_interpolations = {
|
||||
"box": Image.Resampling.BOX,
|
||||
"none": Image.Resampling.NEAREST,
|
||||
"bilinear": Image.Resampling.BILINEAR,
|
||||
"hamming": Image.Resampling.HAMMING,
|
||||
"bicubic": Image.Resampling.BICUBIC,
|
||||
"lanczos": Image.Resampling.LANCZOS,
|
||||
"nearest": Image.Resampling.NEAREST}
|
||||
|
||||
shell_section = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
|
||||
"cry", "tvm", "dec", "enc", "vmp", "upx", "aes", "lzma", "press",
|
||||
"pack", "enigma", "protect", "secur"]
|
||||
unknown_section = ["asmstub", "base", "bss", "clr_uef", "cursors",
|
||||
"engine", "fio", "fothk", "h~;", "icapsec", "malloc_h", "miniex",
|
||||
"mssmixer", "ndr64", "nsys_wr", "obr", "wow", "wow64svc", "wpp_sf",
|
||||
"pad", "pgae", "poolmi", "proxy", "qihoo", "res", "retpol", "uedbg",
|
||||
"rwexec", "rygs", "s:@", "sanontcp", "segm", "test", "tracesup",
|
||||
"transit", "trs_age", "wisevec"]
|
||||
unimportant_section = ["viahwaes", "orpc", "nep", "ace", "extjmp",
|
||||
"no_bbt", "data", "page", "hexpthk"]
|
||||
self.shells = shell_section + unimportant_section + unknown_section
|
||||
|
||||
def load_model(self, file_path):
|
||||
try:
|
||||
ftype = str(f".{file_path.split('.')[-1]}").lower()
|
||||
ftype = os.path.splitext(file_path)[-1].lower()
|
||||
if ftype in [".json", ".txt"]:
|
||||
with open(file_path, 'r') as f:
|
||||
self.class_names = json.load(f)
|
||||
@@ -58,52 +70,85 @@ class DLScan:
|
||||
self.models[file_path] = onnxruntime.InferenceSession(file_path)
|
||||
self.labels = self.class_names['Labels']
|
||||
self.detect = self.class_names['Detect']
|
||||
self.pixels = self.class_names['Pixels']
|
||||
self.values = self.class_names['Values']
|
||||
self.resize = self.class_names['Resize']
|
||||
self.suffix = self.class_names['Suffix']
|
||||
except Exception as e:
|
||||
pass
|
||||
|
||||
def dl_scan(self, file_data):
|
||||
def dl_scan(self, file_path):
|
||||
try:
|
||||
label_similarities = {label: [] for label in self.labels}
|
||||
image_data = self.preprocess_image(file_data, tuple(self.pixels))
|
||||
image_array = numpy.asarray(image_data).astype('float32') / 255.0
|
||||
image_expand = numpy.expand_dims(image_array, axis=(0, -1))
|
||||
batch_images = []
|
||||
for section, file_data in self.get_type(file_path).items():
|
||||
image_data = self.preprocess_image(file_data, tuple(self.resize))
|
||||
image_array = numpy.asarray(image_data).astype('float32') / 255.0
|
||||
if len(image_array.shape) == 2:
|
||||
image_array = numpy.expand_dims(image_array, axis=-1)
|
||||
batch_images.append(image_array)
|
||||
batch_results = [{label: [] for label in self.labels} for _ in range(len(batch_images))]
|
||||
batch_images = numpy.stack(batch_images, axis=0)
|
||||
for model_name, model in self.models.items():
|
||||
input_name = model.get_inputs()[0].name
|
||||
pre_answers = model.run(None, {input_name: image_expand})[0][0]
|
||||
for k, score in enumerate(pre_answers):
|
||||
label_similarities[self.labels[k].strip()].append(score)
|
||||
label_percentage = {label: (sum(similarities) / len(image_expand)) * 100
|
||||
for label, similarities in label_similarities.items()}
|
||||
label, level = max(label_percentage.items(), key=lambda x: x[1])
|
||||
return label, int(level)
|
||||
predictions = model.run(None, {input_name: batch_images})[0]
|
||||
for i, pre_answers in enumerate(predictions):
|
||||
for k, score in enumerate(pre_answers):
|
||||
batch_results[i][self.labels[k].strip()].append(score)
|
||||
final_results = []
|
||||
for result in batch_results:
|
||||
label_percentage = {label: (sum(scores) / len(scores)) * 100
|
||||
for label, scores in result.items()}
|
||||
best_label, best_confidence = max(label_percentage.items(), key=lambda x: x[1])
|
||||
final_results.append((best_label, int(best_confidence)))
|
||||
if best_label in self.detect:
|
||||
return best_label, int(best_confidence)
|
||||
return False, False
|
||||
except Exception as e:
|
||||
return False, False
|
||||
|
||||
def preprocess_image(self, file_data, target_size):
|
||||
wah = int(numpy.ceil(numpy.sqrt(len(file_data))))
|
||||
file_data = numpy.frombuffer(file_data, dtype=numpy.uint8)
|
||||
image_array = numpy.zeros((wah * wah,), dtype=numpy.uint8)
|
||||
image_array[:len(file_data)] = file_data
|
||||
image = Image.fromarray(image_array.reshape((wah, wah)), 'L')
|
||||
return image.resize(target_size, Image.Resampling.NEAREST)
|
||||
width, height, channels, interpolation = target_size
|
||||
wah = int(numpy.ceil(numpy.sqrt(len(file_data) / channels)))
|
||||
array_data = numpy.frombuffer(file_data, dtype=numpy.uint8)
|
||||
expected_size = wah * wah * channels
|
||||
image_array = numpy.zeros((expected_size,), dtype=numpy.uint8)
|
||||
image_array[:len(file_data)] = array_data
|
||||
if channels == 1:
|
||||
reshape = image_array.reshape((wah, wah))
|
||||
image = Image.fromarray(reshape, 'L')
|
||||
elif channels == 3:
|
||||
reshape = image_array.reshape((wah, wah, 3))
|
||||
image = Image.fromarray(reshape, 'RGB')
|
||||
if width == 0 and height == 0:
|
||||
return image
|
||||
i = self.valid_interpolations.get(interpolation.lower(), Image.BILINEAR)
|
||||
return image.resize((width, height), i)
|
||||
|
||||
def is_text_file(self, content, sample_size):
|
||||
try:
|
||||
raw_data = content[:sample_size]
|
||||
encoding = chardet.detect(raw_data)["encoding"]
|
||||
if encoding in ["ascii", "utf-8", "utf-8-sig"]:
|
||||
if raw_data.decode(encoding):
|
||||
return True
|
||||
return False
|
||||
except:
|
||||
return False
|
||||
|
||||
def get_type(self, file_path):
|
||||
match_data = {}
|
||||
ftype = str(f".{file_path.split('.')[-1]}").lower()
|
||||
ftype = os.path.splitext(file_path)[-1].lower()
|
||||
if ftype in self.suffix:
|
||||
try:
|
||||
with pefile.PE(file_path, fast_load=True) as pe:
|
||||
for section in pe.sections:
|
||||
section_name = section.Name.rstrip(b'\x00').decode('latin1')
|
||||
name = section.Name.rstrip(b'\x00').decode('latin1')
|
||||
if (section.Characteristics & 0x00000020 and not
|
||||
any(shell in section_name.lower() for shell in self.shells)):
|
||||
match_data[section_name] = section.get_data()
|
||||
any(s in name.lower() for s in self.shells)):
|
||||
print(name)
|
||||
match_data[name] = section.get_data()
|
||||
except:
|
||||
if ftype in [".bat", ".cmd", ".ps1", ".vbs", ".wsf", ".html", ".js",
|
||||
".txt", ".htm", ".hta", ".php", ".css", ".xml", ".json", ".wasm"]:
|
||||
with open(file_path, 'rb') as file:
|
||||
match_data[ftype] = file.read()
|
||||
with open(file_path, 'rb') as f:
|
||||
file_content = f.read()
|
||||
if self.is_text_file(file_content, 1024):
|
||||
match_data[ftype] = file_content
|
||||
return match_data
|
||||
+706
-446
File diff suppressed because it is too large.
Load diff
+14
-8
@@ -1,10 +1,10 @@
|
||||
translate_dict = {
|
||||
"zh_TW": {"已开启":"已開啟","已关闭":"已關閉","On":"已開啟","Off":"已關閉"},
|
||||
"zh_CN": {"已開啟":"已开启","已關閉":"已关闭","On":"已开启","Off":"已关闭",
|
||||
"錯誤":"错误","發現":"发现","關閉":"关闭","裝置":"设备","記憶體":"内存",
|
||||
"軟體":"软件","檔案":"文件","確定":"确认","設定":"设置","關於":"关于",
|
||||
"錯誤":"错误","實時":"实时","發現":"发现","關閉":"关闭","裝置":"设备",
|
||||
"總數":"总数","註冊":"注册","圖標":"图标","路徑":"路径","網路":"网络",
|
||||
"位元":"字节","彈窗":"弹窗","靈敏":"敏感","複製":"复制","開啟":"开启",
|
||||
"位元":"字节","靈敏":"敏感","複製":"复制","開啟":"开启","資源回收桶":"资源回收桶",
|
||||
"訊":"讯","項":"项","掃":"扫","試":"试","黃":"黄","嗎":"吗","防":"保",
|
||||
"鑰":"钥","當":"当","後":"后","護":"护","導":"导","區":"区","復":"复",
|
||||
"攔":"拦","請":"请","統":"统","刪":"删","進":"进","個":"个","選":"选",
|
||||
@@ -16,7 +16,8 @@ translate_dict = {
|
||||
"綠":"绿","態":"态","務":"务","連":"连","檢":"检","測":"测","關":"关",
|
||||
"強":"强","驅":"驱","為":"为","腳":"脚","單":"单","開":"开","擴":"扩",
|
||||
"惡":"恶","據":"据","庫":"库","經":"经","敗":"败","謝":"谢","別":"别",
|
||||
"載":"载","誤":"误","報":"报","鏈":"链","竄":"窜","蹤":"踪","記憶體":"内存",},
|
||||
"載":"载","誤":"误","報":"报","鏈":"链","竄":"窜","蹤":"踪","與":"与",
|
||||
"異":"异","實":"实","時":"时","彈":"弹","窗":"窗","暫":"暂","訂":"订",},
|
||||
"en_US": {"已開啟":"On","已關閉":"Off","已开启":"On","已关闭":"Off",",":", ",
|
||||
"立即刪除":"Delete Now","安全模式":"Safe Mode","官方網站":"Website ",
|
||||
"腳本":"Script ","鏈式":"Chain ","記憶體":"Memory ","加載":"Load ",
|
||||
@@ -27,7 +28,7 @@ translate_dict = {
|
||||
"最小化到":"Minimize To ","靈敏度":"Sensitivity ","正在檢查":"Checking ",
|
||||
"確定要":"Sure Want To ","引擎靈敏度":"Sensitivity ","更新":"Update ",
|
||||
"白色主題":"White","黃色主題":"Yellow","紅色主題":"Red","語言":"Language ",
|
||||
"藍色主題":"Blue","綠色主題":"Green","自定主題":"Custom","最新":"Latest ",
|
||||
"藍色主題":"Blue","綠色主題":"Green","自訂主題":"Custom","最新":"Latest ",
|
||||
"特別感謝":"Contributors ","版本資訊":"Information","通訊":"Connect ",
|
||||
"註冊表":"Registry ","退出":"Quit ","檔案":"File ","當前":"Currently ",
|
||||
"狀態":"State ","掃描":"Scan ","工具":"Tools ","防護":"Protect ",
|
||||
@@ -41,13 +42,13 @@ translate_dict = {
|
||||
"網路":"Network ","變更":"Change ","總數":"Total","結束":"End ",
|
||||
"選項":"Options ","監控":"Monitor ","連接":"Connect ","可以":"To ",
|
||||
"進程":"Process ","攔截":"Block ","引導":"Boot ","刪除":"Delete ",
|
||||
"分區":"Partition ","設定":"Settings","關於":"About","模式":"Mode ",
|
||||
"分區":"Partition ","設定":"Setting ","關於":"About","模式":"Mode ",
|
||||
"提高":"Improve ","安全":"Security ","顯色":"Color ","主題":"Themes ",
|
||||
"風險":"Risk ","介面":"GUI ","核心":"Core ","服務":"Services ",
|
||||
"管理":"Manage","所有":"All ","您":"You ","取消":"Cancel ","未":"Not ",
|
||||
"垃圾":"Junk ","位元":"byte ","本機":"Computer ","停止":"Stop ",
|
||||
"增加到":"Add To ","白名單":"White List ","軟體":"Software ","正在":"",
|
||||
"增加":"Add ","移除":"Delete","項目":"Items ","生成":"Create ","稱":"",
|
||||
"到":"To ","白名單":"White List ","軟體":"Software ","正在":"",
|
||||
"增加":"Add ","移除":"Delete ","項目":"Items ","生成":"Create ","稱":"",
|
||||
"複製":"Copy ","開啟":"Open ","此":"This ","並":"And ","全盤":"Full ",
|
||||
"已經在":"Already ","數據庫":"Database ","誤報":"False Positive ",
|
||||
"高":"High ","新":"New ","和":"And ","可能會":"Possible ","會":"Can ",
|
||||
@@ -57,4 +58,9 @@ translate_dict = {
|
||||
"擴展":"Extension ","套件":"Kit ","自動":"Auto ","上報":"Report ",
|
||||
"分析":"Analysis ","自身":"Self ","其他":"Other ","配置":"Config ",
|
||||
"丟失":"Lost ","網站":"Website ","不兼容":"Not Compatible ",
|
||||
"竄改":"Tamper ","第三方":"Other ","與":"With "," ":" "}}
|
||||
"竄改":"Tamper ","第三方":"Other ","實時":"Real Time ","查看":"View ",
|
||||
"指定":"Specify ","清空":"Empty ","資源回收桶":"Recycle Bin ",
|
||||
"與":"With ","當":"When ","功能":"Function ","異常":"Abnormal ",
|
||||
"重置":"Reset ","窗口":"Window ","暫存":"Temp ","自訂":"Custom ",
|
||||
"不支持":"Not Support ","共":"Total ","秒":"Seconds ","耗時":"Takes ",
|
||||
"時":""," ":" "}}
|
||||
+4931
-4800
File diff suppressed because it is too large.
Load diff
+10
-12
@@ -1,12 +1,10 @@
|
||||
slist = [".exe",".dll",".sys",".com",".scr",
|
||||
".bat",".ps1",".vbs",".cmd",".js"]
|
||||
|
||||
alist = [".exe",".dll",".sys",".com",".scr",
|
||||
".zip",".7z",".rar",".tar",".gz",
|
||||
".js",".bat",".cmd",".ps1",".vbs",
|
||||
".ppt",".pptx",".wps",".txt",".rtf",
|
||||
".pdf",".xls",".xlsx",".doc",".docx",
|
||||
".jpg",".jpeg",".png",".webp",".gif",
|
||||
".mp3",".wav",".aac",".ogg",".flac",
|
||||
".mp4",".avi",".mov",".wmv",".mkv",
|
||||
".aux",".cur",".mui",".ttf",".efi"]
|
||||
file_types = [
|
||||
".exe",".dll",".sys",".com",".scr",
|
||||
".zip",".7z",".rar",".tar",".gz",
|
||||
".js",".bat",".cmd",".ps1",".vbs",
|
||||
".ppt",".pptx",".wps",".txt",".rtf",
|
||||
".pdf",".xls",".xlsx",".doc",".docx",
|
||||
".jpg",".jpeg",".png",".webp",".gif",
|
||||
".mp3",".wav",".aac",".ogg",".flac",
|
||||
".mp4",".avi",".mov",".wmv",".mkv",
|
||||
".aux",".cur",".mui",".ttf",".efi"]
|
||||
+1
-1
@@ -2,7 +2,7 @@ import pyinstaller_versionfile
|
||||
|
||||
pyinstaller_versionfile.create_versionfile(
|
||||
output_file="versionfile.txt",
|
||||
version='3.2.4',
|
||||
version='3.3.0',
|
||||
company_name="PYAS Security",
|
||||
file_description="Python Antivirus Software",
|
||||
internal_name="PYAS",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# PYAS (Python Antivirus Software)
|
||||
|
||||

|
||||

|
||||
|
||||
## Readme Language
|
||||
|
||||
@@ -11,42 +11,37 @@
|
||||
## Requirements
|
||||
|
||||
```
|
||||
pip install psutil==5.9.5
|
||||
pip install pefile==2023.2.7
|
||||
pip install requests==2.31.0
|
||||
pip install pyperclip==1.8.2
|
||||
pip install pywin32==306
|
||||
pip install PyQt5==5.15.9
|
||||
pip install yara-python==4.5.1
|
||||
pip install numpy==2.1.1
|
||||
pip install chardet==5.2.0
|
||||
pip install numpy==1.26.3
|
||||
pip install onnxruntime==1.18.1
|
||||
pip install pefile==2023.2.7
|
||||
pip install pillow==10.4.0
|
||||
pip install pyperclip==1.8.2
|
||||
pip install PyQt5==5.15.11
|
||||
pip install requests==2.32.3
|
||||
pip install yara-python==4.5.1
|
||||
```
|
||||
|
||||
## File Information
|
||||
|
||||
```
|
||||
PYAS/
|
||||
├── Driver/
|
||||
│ ├── PYAS_Driver.sys -------> Driver Protect (self protection driver for pyas by 0sha0)
|
||||
├── Driver/ (Protect driver and Microsoft runtime)
|
||||
│ └── ...
|
||||
│
|
||||
├── Model/
|
||||
│ ├── PYAS_Model.json -------> Virus Database (the database must be in the specified dir)
|
||||
├── Engine/ (Deep learn model and Yara database)
|
||||
│ └── ...
|
||||
│
|
||||
├── Rules/
|
||||
│ ├── Yara_Rules.yar ---------> Yara Rules (yara rules in plain text format)
|
||||
│ ├── Yara_Rules.yrc ---------> Compile Rules (yara rules in compiled format)
|
||||
├── Exten/ (Exten tools and System repair tools)
|
||||
│ └── ...
|
||||
│
|
||||
├── PYAS.py ---------------------> Main PYAS Program (including animation, scan, protect functions, ...)
|
||||
├── PYAS_Engine.py -------------> Conversion Database (used to transform profiles and forecast data)
|
||||
├── PYAS_Suffixes.py -----------> File Suffixes (including scanned file suffixes and common suffixes)
|
||||
├── PYAS_Interface.py ----------> PyQt5 Interface (use QT designer, must be matched with the main program)
|
||||
├── PYAS_Resource.py -----------> PyQt5 Resource (status pictures, icon packages, button icons, ...)
|
||||
├── PYAS_Language.py -----------> Translate Dict (Traditional Chinese, Simplified Chinese, English)
|
||||
├── PYAS_Version.py ------------> Pyinstaller (file information, version information, original name, ...)
|
||||
├── PYAS.py (Main PYAS program with qtui interaction and protect function)
|
||||
├── PYAS_Engine.py (Deep learning predict and yara rules file scanner)
|
||||
├── PYAS_Suffixes.py (including scan file suffixes and common suffixes)
|
||||
├── PYAS_Interface.py (Qt designer ui, must be matched with the main program)
|
||||
├── PYAS_Resource.py (status pictures, icon packages, and button icons)
|
||||
├── PYAS_Language.py (Traditional Chinese, Simplified Chinese and English)
|
||||
├── PYAS_Version.py (file information, version information, original name)
|
||||
└── ...
|
||||
```
|
||||
|
||||
@@ -76,6 +71,6 @@ Other systems may experience software malfunctions or crash
|
||||
|
||||
## Special Thanks
|
||||
|
||||
Wix, 0sha0, mtkiao129, AV-T Team of LisectGroup
|
||||
Wix, mtkiao129, 0sha0, AV-T Team of LisectGroup
|
||||
|
||||
Copyright© 2020~2024 PYAS Security By 87owo
|
||||
Copyright© 2020~2025 PYAS Security By 87owo
|
||||
+20
-25
@@ -1,46 +1,41 @@
|
||||
# PYAS (Python 杀毒软件)
|
||||
|
||||

|
||||

|
||||
|
||||
## 安装要求
|
||||
|
||||
```
|
||||
pip install psutil==5.9.5
|
||||
pip install pefile==2023.2.7
|
||||
pip install requests==2.31.0
|
||||
pip install pyperclip==1.8.2
|
||||
pip install pywin32==306
|
||||
pip install PyQt5==5.15.9
|
||||
pip install yara-python==4.5.1
|
||||
pip install numpy==2.1.1
|
||||
pip install chardet==5.2.0
|
||||
pip install numpy==1.26.3
|
||||
pip install onnxruntime==1.18.1
|
||||
pip install pefile==2023.2.7
|
||||
pip install pillow==10.4.0
|
||||
pip install pyperclip==1.8.2
|
||||
pip install PyQt5==5.15.11
|
||||
pip install requests==2.32.3
|
||||
pip install yara-python==4.5.1
|
||||
```
|
||||
|
||||
## 文件信息
|
||||
|
||||
```
|
||||
PYAS/
|
||||
├── Driver/
|
||||
│ ├── PYAS_Driver.sys -------> 驱动程序 (0sha0 为 pyas 提供的自我保护驱动程序)
|
||||
├── Driver/ (驱动保护和微软运行库)
|
||||
│ └── ...
|
||||
│
|
||||
├── Model/
|
||||
│ ├── PYAS_Model.json -------> 病毒数据库 (数据库必须位于指定目录中)
|
||||
├── Engine/ (深度学习和规则数据库)
|
||||
│ └── ...
|
||||
│
|
||||
├── Rules/
|
||||
│ ├── Yara_Rules.yar ---------> Yara 规则 (纯文本格式的 yara 规则)
|
||||
│ ├── Yara_Rules.yrc ---------> 编译规则 (编译格式的 yara 规则)
|
||||
├── Exten/ (扩展功能与系统修复工具)
|
||||
│ └── ...
|
||||
│
|
||||
├── PYAS.py ---------------------> PYAS主程序(包含动画、扫描、保护等功能...)
|
||||
├── PYAS_Engine.py -------------> 转换数据库(用于转换剖面图和预报数据)
|
||||
├── PYAS_Suffixes.py -----------> 文件后缀(包含扫描文件后缀和常用后缀)
|
||||
├── PYAS_Interface.py ----------> PyQt5界面(使用QT设计器,需与主程序搭配使用)
|
||||
├── PYAS_Resource.py -----------> PyQt5资源(状态图片、图标包、按钮图标...)
|
||||
├── PYAS_Language.py -----------> 翻译词典(繁体中文、简体中文、英文)
|
||||
├── PYAS_Version.py ------------> 安裝信息(文件信息、版本信息、原名...)
|
||||
├── PYAS.py (PYAS主程序含界面交互与保护功能)
|
||||
├── PYAS_Engine.py (深度学习预测和规则扫描器)
|
||||
├── PYAS_Suffixes.py (获取扫描或事件文件的后缀)
|
||||
├── PYAS_Interface.py (搭配主程序的Qt设计介面)
|
||||
├── PYAS_Resource.py (状态图片和图标和按钮图片)
|
||||
├── PYAS_Language.py (繁体中文和简体中文和英文翻译)
|
||||
├── PYAS_Version.py (版本和讯息名称和打包文件名)
|
||||
└── ...
|
||||
```
|
||||
|
||||
@@ -70,6 +65,6 @@ Windows 8.1, 10, 11 (64-bit), 内存 500MB, 存储 200MB 或更高
|
||||
|
||||
## 特别感谢
|
||||
|
||||
360, Wix, VirusShare, mtkiao129, AV-T Team of LisectGroup
|
||||
Wix, mtkiao129, 0sha0, AV-T Team of LisectGroup
|
||||
|
||||
Copyright© 2020~2024 PYAS Security By 87owo
|
||||
Copyright© 2020~2025 PYAS Security By 87owo
|
||||
+20
-25
@@ -1,46 +1,41 @@
|
||||
# PYAS (Python 防毒軟體)
|
||||
|
||||

|
||||

|
||||
|
||||
## 安裝要求
|
||||
|
||||
```
|
||||
pip install psutil==5.9.5
|
||||
pip install pefile==2023.2.7
|
||||
pip install requests==2.31.0
|
||||
pip install pyperclip==1.8.2
|
||||
pip install pywin32==306
|
||||
pip install PyQt5==5.15.9
|
||||
pip install yara-python==4.5.1
|
||||
pip install numpy==2.1.1
|
||||
pip install chardet==5.2.0
|
||||
pip install numpy==1.26.3
|
||||
pip install onnxruntime==1.18.1
|
||||
pip install pefile==2023.2.7
|
||||
pip install pillow==10.4.0
|
||||
pip install pyperclip==1.8.2
|
||||
pip install PyQt5==5.15.11
|
||||
pip install requests==2.32.3
|
||||
pip install yara-python==4.5.1
|
||||
```
|
||||
|
||||
## 檔案資訊
|
||||
|
||||
```
|
||||
PYAS/
|
||||
├── Driver/
|
||||
│ ├── PYAS_Driver.sys -------> 驅動程式 (0sha0 為 pyas 提供的自我保護驅動程式)
|
||||
├── Driver/ (驅動防護和微軟運行庫)
|
||||
│ └── ...
|
||||
│
|
||||
├── Model/
|
||||
│ ├── PYAS_Model.json -------> 病毒資料庫 (資料庫必須位於指定目錄)
|
||||
├── Engine/ (深度學習和規則數據庫)
|
||||
│ └── ...
|
||||
│
|
||||
├── Rules/
|
||||
│ ├── Yara_Rules.yar ---------> Yara 規則 (純文字格式的 yara 規則)
|
||||
│ ├── Yara_Rules.yrc ---------> 編譯規則 (編譯格式的 yara 規則)
|
||||
├── Exten/ (擴展功能與系統修復工具)
|
||||
│ └── ...
|
||||
│
|
||||
├── PYAS.py ---------------------> PYAS主程式(包含動畫、掃描、保護等功能...)
|
||||
├── PYAS_Engine.py -------------> 轉換資料庫(用於轉換剖面圖和預報資料)
|
||||
├── PYAS_Suffixes.py -----------> 文件後綴(包含掃描文件後綴和常用後綴)
|
||||
├── PYAS_Interface.py ----------> PyQt5介面(使用QT設計器,需與主程式搭配使用)
|
||||
├── PYAS_Resource.py -----------> PyQt5資源(狀態圖片、圖示包、按鈕圖示...)
|
||||
├── PYAS_Language.py -----------> 翻譯字典(繁體中文、簡體中文、英文)
|
||||
├── PYAS_Version.py ------------> 安裝資訊(檔案資訊、版本資訊、原名...)
|
||||
├── PYAS.py (PYAS主程序含介面交互與防護功能)
|
||||
├── PYAS_Engine.py (深度學習預測和規則掃描器)
|
||||
├── PYAS_Suffixes.py (獲取掃描或事件檔案的副檔名)
|
||||
├── PYAS_Interface.py (搭配主程序的Qt設計介面)
|
||||
├── PYAS_Resource.py (狀態圖片圖標和按鈕圖片)
|
||||
├── PYAS_Language.py (繁體中文和簡體中文和英文翻譯)
|
||||
├── PYAS_Version.py (檔案版本和訊息名稱和打包檔名)
|
||||
└── ...
|
||||
```
|
||||
|
||||
@@ -70,6 +65,6 @@ Windows 8.1, 10, 11 (64-bit),記憶體 500MB, 磁碟容量 200MB 或更高
|
||||
|
||||
## 特別感謝
|
||||
|
||||
Wix, 0sha0, mtkiao129, AV-T Team of LisectGroup
|
||||
Wix, mtkiao129, 0sha0, AV-T Team of LisectGroup
|
||||
|
||||
Copyright© 2020~2024 PYAS Security By 87owo
|
||||
Copyright© 2020~2025 PYAS Security By 87owo
|
||||
Reference in new issue
Block a user