Giter VIP home page Giter VIP logo

mizhexiaoxiao / websiteguide Goto Github PK

View Code? Open in Web Editor NEW
153.0 4.0 65.0 24.29 MB

😃企业内部网址导航系统,基于Python+Django+Vue开发,具有网址导航、网址管理、用户管理等功能

License: MIT License

Python 70.07% Shell 0.61% JavaScript 27.61% HTML 0.31% Dockerfile 1.40%
python3 vue django django-rest-framework docker website websiteguide ops ops-tools ops-admin

websiteguide's Introduction

WebsiteGuide

WebsiteGuide网址导航系统主要用于企业记录和管理内部系统地址,具有网址增删改查、icon图标替换等功能,后续考虑增加rbac和其他功能,欢迎使用和交流~

环境

  • Python 3.6+
  • Django 2.2.13
  • Djangorestframework 3.12.2
  • Node 12.20.1+
  • Vue 2.0

网址导航

image

支持批量添加

image

网址管理

image

用户管理

image

演示地址

导航页 http://demo.mizhexiao.top:8000/

管理后台 http://demo.mizhexiao.top:8000/admin

username:admin

password:admin@1234

快速开始

方法一:dockerhub拉取镜像

docker pull mizhexiaoxiao/websiteguide:latest 
docker run -d --restart=always --name=websiteguide -p 8000:80 mizhexiaoxiao/websiteguide

方法二:dockerfile构建镜像

docker安装(版本17.05+)
yum install -y docker-ce
systemctl start docker
构建镜像
git clone https://github.com/mizhexiaoxiao/WebDockerfile.git
cd WebDockerfile
docker build --no-cache . -t websiteguide
启动容器
docker run -d --restart=always --name=websiteguide -p 8000:80 websiteguide
访问

浏览器打开http://localhost:8000

管理后台http://localhost:8000/admin

username:admin

password:admin@1234

数据备份与恢复

备份

/usr/bin/docker cp 63dd67259f9d:/WebsiteGuide/db.sqlite3 /opt/deploy/bak/db.sqlite3

/usr/bin/docker cp 63dd67259f9d:/WebsiteGuide/websiteapp/media opt/deploy/bak/icon

恢复

/usr/bin/docker cp /opt/deploy/bak/db.sqlite3 63dd67259f9d:/WebsiteGuide/db.sqlite3

/usr/bin/docker cp /opt/deploy/bak/icon 63dd67259f9d:/WebsiteGuide/websiteapp/media

/usr/bin/docker restart 63dd67259f9d

有任何问题请提issue

websiteguide's People

Contributors

mizhexiaoxiao 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

websiteguide's Issues

[Warning] RCE in WebsiteGuide v0.2

Vulnerability Product:WebsiteGuide v0.2
Vulnerability version: 0.2
Vulnerability type: Remote Command Execute
Vulnerability Details:
Vulnerability location: Image Upload

the variable "save_path" in /websiteapp/views.py -> IconViewSet.post method, does not check the name of file user upload ,
causes "../../" such path is available
and does not check binary of the image
causes user could upload image, pycode, html and stuff
image
Insecure image upload could cover the original code , causes Remote Command Execute

payload : https://github.com/Leeyangee/leeya_bug/blob/main/..1..1views.py
the payload is original code at /websiteapp/views.py but add a simple function os.system() to verify rce
(this is just a simple payload , It downloading index.html from http://www.bing.com , in order to verifying the vulnerability)

Firstly , Add a website in "分组管理"
image

After built , visit http://localhost:8000/admin/website
click navigator "网址管理", and click "替换图标"
image
and click "上传图标" choose the payload (or the image you wanna upload in normal situation)
finally click "确定" to upload

in the whole period of uploading , listening network

After upload the payload , you are able to observe the HTTP request that you just uploaded in burpsuite
Send it to the repeater and replace filename ..1..1views.py to ../../views.py
image
image

and finally , click Send , send the payload you had just modified
then you can find that the original code /websiteapp/views.py has changed from
image
to
image
that means you just changed the pycode and could causes RCE vulnerability

just visit the website page to trigger the api /api/icon, you can find the index.html downloaded from http://www.bing.com at the path /websiteapp/
image

proved RCE

by above method, you can upload your file to every file in website or cover every file in website

discovered by leeya_bug

安装的时候提示

Module not found: Error: Can't resolve 'vue-axios' in '/WebsiteGuide/websitefronted/src

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.