Code Monkey home page Code Monkey logo

Comments (9)

tongyifan avatar tongyifan commented on July 28, 2024

http://demo.nexusphp.cn/staffbox.php?action=viewpm&pmid=1

from nexusphp.

Rhilip avatar Rhilip commented on July 28, 2024

(玩家3和玩家5已经完成注入测试了🤣🤣🤣🤣

from nexusphp.

Rhilip avatar Rhilip commented on July 28, 2024

其实改成 filter_input(INPUT_GET, xxx, FILTER_VALIDATE_INT, ['options' => ['default' => 0]]) 会好些,不过还是建议上STMT哦

from nexusphp.

xiaomlove avatar xiaomlove commented on July 28, 2024

楼上两位会玩,我忽略了 "0 +" 其实是在做类型转换。 @tongyifan 发送者不是本人这个问题是怎么弄出来的?

from nexusphp.

xiaomlove avatar xiaomlove commented on July 28, 2024

其实改成 filter_input(INPUT_GET, xxx, FILTER_VALIDATE_INT, ['options' => ['default' => 0]]) 会好些,不过还是建议上STMT哦

这个没法上吧,都是大量的拼好的 sql 语句

from nexusphp.

Rhilip avatar Rhilip commented on July 28, 2024

楼上两位会玩,我忽略了 "0 +" 其实是在做类型转换。 @tongyifan 发送者不是本人这个问题是怎么弄出来的?

你把 0+$_GET[] 改了,就留下注入漏洞了。
然后就可以拿到数据库users表的passhash字段,顺利登录你的账号了呗

image

其实改成 filter_input(INPUT_GET, xxx, FILTER_VALIDATE_INT, ['options' => ['default' => 0]]) 会好些,不过还是建议上STMT哦

这个没法上吧,都是大量的拼好的 sql 语句

OurBits这边,数据库这边90%以上语句都是STMT预处理了。

from nexusphp.

xiaomlove avatar xiaomlove commented on July 28, 2024

楼上两位会玩,我忽略了 "0 +" 其实是在做类型转换。 @tongyifan 发送者不是本人这个问题是怎么弄出来的?

你把 0+$_GET[] 改了,就留下注入漏洞了。

然后就可以拿到数据库users表的passhash字段,顺利登录你的账号了呗

image

其实改成 filter_input(INPUT_GET, xxx, FILTER_VALIDATE_INT, ['options' => ['default' => 0]]) 会好些,不过还是建议上STMT哦

这个没法上吧,都是大量的拼好的 sql 语句

OurBits这边,数据库这边90%以上语句都是STMT预处理了。

还是不太懂。
1,通过哪个URL什么请求参数得到passhash。
2,这个字段单向加密得到,没什么用吧。登录需要原始密码啊。请大佬指点。

from nexusphp.

Rhilip avatar Rhilip commented on July 28, 2024
  1. 请看你commit history,反正你修改过的地方都有可能有注入风险,我和杯具只利用了其中某一个。
  2. 对NPHP,只要有passhash和id对应,就可以改cookies变id了。请阅读 user_login() 签名方法以及 takelogin.php 实现。这也是部分站点修改cookie的原因。

不再回答了。

from nexusphp.

xiaomlove avatar xiaomlove commented on July 28, 2024

感谢 @tongyifan @Rhilip
在保证不报错误的前提下,使用 intval() 恢复了原来 0+ 的强制类型转换。
本人对 NP 不了解,不知道有了 passhash 可以随意伪造用户 ID 的事,经实践确实是可以的。
但不恢复强制类型转换时哪些地方可能造成 passhash 泄露,还是不太清楚。现修改后不会再泄露了吧🤣

from nexusphp.

Related Issues (20)

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.