ukipoi
V2EX  ›  问与答

做安全测试的时候,对一些 System.out.println 的地方检测出了 XSS 漏洞,请问这个漏洞是怎么造成的?

  •  
  •   ukipoi · Dec 12, 2019 · 2214 views
    This topic created in 2347 days ago, the information mentioned may be changed or developed.

    系统打印的文字,可能会让程序继续执行吗?
    还有对 readline 检测出未经验证的输入,我要对读取文件得到的结果做什么样的验证呢?
    对特殊字符么,还是其他的什么?
    有点一头雾水,领导让我写整改方案,但是我都不知道为什么欸

    4 replies    2019-12-12 16:29:07 +08:00
    ihacku
        1
    ihacku  
       Dec 12, 2019 via iPhone
    如果白盒扫出来的 误报可能性其实蛮高的
    你可以试下这个 https://github.com/momosecurity/rhizobia_J
    mythhack
        2
    mythhack  
       Dec 12, 2019
    没过滤输入输出。
    ukipoi
        3
    ukipoi  
    OP
       Dec 12, 2019
    @mythhack
    关键我不知道我要过滤什么字符啊,代码里是 readline 读文件,我甚至不知道它读的什么文件
    mythhack
        4
    mythhack  
       Dec 12, 2019
    @ukipoi 直接做转义或者编码吧,在输入和输出的位置
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3019 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 05:34 · PVG 13:34 · LAX 22:34 · JFK 01:34
    ♥ Do have faith in what you're doing.