Forwarded from 🕸 Articles
سری مقالات رمزنگاری مقدماتی به زبان ساده از محمد حسن پزشکیان
🔸 1 بررسی مفاهیم اولیه رمزنگاری
🔸 2 بررسی Encoding and Encryption
🔸 3 بررسی Hash & HMAC
🔸 4 بررسی Password Storage, Salt & Pepper
🔸 5 رمزنگاری متقارن یا Symmetric Encryption
🔸6 رمزنگاری نامتقارن یا Asymmetric Encryption
🔸7 امضا و گواهینامه دیجیتال
🔸8 رمزنگاری سخت افزاری و خطرات دولت ها
🔸9 ریاضیات و شرح کارکرد الگریتم های نامتقارن
🔸10 رمزنگاری منحنی بیضوی یا Elliptic-Curve
🔸11 بررسی امنیت پروتوکول های شبکه
🔸12 بررسی حملات رمزنگاری
🔸13 مرور و جمع بندی
#crypto
🔸 1 بررسی مفاهیم اولیه رمزنگاری
🔸 2 بررسی Encoding and Encryption
🔸 3 بررسی Hash & HMAC
🔸 4 بررسی Password Storage, Salt & Pepper
🔸 5 رمزنگاری متقارن یا Symmetric Encryption
🔸6 رمزنگاری نامتقارن یا Asymmetric Encryption
🔸7 امضا و گواهینامه دیجیتال
🔸8 رمزنگاری سخت افزاری و خطرات دولت ها
🔸9 ریاضیات و شرح کارکرد الگریتم های نامتقارن
🔸10 رمزنگاری منحنی بیضوی یا Elliptic-Curve
🔸11 بررسی امنیت پروتوکول های شبکه
🔸12 بررسی حملات رمزنگاری
🔸13 مرور و جمع بندی
#crypto
ویرگول
رمزنگاری مقدماتی به زبان ساده : بررسی مفاهیم اولیه رمزنگاری
بررسی مفاهیم رمزنگاری به صورت ساده با ذکر مثال هایی از دنیای واقعی به همراه مثال های عملی متخص متخصصین حوزه امنیت
❤6👍1
The OWASP Top 10 is a community-driven list of the most critical web application security risks. It exists to raise awareness, guide developers and security teams, and serve as a baseline for testing and hardening applications. Organizations use it for threat modeling, training, and setting minimum security requirements; the list is updated periodically to reflect changing attack trends.
#owasp_stories
@hackhive_channel 🐝
#owasp_stories
@hackhive_channel 🐝
❤3
Hack Hive
The OWASP Top 10 is a community-driven list of the most critical web application security risks. It exists to raise awareness, guide developers and security teams, and serve as a baseline for testing and hardening applications. Organizations use it for threat…
The OWASP Top 10 list was updated in 2021 to reflect modern threats. Compared to 2017, some risks changed position, some were renamed, and new categories appeared. Broken Access Control rose to the top, Sensitive Data Exposure evolved into Cryptographic Failures, and Insecure Design, Software and Data Integrity Failures, and SSRF were introduced. This update highlights how web application risks evolve and why organizations must continuously adapt their security practices.
#owasp_stories
@hackhive_channel 🐝
#owasp_stories
@hackhive_channel 🐝
❤5
Hack Hive
The OWASP Top 10 list was updated in 2021 to reflect modern threats. Compared to 2017, some risks changed position, some were renamed, and new categories appeared. Broken Access Control rose to the top, Sensitive Data Exposure evolved into Cryptographic Failures…
#number1:
Broken Access Control
Broken Access Control happens when applications fail to properly enforce who can access what. As a result, users may read or modify data, escalate privileges, or reach hidden resources. It often shows up as IDOR, missing server-side checks, or misconfigured CORS. Preventing it requires strict server-side authorization, deny-by-default policies, and proper validation of ownership and roles.
Main Categories:
Insecure Direct Object References (IDOR)
Sensitive Data Exposure via weak access rules
Authentication & Authorization Issues
Metadata Manipulation (cookies, tokens, JWT)
Misconfiguration (CORS, forced browsing, open redirect)
Functional Level Access Control Issues
For more information:
https://m.youtube.com/watch?v=_jz5qFWhLcg&pp=ygUfI2Jlc3RidWdib3VudHlib29rc2ZvcmJlZ2lubmVycw%3D%3D
#owasp_stories
@hackhive_channel 🐝
Broken Access Control
Broken Access Control happens when applications fail to properly enforce who can access what. As a result, users may read or modify data, escalate privileges, or reach hidden resources. It often shows up as IDOR, missing server-side checks, or misconfigured CORS. Preventing it requires strict server-side authorization, deny-by-default policies, and proper validation of ownership and roles.
Main Categories:
Insecure Direct Object References (IDOR)
Sensitive Data Exposure via weak access rules
Authentication & Authorization Issues
Metadata Manipulation (cookies, tokens, JWT)
Misconfiguration (CORS, forced browsing, open redirect)
Functional Level Access Control Issues
For more information:
https://m.youtube.com/watch?v=_jz5qFWhLcg&pp=ygUfI2Jlc3RidWdib3VudHlib29rc2ZvcmJlZ2lubmVycw%3D%3D
#owasp_stories
@hackhive_channel 🐝
🔥4⚡1❤1👍1
Hack Hive
#number1: Broken Access Control Broken Access Control happens when applications fail to properly enforce who can access what. As a result, users may read or modify data, escalate privileges, or reach hidden resources. It often shows up as IDOR, missing server…
idor (3).pdf
1.4 MB
#number1_1:
IDOR(Insecure Direct Object References)
For practice:
Easy level=
https://github.com/Laburity/vulnerable-IDOR-lab?utm_source=chatgpt.com
Medium level =
https://portswigger.net/web-security/all-labs#path-traversal
And
https://portswigger.net/web-security/all-labs#access-control-vulnerabilities
And
https://www.hackthebox.com/
And
https://tryhackme.com/challenges
Hard level =
https://pentesterlab.com/exercises/idor-to-shell?utm_source=chatgpt.com
#owasp_series
#idor
@hackhive_channel 🐝
IDOR(Insecure Direct Object References)
For practice:
Easy level=
https://github.com/Laburity/vulnerable-IDOR-lab?utm_source=chatgpt.com
Medium level =
https://portswigger.net/web-security/all-labs#path-traversal
And
https://portswigger.net/web-security/all-labs#access-control-vulnerabilities
And
https://www.hackthebox.com/
And
https://tryhackme.com/challenges
Hard level =
https://pentesterlab.com/exercises/idor-to-shell?utm_source=chatgpt.com
#owasp_series
#idor
@hackhive_channel 🐝
👍6❤3⚡2
Hack Hive
#number1: Broken Access Control Broken Access Control happens when applications fail to properly enforce who can access what. As a result, users may read or modify data, escalate privileges, or reach hidden resources. It often shows up as IDOR, missing server…
Exposure of Sensitive Information.pdf
1.8 MB
#number1_2:
Exposure of sensitive information
For practice:
Essay level=
https://github.com/digininja/DVWA
And
https://tryhackme.com/room/owaspjuiceshop
Medium level=
https://pwning.owasp-juice.shop/companion-guide/latest/part2/sensitive-data-exposure.html
And
https://owasp.org/www-project-webgoat/
And
https://tryhackme.com/room/owasptop10
Hard level=
https://portswigger.net/web-security/information-disclosure
And
https://dev.to/hax/owasp-juice-shop-walkthrough-sensitive-data-exposure-login-amy-fph
And
https://academy.hackthebox.com/academy-lab-relations
#owasp_series
#sensitive_data_exposure
@hackhive_channel 🐝
Exposure of sensitive information
For practice:
Essay level=
https://github.com/digininja/DVWA
And
https://tryhackme.com/room/owaspjuiceshop
Medium level=
https://pwning.owasp-juice.shop/companion-guide/latest/part2/sensitive-data-exposure.html
And
https://owasp.org/www-project-webgoat/
And
https://tryhackme.com/room/owasptop10
Hard level=
https://portswigger.net/web-security/information-disclosure
And
https://dev.to/hax/owasp-juice-shop-walkthrough-sensitive-data-exposure-login-amy-fph
And
https://academy.hackthebox.com/academy-lab-relations
#owasp_series
#sensitive_data_exposure
@hackhive_channel 🐝
❤9⚡1👌1
Forwarded from 🕸 Articles
این کتاب توصیههای ارزشمند و کاربردی از گروهی از هکرهای با تجربه در حوزه باگبانتیه که برای موفقیت تو این عرصه جمعآوری شدن. این راهنماییها از تکنیکهای عمیق تست و استفاده از اتومیشن گرفته تا تمرکز روی نقاط ضعف خاص و مدیریت زمان، بهت کمک میکنه مهارتهات رو تقویت کنی و باگهای با ارزشی پیدا کنی.
❤3
Forwarded from 🕸 Articles
Final Collection of Advice_Persian.pdf
1.3 MB
Hack Hive
#number1: Broken Access Control Broken Access Control happens when applications fail to properly enforce who can access what. As a result, users may read or modify data, escalate privileges, or reach hidden resources. It often shows up as IDOR, missing server…
Authentication & Authorization Issues.pdf
1.3 MB
#number1_3:
Authentication and Authorization issues
For practice:
Easy level =
https://owasp.org/www-project-webgoat/
And https://portswigger.net/web-security/access-control/lab-insecure-direct-object-references
Medium level=
https://owasp.org/www-project-juice-shop/
And https://www.hackthebox.com/machines/access
Hard level=
https://www.hackthebox.com/machines/forest
And https://www.vulnhub.com/entry/kioptrix-level-4,105/
#owasp_series
#authentication_and_authorization_issues
@hackhive_channel 🐝
Authentication and Authorization issues
For practice:
Easy level =
https://owasp.org/www-project-webgoat/
And https://portswigger.net/web-security/access-control/lab-insecure-direct-object-references
Medium level=
https://owasp.org/www-project-juice-shop/
And https://www.hackthebox.com/machines/access
Hard level=
https://www.hackthebox.com/machines/forest
And https://www.vulnhub.com/entry/kioptrix-level-4,105/
#owasp_series
#authentication_and_authorization_issues
@hackhive_channel 🐝
❤5⚡1
Hack Hive
#number1: Broken Access Control Broken Access Control happens when applications fail to properly enforce who can access what. As a result, users may read or modify data, escalate privileges, or reach hidden resources. It often shows up as IDOR, missing server…
Metadata Manipulation.pdf
757.5 KB
#number1_4:
Metadata manipulation
For practice and learning:
easy level=
https://bitcuratorconsortium.org/wp-content/uploads/2022/05/Exiftool-Exercise.pdf
And
https://github.com/frankwxu/digital-forensics-lab
And
https://codehs.com/tutorial/14571
https://www.youtube.com/watch?v=8gL-uCnbLn0
medium level=
https://iritt.medium.com/picoctf-information-forensicschallenge-challenge-walkthrough-0dac21f76105
And
https://dfrws.org/forensic-challenges
And
https://www.cliffsnotes.com/study-notes/21913211
hard level=
https://www.blackhat.com/docs/us-17/wednesday/us-17-Mazurov-Brown-Protecting-Visual-Assets-Digital-Image-Counter-Forensics.pdf
And
https://arxiv.org/abs/2308.04723
And
https://rohit12.medium.com/executed-anti-forensic-lab-using-steganography-e-mail-forensic-and-exif-metadata-techniques-all-d7b1bad61a32
And
https://dfrws.org/forensic-challenges
#owasp_series
#Metadata_manipulation
@hackhive_channel 🐝
Metadata manipulation
For practice and learning:
easy level=
https://bitcuratorconsortium.org/wp-content/uploads/2022/05/Exiftool-Exercise.pdf
And
https://github.com/frankwxu/digital-forensics-lab
And
https://codehs.com/tutorial/14571
https://www.youtube.com/watch?v=8gL-uCnbLn0
medium level=
https://iritt.medium.com/picoctf-information-forensicschallenge-challenge-walkthrough-0dac21f76105
And
https://dfrws.org/forensic-challenges
And
https://www.cliffsnotes.com/study-notes/21913211
hard level=
https://www.blackhat.com/docs/us-17/wednesday/us-17-Mazurov-Brown-Protecting-Visual-Assets-Digital-Image-Counter-Forensics.pdf
And
https://arxiv.org/abs/2308.04723
And
https://rohit12.medium.com/executed-anti-forensic-lab-using-steganography-e-mail-forensic-and-exif-metadata-techniques-all-d7b1bad61a32
And
https://dfrws.org/forensic-challenges
#owasp_series
#Metadata_manipulation
@hackhive_channel 🐝
⚡1😨1
Hack Hive
Metadata Manipulation.pdf
More practise:
https://rohit12.medium.com/executed-anti-forensic-lab-using-steganography-e-mail-forensic-and-exif-metadata-techniques-all-d7b1bad61a32
And
https://portswigger.net/web-security/file-upload
And
https://www.hackthebox.com/machines/meta
And
https://forum.hackthebox.com/t/stego-image-processing-101/1940
And
https://tryhackme.com/room/easysteganography
And
https://www.root-me.org/en/Challenges/Steganography
And
https://tryhackme.com/room/introdigitalforensics
And
https://tryhackme.com/room/linuxfilesystemanalysis
#owasp_series
#Metadata_manipulation
@hackhive_channel 🐝
https://rohit12.medium.com/executed-anti-forensic-lab-using-steganography-e-mail-forensic-and-exif-metadata-techniques-all-d7b1bad61a32
And
https://portswigger.net/web-security/file-upload
And
https://www.hackthebox.com/machines/meta
And
https://forum.hackthebox.com/t/stego-image-processing-101/1940
And
https://tryhackme.com/room/easysteganography
And
https://www.root-me.org/en/Challenges/Steganography
And
https://tryhackme.com/room/introdigitalforensics
And
https://tryhackme.com/room/linuxfilesystemanalysis
#owasp_series
#Metadata_manipulation
@hackhive_channel 🐝
Medium
Executed Anti-Forensic Lab Using Steganography, E-Mail Forensic, and Exif Metadata techniques all of which play crucial roles in…
Greetings, everyone! I’m back with a new article after a long absence. In this write-up, I will attempt to explain everything I know about…
😨1
Forwarded from HuntLearn
🚨 جدیدترین ویدیوی آموزشی HuntLearn منتشر شد!
🔍 موضوع: Linux Keylogger Using LD_PRELOAD — تکنیک ردتیمینگ
👨💻 مدرس: مهندس رضا رنجبر
در این ویدیو یاد میگیرید چطور میشه با استفاده از LD_PRELOAD در لینوکس یک Keylogger پیادهسازی کرد.
این محتوا مخصوص کارشناسان تیم قرمز و تیم آبی و علاقهمندان امنیت سایبریه.
📺 مشاهده کامل ویدیو در یوتیوب HuntLearn:
👉 https://youtu.be/e0q-7k1IBUo
🔍 موضوع: Linux Keylogger Using LD_PRELOAD — تکنیک ردتیمینگ
👨💻 مدرس: مهندس رضا رنجبر
در این ویدیو یاد میگیرید چطور میشه با استفاده از LD_PRELOAD در لینوکس یک Keylogger پیادهسازی کرد.
این محتوا مخصوص کارشناسان تیم قرمز و تیم آبی و علاقهمندان امنیت سایبریه.
📺 مشاهده کامل ویدیو در یوتیوب HuntLearn:
👉 https://youtu.be/e0q-7k1IBUo
Forwarded from PentesterLand Academy - Public
اگه دوس داشتید دنبال کنندگان شما هم جزیی از این چالش باشند میتونید این پست رو به انتشار بزارید❤️🙏🏼
https://www.instagram.com/p/DPQrtnjjUS8/?igsh=MW9zejR5M2t3bGNyaw==
https://www.instagram.com/p/DPQrtnjjUS8/?igsh=MW9zejR5M2t3bGNyaw==
🔥2
Forwarded from HackMeLocal
🕹 مینیچالش روی وردپرس!
همیشه لازم نیست از راه سخت دسترسی بگیریم!
بیشتر حملههایی که صورت میگیره از یک دسترسی ساده شروع میشه که به خاطر یک اشتباه کوچیک اطلاعات اون دسترسی لو رفته. ( شب دارکی شد ... )
برای نشون دادن اهمیت این چالش طراحی شده ( لازم بگم با تغییرات جزئی مثل همین باگ روی یک پلتفرم باگ بانتی گزارش شده که بعد از کشف حتما داخل کانال توضیح میدیم ):
ما بروزترین نسخه وردپرس نصب کردیم، سپس یک WAF سر راه اون قرار دادیم اما در یک اقدامی عجیب بدون حتی یک خطا یک هکر وارد وبسایت ما شد.
⚠️ این حمله تقریبا چند دقیقه بعد از اینکه اولین ویدیو داخل وبسایت آپلود شد صورت گرفت نکته عجیب اینکه ما حتی این ویدیو را در پستهایمان استفاده نکردیم !!
🔗آدرس وبسایت ما:
https://wp1.hackmelocal.com
#BugBounty #Wordpress #Vulnrability #CTF #HackMeLocal #InformationLeak
@HackMeLocal
همیشه لازم نیست از راه سخت دسترسی بگیریم!
بیشتر حملههایی که صورت میگیره از یک دسترسی ساده شروع میشه که به خاطر یک اشتباه کوچیک اطلاعات اون دسترسی لو رفته. ( شب دارکی شد ... )
برای نشون دادن اهمیت این چالش طراحی شده ( لازم بگم با تغییرات جزئی مثل همین باگ روی یک پلتفرم باگ بانتی گزارش شده که بعد از کشف حتما داخل کانال توضیح میدیم ):
ما بروزترین نسخه وردپرس نصب کردیم، سپس یک WAF سر راه اون قرار دادیم اما در یک اقدامی عجیب بدون حتی یک خطا یک هکر وارد وبسایت ما شد.
⚠️ این حمله تقریبا چند دقیقه بعد از اینکه اولین ویدیو داخل وبسایت آپلود شد صورت گرفت نکته عجیب اینکه ما حتی این ویدیو را در پستهایمان استفاده نکردیم !!
🔗آدرس وبسایت ما:
https://wp1.hackmelocal.com
#BugBounty #Wordpress #Vulnrability #CTF #HackMeLocal #InformationLeak
@HackMeLocal
🔥1
Hack Hive
#number1: Broken Access Control Broken Access Control happens when applications fail to properly enforce who can access what. As a result, users may read or modify data, escalate privileges, or reach hidden resources. It often shows up as IDOR, missing server…
Misconfiguration.pdf
933.5 KB
#number1_5:
Misconfiguration
For practice and learning:
easy level =
https://weblabs.popdocs.net/labs/webgoat
And
https://sud-defcon.medium.com/tryhackme-owasp-top-10-2021-v-security-misconfiguration-c40f70a74155
And
https://www.wwt.com/lab/mg05_juicedshop_a05
And
https://tryhackme.com/room/owasptop102021
And
https://portswigger.net/web-security/all-labs
And
https://ctflearn.com/challenge/1/browse
And
https://www.root-me.org/en/Challenges/Web-Server/
medium level =
https://weblabs.popdocs.net/labs/mutillidae-2
And
https://www.101labs.net/comptia-security/lab-92-owasp-a6-security-misconfiguration/
And
https://tryhackme.com/room/owasptop102021
And
https://academy.hackthebox.com/course/preview/abusing-http-misconfigurations
And
https://iammainul.medium.com/hackthebox-previse-walkthrough-49950c75d849
And
https://www.reddit.com/r/securityCTF/comments/1kw0i4q/need_help_with_ssrf_challenge_in_nginx_ssrf/
#Owasp_series
#misconfiguration
@Hackhive_channel🐝
Misconfiguration
For practice and learning:
easy level =
https://weblabs.popdocs.net/labs/webgoat
And
https://sud-defcon.medium.com/tryhackme-owasp-top-10-2021-v-security-misconfiguration-c40f70a74155
And
https://www.wwt.com/lab/mg05_juicedshop_a05
And
https://tryhackme.com/room/owasptop102021
And
https://portswigger.net/web-security/all-labs
And
https://ctflearn.com/challenge/1/browse
And
https://www.root-me.org/en/Challenges/Web-Server/
medium level =
https://weblabs.popdocs.net/labs/mutillidae-2
And
https://www.101labs.net/comptia-security/lab-92-owasp-a6-security-misconfiguration/
And
https://tryhackme.com/room/owasptop102021
And
https://academy.hackthebox.com/course/preview/abusing-http-misconfigurations
And
https://iammainul.medium.com/hackthebox-previse-walkthrough-49950c75d849
And
https://www.reddit.com/r/securityCTF/comments/1kw0i4q/need_help_with_ssrf_challenge_in_nginx_ssrf/
#Owasp_series
#misconfiguration
@Hackhive_channel🐝
❤4
Hack Hive
Misconfiguration.pdf
hard level =
https://www.hackthebox.com/blog/active-directory-misconfigurations
And
https://olivierkonate.medium.com/hackthebox-usage-f9c7e12818cd
And
https://portswigger.net/web-security/all-labs
And
https://portswigger.net/web-security/api-testing/top-10-api-vulnerabilities
And
https://arxiv.org/abs/2107.12566
And
https://4geeks.com/interactive-coding-tutorial/exposed-code-analysis-ctf-lab
And
https://xploitlab.me/labs/ins
#owasp_series
#misconfiguration
@hackhive_channel🐝
https://www.hackthebox.com/blog/active-directory-misconfigurations
And
https://olivierkonate.medium.com/hackthebox-usage-f9c7e12818cd
And
https://portswigger.net/web-security/all-labs
And
https://portswigger.net/web-security/api-testing/top-10-api-vulnerabilities
And
https://arxiv.org/abs/2107.12566
And
https://4geeks.com/interactive-coding-tutorial/exposed-code-analysis-ctf-lab
And
https://xploitlab.me/labs/ins
#owasp_series
#misconfiguration
@hackhive_channel🐝
Hack The Box
5 Active Directory misconfigurations (& how they're exploited)
Audit your AD environment for misconfigurations (and attacks) that can lead to severe consequences when exploited by malicious actors.
❤3
Forwarded from Code Review
Forwarded from Code Review Chat
Solution :
اگر به خط 12 دقت کنین میبینین که یه ریجکس سفت و سخت اعمال شده و میگه اول origin ما حتما باید با email شروع شده باشه و بعدش نقطه باشه و در آخر همexample.com وجود داشته باشه.
عملا هیچ راهی برای دور زدن این ریجکس نیست چون خیلی سفت و سخته.
حالا اصن ریجکس رو دور بزنیم چی میشه ؟
میتونیم از هر Origin که میخوایم به این صفحه یه message ارسال کنیم و چون ورودی ما داخل eval میشینه میتونیم به XSS برسیم تنها کاری که لازمه انجام بدیم اینه که بتونیم از یه Origin دیگه درخواست ارسال کنیم.
خب بریم سراغ دور زدن ریجکس :
معمولا یکی از ریجکس های آسیب پذیر به این شکل هست :
اینجا چون ما نقطه رو داخل ریجکس اسکیپ نکردیم ، معنی "هر کرکتر" میده یعنی همچین ورودی هایی از شرط ریجکس عبور میکنه :
ولی داخل کد خط 12 که نقطه هم اسکیپ شده پس مشکلش کوجیست ؟
مشکل دقیقا همینجاست حالا چرا ؟
وقتی به صورت معمولی ریجکس مینویسیم میتونیم از یه \ برای اسکیپ کرکترهای خاص استفاده کنیم :
این ریجکس کاملا اوکیه و مشکلی نداره.
ولی وقتی داخل string در JavaScript ریجکس خودمون رو تعریف میکنیم ، بک اسلش اول برای اسکیپ کردن کرکتر ها داخل خود JS استفاده میشه و ربطی به Regex نداره.
یعنی وقتی ما به این صورت کد رو مینویسیم :
درواقع JavaScript میاد و اون بک اسلش رو به عنوان اسکیپ کرکتر میبینه و عملیات اسکیپ رو روی string انجام میده و همچین چیزی رو به RegExp پاس میده :
حالا اینجاهم ریجکس میاد و کرکتر ( . ) رو به عنوان یه کرکتر با معنی خاص تفسیر میکنه و باعث آسیب پذیری میشه.
به صورت خلاصه به این شکل دور میخوره :
حالا کافیه یه دامین با این اسم داشته باشیم و از طریق اون یه postMessage ارسال کنیم و ورودی ما داخل Eval میشینه و XSS داریم.
اگر به خط 12 دقت کنین میبینین که یه ریجکس سفت و سخت اعمال شده و میگه اول origin ما حتما باید با email شروع شده باشه و بعدش نقطه باشه و در آخر هم
عملا هیچ راهی برای دور زدن این ریجکس نیست چون خیلی سفت و سخته.
حالا اصن ریجکس رو دور بزنیم چی میشه ؟
میتونیم از هر Origin که میخوایم به این صفحه یه message ارسال کنیم و چون ورودی ما داخل eval میشینه میتونیم به XSS برسیم تنها کاری که لازمه انجام بدیم اینه که بتونیم از یه Origin دیگه درخواست ارسال کنیم.
خب بریم سراغ دور زدن ریجکس :
معمولا یکی از ریجکس های آسیب پذیر به این شکل هست :
^email.example\.com$
اینجا چون ما نقطه رو داخل ریجکس اسکیپ نکردیم ، معنی "هر کرکتر" میده یعنی همچین ورودی هایی از شرط ریجکس عبور میکنه :
email{a}example.com
email{b}example.com
email{any_character}example.comولی داخل کد خط 12 که نقطه هم اسکیپ شده پس مشکلش کوجیست ؟
مشکل دقیقا همینجاست حالا چرا ؟
وقتی به صورت معمولی ریجکس مینویسیم میتونیم از یه \ برای اسکیپ کرکترهای خاص استفاده کنیم :
const re = /^email\.example\.com$/;
re.test('email.example.com'); // true
این ریجکس کاملا اوکیه و مشکلی نداره.
ولی وقتی داخل string در JavaScript ریجکس خودمون رو تعریف میکنیم ، بک اسلش اول برای اسکیپ کردن کرکتر ها داخل خود JS استفاده میشه و ربطی به Regex نداره.
یعنی وقتی ما به این صورت کد رو مینویسیم :
const pattern = "^email\.example\.com$";
const allowedOriginRegex = new RegExp(pattern);
درواقع JavaScript میاد و اون بک اسلش رو به عنوان اسکیپ کرکتر میبینه و عملیات اسکیپ رو روی string انجام میده و همچین چیزی رو به RegExp پاس میده :
RegExp("^email.example\.com$")حالا اینجاهم ریجکس میاد و کرکتر ( . ) رو به عنوان یه کرکتر با معنی خاص تفسیر میکنه و باعث آسیب پذیری میشه.
به صورت خلاصه به این شکل دور میخوره :
emailaexample.com
حالا کافیه یه دامین با این اسم داشته باشیم و از طریق اون یه postMessage ارسال کنیم و ورودی ما داخل Eval میشینه و XSS داریم.
❤2
Hack Hive
#number1: Broken Access Control Broken Access Control happens when applications fail to properly enforce who can access what. As a result, users may read or modify data, escalate privileges, or reach hidden resources. It often shows up as IDOR, missing server…
Functional Level Access Control.pdf
1.2 MB
#number1_6:
Functional Level Access Control
For practice:
easy level=
https://portswigger.net/web-security/access-control/lab-method-based-access-control-can-be-circumvented
and
https://portswigger.net/web-security/access-control/lab-method-based-access-control-can-be-circumvented
and
https://tryhackme.com/room/owaspbrokenaccesscontrol
and
https://tryhackme.com/room/owaspbrokenaccesscontrol
and
https://pwning.owasp-juice.shop/companion-guide/latest/part2/broken-access-control.html
and
https://pwning.owasp-juice.shop/companion-guide/latest/part2/broken-access-control.html
medium level =
https://portswigger.net/web-security/access-control
and
https://portswigger.net/web-security/access-control
and
https://tryhackme.com/room/owasptop10
and
https://tryhackme.com/room/owasptop10
and
https://www.cisa.gov/news-events/cybersecurity-advisories/aa23-208a
and
https://www.cisa.gov/news-events/cybersecurity-advisories/aa23-208a
#owasp_series
#functional_level_access_control
@hackhive_channel🐝
Functional Level Access Control
For practice:
easy level=
https://portswigger.net/web-security/access-control/lab-method-based-access-control-can-be-circumvented
and
https://portswigger.net/web-security/access-control/lab-method-based-access-control-can-be-circumvented
and
https://tryhackme.com/room/owaspbrokenaccesscontrol
and
https://tryhackme.com/room/owaspbrokenaccesscontrol
and
https://pwning.owasp-juice.shop/companion-guide/latest/part2/broken-access-control.html
and
https://pwning.owasp-juice.shop/companion-guide/latest/part2/broken-access-control.html
medium level =
https://portswigger.net/web-security/access-control
and
https://portswigger.net/web-security/access-control
and
https://tryhackme.com/room/owasptop10
and
https://tryhackme.com/room/owasptop10
and
https://www.cisa.gov/news-events/cybersecurity-advisories/aa23-208a
and
https://www.cisa.gov/news-events/cybersecurity-advisories/aa23-208a
#owasp_series
#functional_level_access_control
@hackhive_channel🐝