hacktricks/network-services-pentesting/pentesting-web
2024-11-05 18:08:12 +00:00
..
buckets Translated ['generic-methodologies-and-resources/basic-forensic-methodol 2024-07-19 10:17:18 +00:00
drupal Translated ['binary-exploitation/libc-heap/README.md', 'binary-exploitat 2024-09-23 23:36:16 +00:00
electron-desktop-apps Translated ['binary-exploitation/libc-heap/README.md', 'binary-exploitat 2024-09-19 16:40:33 +00:00
php-tricks-esp Translated ['network-services-pentesting/pentesting-web/php-tricks-esp/R 2024-09-05 18:59:40 +00:00
tomcat Translated ['README.md', 'crypto-and-stego/hash-length-extension-attack. 2024-09-04 13:35:19 +00:00
403-and-401-bypasses.md Translated ['network-services-pentesting/512-pentesting-rexec.md', 'netw 2024-08-04 15:19:02 +00:00
aem-adobe-experience-cloud.md Translated ['generic-methodologies-and-resources/basic-forensic-methodol 2024-07-19 10:17:18 +00:00
angular.md Translated to Swahili 2024-02-11 02:13:58 +00:00
apache.md Translated ['network-services-pentesting/pentesting-web/apache.md', 'pen 2024-08-19 11:11:37 +00:00
artifactory-hacking-guide.md Translated ['generic-methodologies-and-resources/basic-forensic-methodol 2024-07-19 10:17:18 +00:00
bolt-cms.md Translated ['macos-hardening/macos-security-and-privilege-escalation/mac 2024-07-19 11:40:17 +00:00
cgi.md Translated ['generic-methodologies-and-resources/basic-forensic-methodol 2024-07-19 10:17:18 +00:00
code-review-tools.md Translated ['network-services-pentesting/pentesting-web/code-review-tool 2024-09-27 11:28:12 +00:00
dotnetnuke-dnn.md Translated ['crypto-and-stego/cryptographic-algorithms/unpacking-binarie 2024-07-19 04:50:00 +00:00
drupal.md Translated ['README.md', 'binary-exploitation/arbitrary-write-2-exec/aw2 2024-05-05 22:47:30 +00:00
flask.md Translated ['macos-hardening/macos-security-and-privilege-escalation/mac 2024-07-19 11:40:17 +00:00
git.md Translated ['generic-methodologies-and-resources/basic-forensic-methodol 2024-07-19 10:17:18 +00:00
golang.md Translated ['generic-methodologies-and-resources/basic-forensic-methodol 2024-07-19 10:17:18 +00:00
grafana.md Translated ['generic-methodologies-and-resources/basic-forensic-methodol 2024-07-19 10:17:18 +00:00
graphql.md Translated ['macos-hardening/macos-security-and-privilege-escalation/mac 2024-07-19 11:40:17 +00:00
gwt-google-web-toolkit.md Translated to Swahili 2024-02-11 02:13:58 +00:00
h2-java-sql-database.md Translated ['macos-hardening/macos-security-and-privilege-escalation/mac 2024-07-19 11:40:17 +00:00
iis-internet-information-services.md Translated ['README.md', 'crypto-and-stego/hash-length-extension-attack. 2024-09-04 13:35:19 +00:00
imagemagick-security.md Translated ['generic-methodologies-and-resources/basic-forensic-methodol 2024-07-19 10:17:18 +00:00
jboss.md Translated ['macos-hardening/macos-security-and-privilege-escalation/mac 2024-07-19 11:40:17 +00:00
jira.md Translated ['binary-exploitation/libc-heap/README.md', 'binary-exploitat 2024-09-23 23:36:16 +00:00
joomla.md Translated ['network-services-pentesting/pentesting-web/drupal/README.md 2024-08-21 09:10:02 +00:00
jsp.md Translated ['macos-hardening/macos-security-and-privilege-escalation/mac 2024-07-19 11:40:17 +00:00
laravel.md Translated ['binary-exploitation/basic-stack-binary-exploitation-methodo 2024-07-18 22:14:33 +00:00
moodle.md Translated ['macos-hardening/macos-security-and-privilege-escalation/mac 2024-07-19 11:40:17 +00:00
nextjs.md Translated ['network-services-pentesting/pentesting-web/nextjs.md', 'pen 2024-08-18 15:54:28 +00:00
nginx.md Translated ['network-services-pentesting/512-pentesting-rexec.md', 'netw 2024-08-04 15:19:02 +00:00
nodejs-express.md Translated to Swahili 2024-02-11 02:13:58 +00:00
prestashop.md Translated ['network-services-pentesting/pentesting-web/drupal/README.md 2024-08-21 09:10:02 +00:00
put-method-webdav.md Translated ['macos-hardening/macos-security-and-privilege-escalation/mac 2024-07-19 11:40:17 +00:00
python.md Translated ['generic-methodologies-and-resources/basic-forensic-methodol 2024-07-19 10:17:18 +00:00
README.md Translated ['binary-exploitation/libc-heap/README.md', 'binary-exploitat 2024-09-23 23:36:16 +00:00
rocket-chat.md Translated ['generic-methodologies-and-resources/pentesting-methodology. 2024-08-31 16:27:47 +00:00
special-http-headers.md Translated ['macos-hardening/macos-security-and-privilege-escalation/mac 2024-07-19 11:40:17 +00:00
spring-actuators.md Translated ['macos-hardening/macos-security-and-privilege-escalation/mac 2024-07-19 11:40:17 +00:00
symphony.md Translated ['generic-methodologies-and-resources/basic-forensic-methodol 2024-07-19 10:17:18 +00:00
tomcat.md Translated ['README.md', 'crypto-and-stego/hash-length-extension-attack. 2024-09-04 13:35:19 +00:00
uncovering-cloudflare.md Translated ['macos-hardening/macos-security-and-privilege-escalation/mac 2024-07-19 11:40:17 +00:00
vmware-esx-vcenter....md Translated ['generic-methodologies-and-resources/basic-forensic-methodol 2024-07-19 10:17:18 +00:00
waf-bypass.md Translated to Swahili 2024-02-11 02:13:58 +00:00
web-api-pentesting.md Translated ['mobile-pentesting/android-app-pentesting/apk-decompilers.md 2024-11-05 18:08:12 +00:00
werkzeug.md Translated ['network-services-pentesting/512-pentesting-rexec.md', 'netw 2024-08-04 15:19:02 +00:00
wordpress.md Translated ['network-services-pentesting/pentesting-web/drupal/README.md 2024-08-21 09:10:02 +00:00

80,443 - Pentesting Web Methodology

{% hint style="success" %} Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
Learn & practice GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)

Support HackTricks
{% endhint %}

If you are interested in hacking career and hack the unhackable - we are hiring! (fluent polish written and spoken required).

{% embed url="https://www.stmcyber.com/careers" %}

Basic Info

Huduma ya wavuti ni huduma ya kawaida na pana zaidi na aina nyingi za udhaifu zipo.

Default port: 80 (HTTP), 443(HTTPS)

PORT    STATE SERVICE
80/tcp  open  http
443/tcp open  ssl/https
nc -v domain.com 80 # GET / HTTP/1.0
openssl s_client -connect domain.com:443 # GET / HTTP/1.0

Mwongozo wa Web API

{% content-ref url="web-api-pentesting.md" %} web-api-pentesting.md {% endcontent-ref %}

Muhtasari wa Mbinu

Katika mbinu hii tutadhani kwamba unataka kushambulia kikoa (au subdomain) na tu hicho. Hivyo, unapaswa kutumia mbinu hii kwa kila kikoa, subdomain au IP iliyogunduliwa yenye seva ya wavuti isiyojulikana ndani ya upeo.

  • Anza kwa kutambua teknolojia zinazotumiwa na seva ya wavuti. Tafuta hila za kukumbuka wakati wa mtihani mzima ikiwa utaweza kutambua teknolojia hiyo kwa mafanikio.
  • Je, kuna udhaifu unaojulikana wa toleo la teknolojia hiyo?
  • Unatumia teknolojia inayojulikana? Je, kuna hila muhimu za kupata taarifa zaidi?
  • Je, kuna scanner maalum ya kukimbia (kama wpscan)?
  • Anzisha scanners za matumizi ya jumla. Hujui kama wataweza kupata kitu au kama wataweza kupata taarifa za kuvutia.
  • Anza na ukaguzi wa awali: robots, sitemap, 404 kosa na SSL/TLS skani (ikiwa HTTPS).
  • Anza kupeleleza ukurasa wa wavuti: Ni wakati wa kupata faili, folda na parameta zote zinazotumika. Pia, angalia kwa matokeo maalum.
  • Kumbuka kwamba kila wakati directory mpya inagunduliwa wakati wa brute-forcing au kupeleleza, inapaswa kupelelezwa.
  • Brute-Forcing ya Directory: Jaribu kujaribu nguvu zote za folda zilizogunduliwa kutafuta faili na directories mpya.
  • Kumbuka kwamba kila wakati directory mpya inagunduliwa wakati wa brute-forcing au kupeleleza, inapaswa kujaribiwa kwa nguvu.
  • Ukaguzi wa Nakala: Jaribu kuona kama unaweza kupata nakala za faili zilizogunduliwa ukiongeza nyongeza za kawaida za nakala.
  • Brute-Force parameta: Jaribu kupata parameta zilizofichwa.
  • Mara tu unapokuwa umeshawishi kila mwisho unaokubali ingizo la mtumiaji, angalia kwa kila aina ya udhaifu unaohusiana nayo.
  • Fuata orodha hii ya ukaguzi

Toleo la Seva (Lina Udhihirisho?)

Tambua

Angalia kama kuna udhaifu unaojulikana kwa toleo la seva inayotumika.
Vichwa vya HTTP na vidakuzi vya jibu vinaweza kuwa na manufaa sana katika kutambua teknolojia na/au toleo linalotumika. Nmap skani inaweza kutambua toleo la seva, lakini pia inaweza kuwa na manufaa kutumia zana whatweb, webtech au https://builtwith.com/:

whatweb -a 1 <URL> #Stealthy
whatweb -a 3 <URL> #Aggresive
webtech -u <URL>
webanalyze -host https://google.com -crawl 2

Search for vulnerabilities of the web application version

Check if any WAF

Web tech tricks

Baadhi ya tricks za finding vulnerabilities katika technologies tofauti maarufu zinazotumika:

Kumbuka kwamba domain hiyo hiyo inaweza kuwa ikitumia technologies tofauti katika ports, folders na subdomains.
Ikiwa programu ya wavuti inatumia tech/platform maarufu zilizoorodheshwa hapo awali au zingine yoyote, usisahau kutafuta kwenye Mtandao tricks mpya (na unijulishe!).

Source Code Review

Ikiwa source code ya programu inapatikana katika github, mbali na kufanya White box test ya programu kwa yako mwenyewe, kuna maelezo ambayo yanaweza kuwa muhimu kwa Black-Box testing ya sasa:

  • Je, kuna Change-log au Readme au Version file au chochote chenye version info accessible kupitia wavuti?
  • Je, credentials zimehifadhiwaje na wapi? Je, kuna file (inaweza kufikiwa?) yenye credentials (majina ya watumiaji au nywila)?
  • Je, passwords ziko katika plain text, encrypted au ni hashing algorithm gani inatumika?
  • Je, inatumia master key yoyote kwa ajili ya kuandika kitu? Ni algorithm gani inatumika?
  • Je, unaweza kufikia yoyote ya hizi files kwa kutumia udhaifu wowote?
  • Je, kuna maelezo ya kuvutia katika github (masuala yaliyotatuliwa na yasiyotatuliwa)? Au katika commit history (labda password iliyoingizwa ndani ya commit ya zamani)?

{% content-ref url="code-review-tools.md" %} code-review-tools.md {% endcontent-ref %}

Automatic scanners

General purpose automatic scanners

nikto -h <URL>
whatweb -a 4 <URL>
wapiti -u <URL>
W3af
zaproxy #You can use an API
nuclei -ut && nuclei -target <URL>

# https://github.com/ignis-sec/puff (client side vulns fuzzer)
node puff.js -w ./wordlist-examples/xss.txt -u "http://www.xssgame.com/f/m4KKGHi2rVUN/?query=FUZZ"

CMS scanners

Ikiwa CMS inatumika usisahau kufanya skana, labda kitu cha kuvutia kitatokea:

Clusterd: JBoss, ColdFusion, WebLogic, Tomcat, Railo, Axis2, Glassfish
CMSScan: WordPress, Drupal, Joomla, vBulletin tovuti za masuala ya Usalama. (GUI)
VulnX: Joomla, Wordpress, Drupal, PrestaShop, Opencart
CMSMap: (W)ordpress, (J)oomla, (D)rupal au (M)oodle
droopscan: Drupal, Joomla, Moodle, Silverstripe, Wordpress

cmsmap [-f W] -F -d <URL>
wpscan --force update -e --url <URL>
joomscan --ec -u <URL>
joomlavs.rb #https://github.com/rastating/joomlavs

Katika hatua hii unapaswa kuwa na taarifa fulani kuhusu seva ya wavuti inayotumiwa na mteja (ikiwa kuna data yoyote iliyotolewa) na mbinu fulani za kukumbuka wakati wa mtihani. Ikiwa una bahati umepata hata CMS na ukafanya skana.

Hatua kwa hatua Ugunduzi wa Programu za Wavuti

Kutoka hapa tutaanza kuingiliana na programu ya wavuti.

Ukaguzi wa Awali

Kurasa za Kawaida zenye taarifa za kuvutia:

  • /robots.txt
  • /sitemap.xml
  • /crossdomain.xml
  • /clientaccesspolicy.xml
  • /.well-known/
  • Angalia pia maoni katika kurasa kuu na za sekondari.

Kusababisha makosa

Seva za wavuti zinaweza kufanya kazi kwa njia isiyo ya kawaida wakati data za ajabu zinatumwa kwao. Hii inaweza kufungua vulnerabilities au kuonyesha taarifa nyeti.

  • Fikia kurasa za uongo kama /whatever_fake.php (.aspx,.html,.n.k)
  • Ongeza "[]", "]]", na "[[" katika maadili ya cookie na maadili ya parameter ili kuunda makosa
  • Tengeneza kosa kwa kutoa ingizo kama /~randomthing/%s kwenye mwisho wa URL
  • Jaribu HTTP Verbs tofauti kama PATCH, DEBUG au makosa kama FAKE

Angalia kama unaweza kupakia faili (PUT verb, WebDav)

Ikiwa unapata kuwa WebDav ime wezeshwa lakini huna ruhusa ya kutosha kwa kupakia faili kwenye folda ya mzizi jaribu:

  • Brute Force akreditif
  • Pakia faili kupitia WebDav kwenye sehemu za folda zilizopatikana ndani ya ukurasa wa wavuti. Unaweza kuwa na ruhusa za kupakia faili katika folda nyingine.

Vulnerabilities za SSL/TLS

  • Ikiwa programu haiwalazimishi watumiaji kutumia HTTPS katika sehemu yoyote, basi ni vulnerable to MitM
  • Ikiwa programu inatumia kutuma data nyeti (nywila) kwa kutumia HTTP. Basi ni vulnerability kubwa.

Tumia testssl.sh kuangalia vulnerabilities (Katika programu za Bug Bounty labda aina hizi za vulnerabilities hazitakubaliwa) na tumia a2sv kuangalia tena vulnerabilities:

./testssl.sh [--htmlfile] 10.10.10.10:443
#Use the --htmlfile to save the output inside an htmlfile also

# You can also use other tools, by testssl.sh at this momment is the best one (I think)
sslscan <host:port>
sslyze --regular <ip:port>

Information about SSL/TLS vulnerabilities:

Spidering

Zindua aina ya spider ndani ya wavuti. Lengo la spider ni kupata njia nyingi kadri iwezekanavyo kutoka kwa programu iliyojaribiwa. Hivyo, kuvinjari wavuti na vyanzo vya nje vinapaswa kutumika ili kupata njia halali nyingi kadri iwezekanavyo.

  • gospider (go): HTML spider, LinkFinder katika faili za JS na vyanzo vya nje (Archive.org, CommonCrawl.org, VirusTotal.com, AlienVault.com).
  • hakrawler (go): HML spider, na LinkFider kwa faili za JS na Archive.org kama chanzo cha nje.
  • dirhunt (python): HTML spider, pia inaonyesha "faili za kuvutia".
  • evine (go): Interactive CLI HTML spider. Pia inatafuta katika Archive.org
  • meg (go): Chombo hiki si spider lakini kinaweza kuwa na manufaa. Unaweza tu kuashiria faili yenye mwenyeji na faili yenye njia na meg itachukua kila njia kwenye kila mwenyeji na kuhifadhi jibu.
  • urlgrab (go): HTML spider yenye uwezo wa kuunda JS. Hata hivyo, inaonekana kama haijatunzwa, toleo lililotayarishwa ni la zamani na msimbo wa sasa haujajitengeneza.
  • gau (go): HTML spider inayotumia watoa huduma wa nje (wayback, otx, commoncrawl)
  • ParamSpider: Hii ni script itakayopata URLs zenye parameta na kuziorodhesha.
  • galer (go): HTML spider yenye uwezo wa kuunda JS.
  • LinkFinder (python): HTML spider, yenye uwezo wa kuboresha JS inayoweza kutafuta njia mpya katika faili za JS. Inaweza kuwa na manufaa pia kuangalia JSScanner, ambayo ni wrapper ya LinkFinder.
  • goLinkFinder (go): Kutolewa kwa mwisho katika chanzo cha HTML na faili za javascript zilizojumuishwa. Inafaida kwa wawindaji wa makosa, timu nyekundu, na ninjas wa infosec.
  • JSParser (python2.7): Script ya python 2.7 inayotumia Tornado na JSBeautifier kuchambua URLs zinazohusiana kutoka kwa faili za JavaScript. Inafaida kwa kugundua maombi ya AJAX kwa urahisi. Inaonekana kama haijatunzwa.
  • relative-url-extractor (ruby): Iwapo kuna faili (HTML) itatoa URLs kutoka kwake kwa kutumia kanuni nzuri za kawaida ili kupata na kutoa URLs zinazohusiana kutoka kwa faili mbaya (minify).
  • JSFScan (bash, zana kadhaa): Kusanya habari za kuvutia kutoka kwa faili za JS kwa kutumia zana kadhaa.
  • subjs (go): Pata faili za JS.
  • page-fetch (go): Pakia ukurasa katika kivinjari kisichokuwa na kichwa na uchapishe URLs zote zilizopakiwa ili kupakia ukurasa.
  • Feroxbuster (rust): Chombo cha kugundua maudhui kinachochanganya chaguzi kadhaa za zana zilizotangulia.
  • Javascript Parsing: Kiendelezi cha Burp kutafuta njia na parameta katika faili za JS.
  • Sourcemapper: Chombo ambacho kwa URL ya .js.map kitakuletea msimbo wa JS ulioimarishwa.
  • xnLinkFinder: Hii ni chombo kinachotumika kugundua mwisho kwa lengo fulani.
  • waymore: Gundua viungo kutoka kwa mashine ya wayback (pia kupakua majibu katika wayback na kutafuta viungo zaidi).
  • HTTPLoot (go): Vinjari (hata kwa kujaza fomu) na pia pata habari nyeti kwa kutumia regex maalum.
  • SpiderSuite: Spider Suite ni GUI ya hali ya juu ya usalama wa wavuti Crawler/Spider iliyoundwa kwa wataalamu wa usalama wa mtandao.
  • jsluice (go): Ni pakiti ya Go na chombo cha amri kwa kutolewa kwa URLs, njia, siri, na data nyingine za kuvutia kutoka kwa msimbo wa chanzo wa JavaScript.
  • ParaForge: ParaForge ni kiendelezi rahisi cha Burp Suite ili kutolewa kwa parameta na mwisho kutoka kwa ombi ili kuunda orodha maalum ya maneno kwa fuzzing na orodha.
  • katana (go): Chombo bora kwa hili.
  • Crawley (go): Chapisha kila kiungo kinachoweza kupatikana.

Brute Force directories and files

Anza brute-forcing kutoka kwenye folda ya mzizi na uhakikishe unafanya brute-force zote za directories zilizopatikana kwa kutumia hii mbinu na zote za directories zilizogunduliwa na Spidering (unaweza kufanya brute-forcing hii kikamilifu na kuongeza mwanzoni mwa orodha ya maneno iliyotumika majina ya directories zilizopatikana).
Zana:

  • Dirb / Dirbuster - Imejumuishwa katika Kali, ya zamani (na polepole) lakini inafanya kazi. Inaruhusu vyeti vilivyojitiisha kiotomatiki na utafutaji wa kurudiwa. Polepole sana ikilinganishwa na chaguzi nyingine.
  • Dirsearch (python): Haipati vyeti vilivyojitiisha kiotomatiki lakini inaruhusu utafutaji wa kurudiwa.
  • Gobuster (go): Inaruhusu vyeti vilivyojitiisha kiotomatiki, haina utaftaji wa kurudiwa.
  • Feroxbuster - Haraka, inasaidia utafutaji wa kurudiwa.
  • wfuzz wfuzz -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt https://domain.com/api/FUZZ
  • ffuf - Haraka: ffuf -c -w /usr/share/wordlists/dirb/big.txt -u http://10.10.10.10/FUZZ
  • uro (python): Hii si spider lakini ni chombo ambacho kwa orodha ya URLs zilizopatikana kitafuta "URLs zilizojirudia".
  • Scavenger: Kiendelezi cha Burp kuunda orodha ya directories kutoka kwa historia ya burp ya kurasa tofauti.
  • TrashCompactor: Ondoa URLs zenye kazi zilizojirudia (kulingana na uagizaji wa js).
  • Chamaleon: Inatumia wapalyzer kugundua teknolojia zinazotumika na kuchagua orodha za maneno za kutumia.

Recommended dictionaries:

Kumbuka kwamba kila wakati directory mpya inapatikana wakati wa brute-forcing au spidering, inapaswa kufanywa Brute-Forced.

What to check on each file found

  • Broken link checker: Pata viungo vilivyovunjika ndani ya HTMLs ambavyo vinaweza kuwa na hatari ya kuchukuliwa.
  • File Backups: Mara tu unapopata faili zote, angalia nakala za faili zote zinazoweza kutekelezwa (".php", ".aspx"...). Mabadiliko ya kawaida ya kutaja nakala ni: file.ext~, #file.ext#, ~file.ext, file.ext.bak, file.ext.tmp, file.ext.old, file.bak, file.tmp na file.old. Unaweza pia kutumia chombo bfac au backup-gen.
  • Discover new parameters: Unaweza kutumia zana kama Arjun, parameth, x8 na Param Miner kugundua parameta zilizofichwa. Ikiwa unaweza, unaweza kujaribu kutafuta parameta zilizofichwa kwenye kila faili ya wavuti inayoweza kutekelezwa.
  • Arjun orodha zote za maneno za kawaida: https://github.com/s0md3v/Arjun/tree/master/arjun/db
  • Param-miner “params” : https://github.com/PortSwigger/param-miner/blob/master/resources/params
  • Assetnote “parameters_top_1m”: https://wordlists.assetnote.io/
  • nullenc0de “params.txt”: https://gist.github.com/nullenc0de/9cb36260207924f8e1787279a05eb773
  • Comments: Angalia maoni ya faili zote, unaweza kupata credentials au ufunctionality iliyofichwa.
  • Ikiwa unacheza CTF, hila "ya kawaida" ni kuficha habari ndani ya maoni upande wa kulia wa ukurasa (ukitumia mifumo ya maelfu ili usione data ikiwa unafungua msimbo wa chanzo na kivinjari). Uwezekano mwingine ni kutumia michoro kadhaa mipya na kuficha habari katika maoni kwenye chini ya ukurasa wa wavuti.
  • API keys: Ikiwa unapata funguo zozote za API kuna mwongozo unaoelekeza jinsi ya kutumia funguo za API za majukwaa tofauti: keyhacks, zile, truffleHog, SecretFinder, RegHex, DumpsterDive, EarlyBird
  • Google API keys: Ikiwa unapata funguo zozote za API zinazoonekana kama AIzaSyA-qLheq6xjDiEIRisP_ujUseYLQCHUjik unaweza kutumia mradi gmapapiscanner kuangalia ni APIs zipi funguo hiyo inaweza kufikia.
  • S3 Buckets: Wakati wa spidering angalia ikiwa subdomain au kiungo chochote kinahusiana na S3 bucket. Katika kesi hiyo, angalia idhini ya ndoo.

Special findings

Wakati wa kufanya spidering na brute-forcing unaweza kupata mambo ya kuvutia ambayo unapaswa kuangazia.

Interesting files

403 Forbidden/Basic Authentication/401 Unauthorized (bypass)

{% content-ref url="403-and-401-bypasses.md" %} 403-and-401-bypasses.md {% endcontent-ref %}

502 Proxy Error

Ikiwa ukurasa wowote unajibu na hiyo nambari, labda ni proxy iliyo na makosa. Ikiwa unatumia ombi la HTTP kama: GET https://google.com HTTP/1.1 (pamoja na kichwa cha mwenyeji na vichwa vingine vya kawaida), proxy itajaribu kufikia google.com na utakuwa umepata SSRF.

NTLM Authentication - Info disclosure

Ikiwa seva inayotumika inahitaji uthibitisho ni Windows au unapata kuingia inayoomba credentials zako (na kuomba jina la domain), unaweza kusababisha ufichuzi wa habari.
Tuma kichwa: “Authorization: NTLM TlRMTVNTUAABAAAAB4IIAAAAAAAAAAAAAAAAAAAAAAA=” na kutokana na jinsi uthibitisho wa NTLM unavyofanya kazi, seva itajibu kwa habari za ndani (toleo la IIS, toleo la Windows...) ndani ya kichwa "WWW-Authenticate".
Unaweza kujiandaa hii kwa kutumia nmap plugin "http-ntlm-info.nse".

HTTP Redirect (CTF)

Inawezekana kweka maudhui ndani ya Redirection. Maudhui haya hayataonyeshwa kwa mtumiaji (kama kivinjari kitatekeleza uelekeo) lakini kitu kinaweza kuwa kimefichwa huko.

Web Vulnerabilities Checking

Sasa kwamba orodha kamili ya programu ya wavuti imefanywa ni wakati wa kuangalia uwezekano wa udhaifu mwingi. Unaweza kupata orodha ya ukaguzi hapa:

{% content-ref url="../../pentesting-web/web-vulnerabilities-methodology.md" %} web-vulnerabilities-methodology.md {% endcontent-ref %}

Pata maelezo zaidi kuhusu udhaifu wa wavuti katika:

Monitor Pages for changes

Unaweza kutumia zana kama https://github.com/dgtlmoon/changedetection.io kufuatilia kurasa kwa mabadiliko ambayo yanaweza kuingiza udhaifu.

Ikiwa unavutiwa na kazi ya hacking na kujaribu kuvunja yasiyoweza kuvunjika - tunaajiri! (kuandika na kuzungumza kwa kiswahili vizuri kunahitajika).

{% embed url="https://www.stmcyber.com/careers" %}

HackTricks Automatic Commands

Protocol_Name: Web    #Protocol Abbreviation if there is one.
Port_Number:  80,443     #Comma separated if there is more than one.
Protocol_Description: Web         #Protocol Abbreviation Spelled out

Entry_1:
Name: Notes
Description: Notes for Web
Note: |
https://book.hacktricks.xyz/pentesting/pentesting-web

Entry_2:
Name: Quick Web Scan
Description: Nikto and GoBuster
Command: nikto -host {Web_Proto}://{IP}:{Web_Port} &&&& gobuster dir -w {Small_Dirlist} -u {Web_Proto}://{IP}:{Web_Port} && gobuster dir -w {Big_Dirlist} -u {Web_Proto}://{IP}:{Web_Port}

Entry_3:
Name: Nikto
Description: Basic Site Info via Nikto
Command: nikto -host {Web_Proto}://{IP}:{Web_Port}

Entry_4:
Name: WhatWeb
Description: General purpose auto scanner
Command: whatweb -a 4 {IP}

Entry_5:
Name: Directory Brute Force Non-Recursive
Description:  Non-Recursive Directory Brute Force
Command: gobuster dir -w {Big_Dirlist} -u {Web_Proto}://{IP}:{Web_Port}

Entry_6:
Name: Directory Brute Force Recursive
Description: Recursive Directory Brute Force
Command: python3 {Tool_Dir}dirsearch/dirsearch.py -w {Small_Dirlist} -e php,exe,sh,py,html,pl -f -t 20 -u {Web_Proto}://{IP}:{Web_Port} -r 10

Entry_7:
Name: Directory Brute Force CGI
Description: Common Gateway Interface Brute Force
Command: gobuster dir -u {Web_Proto}://{IP}:{Web_Port}/ -w /usr/share/seclists/Discovery/Web-Content/CGIs.txt -s 200

Entry_8:
Name: Nmap Web Vuln Scan
Description: Tailored Nmap Scan for web Vulnerabilities
Command: nmap -vv --reason -Pn -sV -p {Web_Port} --script=`banner,(http* or ssl*) and not (brute or broadcast or dos or external or http-slowloris* or fuzzer)` {IP}

Entry_9:
Name: Drupal
Description: Drupal Enumeration Notes
Note: |
git clone https://github.com/immunIT/drupwn.git for low hanging fruit and git clone https://github.com/droope/droopescan.git for deeper enumeration

Entry_10:
Name: WordPress
Description: WordPress Enumeration with WPScan
Command: |
?What is the location of the wp-login.php? Example: /Yeet/cannon/wp-login.php
wpscan --url {Web_Proto}://{IP}{1} --enumerate ap,at,cb,dbe && wpscan --url {Web_Proto}://{IP}{1} --enumerate u,tt,t,vp --passwords {Big_Passwordlist} -e

Entry_11:
Name: WordPress Hydra Brute Force
Description: Need User (admin is default)
Command: hydra -l admin -P {Big_Passwordlist} {IP} -V http-form-post '/wp-login.php:log=^USER^&pwd=^PASS^&wp-submit=Log In&testcookie=1:S=Location'

Entry_12:
Name: Ffuf Vhost
Description: Simple Scan with Ffuf for discovering additional vhosts
Command: ffuf -w {Subdomain_List}:FUZZ -u {Web_Proto}://{Domain_Name} -H "Host:FUZZ.{Domain_Name}" -c -mc all {Ffuf_Filters}

{% hint style="success" %} Jifunze na fanya mazoezi ya AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
Jifunze na fanya mazoezi ya GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)

Support HackTricks
{% endhint %}