C2 Obfuscation and Exfiltration: HUC Packet Transmitter
Атакуващите често искат да прикрият местоположението си, когато компрометират цел. За целта те могат да използват общи инструменти за поверителност (напр. Tor) или по-специфични инструменти, за да объркат евентуално разследнаве относно местоположението си.
Предавателят на пакети HUC (HUC Packet Transmitter, HTran) е прокси инструмент, използван за прихващане и пренасочване на връзки на протокола за контрол на предаването (TCP) от локалния хост към отдалечен хост. Това прави възможно затъмняването на комуникацията на нападателя с мрежите на жертвите. Инструментът е свободно достъпен в интернет поне от 2009 г.
HTran улеснява TCP връзки между жертвата и точката хоп, контролирана от актьора на заплаха. Злонамерените актьори могат да използват тази техника, за да пренасочат своите пакети чрез множество компрометирани хостове (hops, хопове), работещи с HTran, за да получат по-голям достъп до хостове в мрежа.
In Use
Използването на HTran се наблюдава редовно при компромиси както с държавните, така и с индустриалните цели.
Наблюдавани са широка гама от участници в заплахата, използващи HTran и други прокси инструменти за:
заобикаляне на системите за проникване и откриване в мрежа (IDS/IPS);
смесване с обичайния трафик или използване на доверителни връзки на домейн, с цел заобиколяне на контролите за сигурност;
скриване на инфраструктурата или комуникациите на C2 и
създаване на peer-to-peer или мрежова C2 инфраструктура, с цел избегване на откриването и осигуряване на устойчиви връзки към инфраструктурата.
Възможности
HTran може да работи в няколко режима, всеки от които препраща трафик през мрежа чрез свързване на два TCP сокета. Те се различават по отношение на това откъде се инициират TCP сокетите, локално или отдалечено. Трите режима са
Сървър (слушане) – И двата TCP сокета се инициират отдалечено;
Клиент (подчинен) – И двата TCP сокета се инициират локално; и
Прокси (tran) – Единият TCP сокет се инициира дистанционно, другият се инициира локално при получаване на трафик от първата връзка.
HTran може да се инжектира в изпълняващи се процеси и да инсталира руткит, за да скрие мрежовите връзки от хост операционната система. Използването на тези функции също създава записи в системния регистър на Windows, за да гарантира, че HTran поддържа постоянен достъп до мрежата на жертвите.
Примери
Последните разследвания от институционални органи за киберсигурност (US CERT) установиха използването на HTran за поддържане и затъмняване на отдалечен достъп до целевата среда.
При един инцидент актьорът на заплахата компрометира външни уеб сървъри, работещи с остарели и уязвими уеб приложения. Този достъп позволява инсталиране на WebShells, които след това са използвани за разполагане на други инструменти, включително HTran.
HTran беше инсталиран в директорията ProgramData и бяха използвани други внедрени инструменти за преконфигуриране на сървъра за приемане на комуникации с протокол за отдалечен работен плот (RDP).
Актьорът на заплахата издаде команда за стартиране на HTran като клиент, инициирайки връзка със сървър, разположен в интернет през порт 80, който препраща RDP трафика от локалния интерфейс.
В този случай HTTP е избран да се слее с другия трафик, който се очаква да бъде видян, произхождащ от уеб сървър към интернет. Други известни използвани пристанища включват:
Порт 53 – Система за имена на домейни
Порт 443 – HTTP през слой TLS / Secure Sockets
Порт 3306 – MySQL
Използвайки HTran по този начин, актьорът на заплахата успя да използва RDP в продължение на няколко месеца, без да бъде открит.
Откриване и защита
Атакуващите се нуждаят от достъп до машина, за да инсталират и стартират HTran, така че защитниците на мрежата трябва да прилагат корекции за сигурност и да използват добър контрол на достъпа, за да попречат на атакуващите да инсталират злонамерени приложения.
Мониторингът на мрежата и защитните стени могат да помогнат за предотвратяване и откриване на неоторизирани връзки от инструменти като HTran.
В някои от анализираните проби руткит компонентът на HTran крие подробности за връзката само когато се използва прокси режим. Когато се използва клиентски режим, защитниците могат да видят подробности за TCP връзките, които се правят.
HTran включва и състояние за отстраняване на грешки, което е полезно за защитниците на мрежата. В случай че дестинация стане недостъпна, HTran генерира съобщение за грешка, използвайки следния формат:
sprint(buffer, “[SERVER]connection to %s:%d error\r\n”, host, port2);
Това съобщение за грешка се предава на свързващия клиент в чист текст. Защитниците на мрежата могат да наблюдават за това съобщение за грешка, за да открият потенциално екземпляри на HTran, активни в техните среди.
Mitigations
Има няколко мерки, които ще подобрят цялостната киберсигурност на вашата организация и ще я помогнат да я защитите срещу видовете инструменти, подчертани в този доклад. Защитниците на мрежата се съветват да търсят допълнителна информация, като използват връзките по-долу.
- Protect your organization from malware.
See NCCIC Guidance: https://www.us-cert.gov/ncas/tips/ST13-003.
See UK NCSC Guidance: https://www.ncsc.gov.uk/guidance/protecting-your-organisation-malware. - Board toolkit: five question for your board’s agenda.
See UK NCSC Guidance: https://www.ncsc.gov.uk/guidance/board-toolkit-five-questions-your-boards-agenda. - Use a strong password policy and multifactor authentication (also known as two-factor authentication or two-step authentication) to reduce the impact of password compromises.
See NCCIC Guidance: https://www.us-cert.gov/ncas/tips/ST05-012.
See UK NCSC Guidance: https://www.ncsc.gov.uk/guidance/multi-factor-authentication-online-services and https://www.ncsc.gov.uk/guidance/setting-two-factor-authentication-2fa. - Protect your devices and networks by keeping them up to date. Use the latest supported versions, apply security patches promptly, use antivirus and scan regularly to guard against known malware threats.
See NCCIC Guidance: https://www.us-cert.gov/ncas/tips/ST04-006.
See UK NCSC Guidance: https://www.ncsc.gov.uk/guidance/mitigating-malware. - Prevent and detect lateral movement in your organization’s networks.
See UK NCSC Guidance: https://www.ncsc.gov.uk/guidance/preventing-lateral-movement. - Implement architectural controls for network segregation.
See UK NCSC Guidance: https://www.ncsc.gov.uk/guidance/10-steps-network-security. - Protect the management interfaces of your critical operational systems. In particular, use browse-down architecture to prevent attackers easily gaining privileged access to your most vital assets.
See UK NCSC blog post: https://www.ncsc.gov.uk/blog-post/protect-your-management-interfaces. - Set up a security monitoring capability so you are collecting the data that will be needed to analyze network intrusions.
See UK NCSC Guidance: https://www.ncsc.gov.uk/guidance/introduction-logging-security-purposes. - Review and refresh your incident management processes.
See UK NCSC Guidance: https://www.ncsc.gov.uk/guidance/10-steps-incident-management. - Update your systems and software. Ensure your operating system and productivity applications are up to date. Users with Microsoft Office 365 licensing can use “click to run” to keep their office applications seamlessly updated.
- Use modern systems and software. These have better security built-in. If you cannot move off out-of-date platforms and applications straight away, there are short-term steps you can take to improve your position.
See UK NCSC Guidance: https://www.ncsc.gov.uk/guidance/obsolete-platforms-security-guidance. - Manage bulk personal datasets properly.
See UK NCSC Guidance: https://www.ncsc.gov.uk/guidance/protecting-bulk-personal-data-introduction. - Restrict intruders’ ability to move freely around your systems and networks. Pay particular attention to potentially vulnerable entry points (e.g., third-party systems with onward access to your core network). During an incident, disable remote access from third-party systems until you are sure they are clean.
See UK NCSC Guidance: https://www.ncsc.gov.uk/guidance/preventing-lateral-movement and https://www.ncsc.gov.uk/guidance/assessing-supply-chain-security. - Allow list applications. If supported by your operating environment, consider allow listing of permitted applications. This will help prevent malicious applications from running.
See UK NCSC Guidance: https://www.ncsc.gov.uk/guidance/eud-security-guidance-windows-10-1709#applicationwhitelistingsection. - Manage macros carefully. Disable Microsoft Office macros, except in the specific applications where they are required.
Only enable macros for users that need them day-to-day and use a recent and fully patched version of Office and the underlying platform, ideally configured in line with the UK NCSC’s End User Device Security Collection Guidance and UK NCSC’s Macro Security for Microsoft Office Guidance: https://www.ncsc.gov.uk/guidance/end-user-device-security and https://www.ncsc.gov.uk/guidance/macro-security-microsoft-office. - Use antivirus. Keep any antivirus software up to date, and consider use of a cloud-backed antivirus product that can benefit from the economies of scale this brings. Ensure that antivirus programs are also capable of scanning Microsoft Office macros.
See NCCIC Guidance: https://www.us-cert.gov/ncas/tips/ST04-005.
See UK NCSC Guidance: https://www.ncsc.gov.uk/guidance/macro-security-microsoft-office. - Layer organization-wide phishing defenses. Detect and quarantine as many malicious email attachments and spam as possible, before they reach your end users. Multiple layers of defense will greatly cut the chances of a compromise.
- Treat people as your first line of defense. Tell personnel how to report suspected phishing emails, and ensure they feel confident to do so. Investigate their reports promptly and thoroughly. Never punish users for clicking phishing links or opening attachments.
NCCIC encourages users and administrators to report phishing to phishing-report@us-cert.gov.
See NCCIC Guidance: https://www.us-cert.gov/ncas/tips/ST04-014.
See UK NCSC Guidance: https://www.ncsc.gov.uk/phishing. - Deploy a host-based intrusion detection system. A variety of products are available, free and paid-for, to suit different needs and budgets.
- Defend your systems and networks against denial-of-service attacks.
See UK NCSC Guidance: https://www.ncsc.gov.uk/guidance/denial-service-dos-guidance-collection. - Defend your organization from ransomware. Keep safe backups of important files, protect from malware, and do not pay the ransom– it may not get your data back.
See NCCIC Guidance: https://www.us-cert.gov/Ransomware.
See UK NCSC Guidance: https://www.ncsc.gov.uk/guidance/mitigating-malware and https://www.ncsc.gov.uk/guidance/backing-your-data. - Make sure you are handling personal data appropriately and securely.
See NCCIC Guidance: https://www.us-cert.gov/ncas/tips/ST04-013.
See UK NCSC Guidance: https://www.ncsc.gov.uk/guidance/gdpr-security-outcomes.
Further information: invest in preventing malware-based attacks across various scenarios. See UK NCSC Guidance: https://www.ncsc.gov.uk/guidance/mitigating-malware.
Additional Resources from International Partners
- Australian Cyber Security Centre (ACSC) Strategies – https://acsc.gov.au/infosec/mitigationstrategies.htm
- ACSC Essential Eight – https://acsc.gov.au/publications/protect/essential-eight-explained.htm
- Canadian Centre for Cyber Security (CCCS) Top 10 Security Actions – https://cyber.gc.ca/en/top-10-it-security-actions
- CCCS Cyber Hygiene – https://www.cse-cst.gc.ca/en/cyberhygiene-pratiques-cybersecurite
- CERT New Zealand’s Critical Controls 2018 – https://www.cert.govt.nz/it-specialists/critical-controls/
- CERT New Zealand’s Top 11 Cyber Security Tips for Your Business – https://www.cert.govt.nz/businesses-and-individuals/guides/cyber-security-your-business/top-11-cyber-security-tips-for-your-business/
- New Zealand National Cyber Security Centre (NZ NCSC) Resources – https://www.ncsc.govt.nz/resources/
- New Zealand Information Security Manual – https://www.gcsb.govt.nz/the-nz-information-security-manual/
- UK NCSC 10 Steps to Cyber Security – https://www.ncsc.gov.uk/guidance/10-steps-cyber-security
- UK NCSC Board Toolkit: five questions for your board’s agenda – https://www.ncsc.gov.uk/guidance/board-toolkit-five-questions-your-boards-agenda
- UK NCSC Cyber Security: Small Business Guide – https://www.ncsc.gov.uk/smallbusiness