Showing posts with label vulnerability management. Show all posts
Showing posts with label vulnerability management. Show all posts

Saturday, January 10, 2015

Moscow Rules for Cybersecurity

I believe I grew up on a different planet. "The world has changed" can only be an understatement. The world I grew up in was simpler and somewhat more elegant. For one thing the enemy was clear, the Russians. We were the good guys and they were the bad guys. We were blue, they were red. We were Rocky Balboa, they were Ivan Drago.


The world today is very different, the enemy is within, anyone we shared the bus or the subway with on our way to work yesterday can be the enemy.
Anyone can purchase a gun and kill innocents. Anyone can attack us. We have seen that even being a cartoonist in the most romantic city of the world doesn’t keep you safe from arm. The enemy is within and we should start thinking and acting accordingly.

This is not something new for us as this paranoid way of looking at things was already, and quite understandably, spreading amongst IT security professionals.
We, the guys trying to keep the IT infrastructure safe, know that the moment you connect something to the internet it is in hostile territory. We know that attacks start pouring in by dozens if not hundreds from all across the globe.

The “Moscow Rules” were never officially published but they seem like a reasonable set of behaviors that would help an operative stay alive in hostile territory. Looking at the way things have turned online I believe it’s a good time to remember these and adapt them to our approach to cyber security.

There are several “versions” of the Moscow Rules circulating on the internet and, unless Snowden has them in one of his files, I doubt we will ever have a confirmation on if these rules even ever existed. The International Spy Museum in Washington D.C. has published the following list as “Moscow Rules”. If you ever find the opportunity to visit this museum you can also see the Alienware laptop used by Th3j35t3r he used between 2010 and 2013 (http://www.jesterscourt.cc/2013/07/04/tinker-tailor-soldier-hacker/)

The “Moscow Rules” according to the International Spy Museum:
1. Assume nothing.
2. Never go against your gut.
3. Everyone is potentially under opposition control.
4. Don't look back; you are never completely alone.
5. Go with the flow, blend in.
6. Vary your pattern and stay within your cover.
7. Lull them into a sense of complacency.
8. Don't harass the opposition.
9. Pick the time and place for action.
10. Keep your options open.

Imminent Threat Solutions has also compiled a more comprehensive list of “Moscow Rules”, please visit http://www.itstactical.com/intellicom/tradecraft/the-moscow-rules-cold-war-directives-for-tradecraft-and-espionage/ and remember to stop by their shop for great gear.

The Cybersecurity Moscow Rules
Some of the rules on these lists would not only be applicable in the field of information security but would also form a good set of “rule of thumbs”. Here’s my "cybersecurity" take on the Moscow Rules.

1. Assume nothing.
Never assume your firewall is properly configured, never assume you have changed the default credentials on the new IPS/DS, never assume the users will notice that phishing mail, never assume everyone keep their passwords to themselves, never assume you didn’t leave a password hash on a server on the DMZ network. Assume nothing and check everything. Penetration tests or even simple checks you can conduct yourself will help you see all the false assumptions you have made.

2. Never go against your gut.
If something doesn’t feel right, there’s a chance it isn’t. I believe we don’t have the luxury to base our information security stance on “gut feelings” so I’ll suggest that you base your “gut” on trends and baselines. Know how much bandwidth you’re normally using so that you can notice when something is wrong. Know how, when and from where your network and systems can be accessed by legitimate users so that you can notice when something’s wrong. Gut feeling in information security should be data, collect it and use it.

3. Everyone is potentially under opposition control.
Think that any system on your network can be compromised, just like any user account. Plan your network topology and configure your security devices accordingly. By doing so you’ll be able to contain any malware epidemic and, if you are into that sort of thing, break the cyber kill chain because this will limit the movements of the attackers within your network.

4. Don't look back; you are never completely alone.
If you think no one attacked you, scanned your IP addresses or tried a SQL injection on your website you are wrong. It simply means you didn’t notice and worst you don’t have the necessary systems in place to notice such attacks. You should be able to identify these attempts so that you can identify a successful attack. You are never alone, if you think you are, it’s time to do something.

5. Go with the flow, blend in.
Blend in, to do so you must know what to blend to. Set up the basic requirements for all systems connected to your network and blend in. Make sure all computers have antivirus software and are updated regularly, make sure that not default user accounts are left on network and security equipment, make sure users use strong passwords and make sure everyone and everything “blends in”.

6. Vary your pattern and stay within your cover.
First have a pattern. Put in place several routine controls such as comparing the list of published vulnerabilities to your systems inventory. Regularly check shared files on your network, control bandwidth usage and create a routine for all security controls. Once you have put in place your “cover” vary the frequency and intensity of these controls.

7. Lull them into a sense of complacency.
Complacency is dangerous enough for everyone but can be deadly for people working in the field of information security. Not only you but every computer user and every personnel should be alert and careful. Hackers rarely attack your firewall directly, instead they attack users trying to convince them into clicking a link or downloading a file. Complacency amongst employees in any Department of the company or even just a single person can result in a company wide security breach. Make sure all employees are alert and cautious.

8. Don't harass the opposition.
Probably the most difficult part of our jobs. We need to make sure everyone can benefit from technology thus increasing the productivity of the company. We should take all precautions yet enable employees to work effectively.

9. Pick the time and place for action.
Collect logs so that you can pick (up) the time and place of all critical actions (events). Know when the failed login attempts happened, know that the back up process was finished successfully at 02:00 hours, know that the credentials of a terminated employee have been used to access a database. Prepare a list of critical SANS Institute have published a list of 6 critical log areas (http://www.sans.edu/research/security-laboratory/article/6toplogs) , you can use it as a guideline for actions to pick up.

10. Keep your options open.
Contingency plans are your friend. Be sure to backup and update regularly.

Remember; the Internet is hostile territory and act accordingly. The enemy is everywhere and, yes, they are after you.

Thursday, November 27, 2014

Zafiyet, Tehdit ve Saldırı


Bilgi güvenliği konusu açıldığında karşımıza çıkan 3 temel terim zafiyet, tehdit ve Saldırıdır.
Terimleri anlamanın güvenlik konusunda atılacak adımların daha doğru planlanmasına faydalı olacağına inandığım için kısaca toparlamak istedim.



Zafiyet: Ağ veya ağa bağlı cihaz üzerinde bulunan bir güvenlik zafiyeti. Sunucular, ağ geçitleri ve hatta güvenlik cihazlarında bile zafiyet bulunabilir.

Tehdit: Mevcut zafiyetin istismar edilmesi (saldırgan tarafından kullanılması) halinde gerçekleşebilecek risktir. İlk akla gelenler sistemin hizmet veremez hale gelmesi veya izinsiz kişilerin sistem üzerindeki verilere ulaşmasıdır.

Saldırı: Ağ veya ağa bağlı sistemlere zarar vermek amacıyla yapılan eylemdir.

Zafiyetler

Herhangi bir ağ üzerinde güvenlik politikası, teknoloji veya kurulum/konfigürasyon eksikliklerinden kaynaklanan 3 temel zafiyet türü bulunabilir.

Güvenlik Politikası Zafiyetleri
Kağıt üzerinde görmeye alışık olduğumuz “güvenlik politikası” bizim için gerçekte nasıl bir zafiyet olabileceği ilk bakışta net olmayabilir. Güvenlik politikasının olmaması ağa bağlı sistemlere izinsiz yazılım yüklenmesi gibi pek çok önemli güvenlik açığına neden olabilir. Benzer şekilde felaket kurtarma veya olağanüstü durum planlarının belli olmaması güvenlik ihlali veya felaket durumunda yanlış veya eksik davranışlara neden olarak durumun daha da kötüleşmesine neden olabilir.

Teknoloji Zafiyetleri
Ağ üzerinde teknolojik zafiyet bulunabilecek sistemleri 3 ana gruba ayırabiliriz bunlar protokol, işletim sistemi ve cihazlardır.
HTTP, FTP veya DNS gibi iletişim protokolleri ve ağ üzerinden hizmet veren yapılar kendi içlerinde zafiyetler barındırmaktadır. Saldırganlar bunları hedef alarak ağ üzerindeki iletişimi aksatabilir, veri alışverişini dinleyebilir/değiştirebilir veya kurumsal ağ kaynaklarını başka hedeflere saldırmak için kullanabilir.
Windows, MAC ve Linux/UNIX gibi işletim sistemlerinin bilinen pek çok zafiyetleri vardır. Saldırganlar bu zafiyetleri sistemleri hizmet dışı bırakmak veya tamamen ele geçirmek için kullanabilmektedir.
Cihazların arayüzlerinin istismar edilebilir zafiyetler barındırması veya ağ üzerinde aktif olarak çalışan cihazların fabrika çıkışı kullanıcı adı/parola bilgilerinin değiştirilmemesi bunları saldırganlar için önemli hedefler haline getirmektedir.

Kurulum/konfigürasyon Zafiyetleri
Ağ ve sistem yöneticilerine en çok görevin düştüğü zafiyetler bu başlık altında toplanabilir. Kullanıcı hesaplarının güvenliğinin sağlanması çok önemlidir. Güçlü parola kullanımı için kurallar belirlenmeli ve kullanıcıların bu kurallara uyduğundan emin olunmalıdır. Ağ ve ağa bağlı sistemler üzerinde çalışmasına izin verilen uygulamaların belirlenmesi çok önemlidir. Bu konu açılmışken; bu sene Mart ayında bulaştığı ağ üzerinden topladığı önemli bilgileri kendi açtığı bir Twitter üzerinden paylaşan bir zararlı yazılım tespit edildi. Günde 100.000 adetten fazla Tweet atan zararlı yazılım, bulaştığı bir perakende zinciri ağı üzerinde bulduğu kredi kartı bilgilerini bu sayede dışarıya göndermişti. Geçtiğimiz ay ise bir grup saldırgan sızdıkları ağdan topladıkları verileri Youtube’a video yükler gibi .mp4 uzantılı dosyalar içerisine saklayıp kurumun güvenlik önlemlerini atlatmayı başardı.


Tehditler

Saldırgan profiline biraz daha detaylı ele aldığım bir yazıma http://www.alperbasaran.com/2014/11/siber-saldrgan-tanmak.html adresinden ulaşabilirsiniz. Burada basitçe iç ve dış tehdit profillerine değineceğim.

İç Tehdit
Kurumsal ağa ve sistemlere erişim yetkisi olan kişi veya sistemlerin yaptığı saldırılardır. Bu tehdit grubu sadece personelle sınırlı değildir. Sosyal mühendislik saldırısı sonucunda ele geçirilen bir çalışan laptopu saldırganların bir uzantısı olarak, personelin kötü niyeti sonucunda olmasa bile, iç tehdit olarak karşımıza çıkacaktır.

Dış Tehdit
Saldırganların dışarıdan kurumsal ağa ve bağlı sistemlere izinsiz erişim sağlamalarıdır.


Saldırılar

Saldırı konusu, değil blog, başlı başına kitap olabilecek bir konudur, o nedenle sadece yaygın olarak görülen bazı saldırıları ele alabileceğim.

DoS Saldırıları
“Denial of Service” (Hizmet Dışı Bırakma) saldırıları hala yaygın olarak görülmektedir. Çeşitli güvenlik firmaları tarafından geçtiğimiz ay yayınlanan raporların ortak noktalarından birisi de hizmet dışı bırakma saldırılarının sayısında ve etkisinde görülen artıştır. Özellikle 10 Gbps ve üzerinde görülen DDoS (Dağıtık Hizmet Dışı Bırakma) saldırı sayısı, bir önceki 3 aylık döneme göre, %38 oranında artmıştır. Saldırıların önemli bir bölümü ise basit bant genişliği sömürüsünün ötesinde SYN Flood gibi daha “akıllı” saldırılardan oluşmaktadır.
Bant genişliğini tüketmenin dışında kullanıcıların hedef alınan sisteme erişmesini engellemek  için saldırganların kullandığı DoS saldırılarının temel adımları ise aşağıdakilerdir:
Hedef sistem üzerinde çalışan hizmetleri ve uygulamaları tanımak
Bu uygulamaların kaynaklarını sömürmeye yönelik bir zafiyetten faydalanan bir aracın bulunması
Uygulamaya karşı saldırının başlatılması

Sızmalar
Saldırganların ağa ve ağa bağlı sistemlere sızarak veri çalmaları veya değiştirmelerini kapsayan bu saldırılar aşağıdaki ana hatlar üzerinden gerçekleştirilmektedir
DNS veya web sunucusu gibi internet üzerinden erişilebilen bir sistemin bulunması
Çeşitli yöntemler kullanılarak sistem üzerinde oturum açmak veya başka bir uygulama çalıştırmak
Ele geçirilen sistemin iç ağa ve iç ağa bağlı sistemlere erişmek için kullanılması

Arka Kapı
Saldırganlar tarafından hedef sisteme tam veya kısmı erişim kazanmanın ve bu sistemlerin yönetimini ele geçirmek için kullanılabilecek en basit yöntem arka kapı açılmasıdır. Yaygın olarak görülen 3 arka kapı türü Truva atları, arka kapı yazılımları (PHP Shell, vb.) ve duruma özel yazılmış kodlardır.

Kırmalar
Saldırganlar sisteme erişim yetkisi kazanmak veya hedef sistem üzerinde istedikleri kodu çalıştırmak için kaba kuvvet saldırıları düzenlerler. Bu saldırıların en basit örneği kullanıcı adı/parola tahmini için peşpeşe çok sayıda olasılığın denenmesidir.


Phishing
Hedef kurum personelini kandırmaya yönelik hazırlanmış eposta mesajlarının gönderilmesidir. İyi hazırlanmış bir oltalama (phishing) epostasını engelleyebilecek güvenlik önlemi sayısı çok azdır, bunun ötesinde kullanıcının bu maillerde kurulan senaryoya kanmasını engellemek ise neredeyse tamamen imkansızdır.

Wednesday, November 12, 2014

Kritik Windows Güncellemesi

Microsoft, neredeyse bütün Windows sürümlerini etkileyen kritik bir zafiyet için yama yayınladı.

Windows'da SSL (Secure Socket Layer) ve Transport Layer Security (TLS) bileşenlerini destekleyen Secure Channel (SChannel) paketinde tespit edilen zafiyet saldırganın hedef üzerinde uzaktan kod çalıştırmasına imkan veriyor. 

MS14-066 olarak adlandırılan zafiyet sunucuların dışında ilgili portu kullanan bir uygulamanın kurulu olduğu istemcileri de etkilemektedir. 

https://technet.microsoft.com/library/security/ms14-066 adresinde yayınlanan detaylara göre bu zafiyetten etkilenen sürümlerin listesi uzayıp gidiyor. 

Zafiyetin kritik, saldırgan tarafından kolay tespit edilebilir ve istismar edilebilir olması yayınlanan son Windows güncellemesini bizim açımızdan çok daha önemli hale getirmiştir. 

Güncelleme dışında zafiyeti istismar edilemez hale getirmenin henüz bir yolu bulunmadığı için, gün içerisinde ağınızda bulunan bütün Windows makinelerin güncellemelerini tamamlamakta fayda var. 

Bu zafiyet hakkında aklınıza takılan bir şey olursa benimle iletişim kurabilirsiniz. 

Tuesday, November 11, 2014

Other Links of the Cyber Kill Chain


My blog is in Turkish but as this post was commented on in a rather large English speaking group, I wanted to spare anyone who'd be interested the pain of having to read it using Google translate. This post followed a post introducing the "Cyber Kill Chain" concept. 

Lockheed Martin, the company manufacturing aircrafts such as F-16, F-117 and the F-35 introduced the term "Cyber Kill Chain".

Pic 1: F-35 manufactured by Lockheed Martin

Pic 2: Turkey is one of the countries involved in the F-35 project

The "Cyber Kill Chain" approach introduced by the Incident Response Team at Lockheed Martin can be considered as a list of "unfortunate events" that are required for an attack to be successful.

The steps of a successful attack can be briefly listed as follows:
  1. Information gathering: Gathering information on the target. This step also include "Open Source Intelligence" (gathering information freely and openly available about the target) so the attacker can have a better understanding of the target.  
  2. Weaponization: Preparing the necessary software, backdoor or exploit code for the attack.
  3. Delivery: Sending the weaponized code to the target.
  4. Exploit: Activate the backdoor or exploit code to gain initial access to target systems. 
  5. Installation: Installing persistent backdoors and other code needed to move within the target network.
  6. Taking command: Gaining remote access to target systems and/or network.
  7. The kill: Performing the real attack depending on the needs of the attacker (leaking or deleting data, eavesdropping, etc..) 

Breaking the above mentioned chain in one or several steps will stop the attack or seriously cripple its success. Focusing on breaking this "Cyber Kill Chain" should be considered as a viable and efficient defense technique. However, it should be noted that the step at which we can break the chain will impact the cost and complexity of the defenses required. For example, placing a firewall is easier compared to a complex log gathering and correlation solution that aims to uncover possible malicious movements within the network. 
It would be safe to assume that aiming to break the chain as early as possible will, not only be easier and cheaper, but also provide us with an additional layer of security. There isn't much that can be done about the reconnaissance step as it's relatively hard to control information indexed by third parties. 
Perimeter security measures such as IDS/IPS (Intrusion Detection System / Intrusion Prevention Systems) or firewalls will try to avoid the initial breach. Having different VLANs, controlling LAN traffic with a firewall and monitoring logs we can stop the attacker from moving within the network or installing more backdoors. 
This is where vulnerability management comes into play, as an additional layer of security between the open source intelligence gathering and the attack. 
Vulnerability scanning will give us an overview about how vulnerable our systems and network are to an attacker. One might easily argue that vulnerability scanning won't provide every single attack vector that can be exploited by a skilled attacker and be right. As a strong believer in the "golden mean" or its more understandable version "perfect is the enemy of good", I think we shouldn't dismiss vulnerability scanning as an effective proactive security measure just because "it's not a pentest" or "hackers don't use Nessus" or "they can APT the hell out of you anyway". 
Basically, an attacker can have 3 good attack vectors he can use to gain access to the target system and network. These are; systems that can be reached from the internet, systems that can reach the internet and internal systems with known vulnerabilities. 
Systems that can be reached from the Internet: Knowing what systems are reachable from the Internet is vital. Any attacker worth his/her salt will be able to locate every Internet facing IP in your network. When we hear the words "Internet facing" we tend to think about that web server in our DMZ or such. I wih life was that simple. There have been many times I've found servers and clients open to the internet about which the Admins knew nothing. Regularly controlling all internet facing systems within your IP range will able you to spot these before attackers do (proactive security at its finest). 
Systems that can reach the internet: Basically all your clients. We need to remember that browsers are not the only systems that can reach the internet. Things such as instant messaging solutions and stock market tracking applications should also be taken into account. 
Known vulnerabilities on internal systems: This is the MS08-067 or the unpatched windows we find during penetration tests. They provide a good foothold for any movement within the network. 
These 3 attack vectors provide good opportunities to break the kill chain. 

Pic 3: "Cyber Kill Chain" facing an effective vulnerability management process (representational)

Creating and implementing even a basic vulnerability management process will provide an extra layer of security. Imagine having an invisible layer between the step where the attacker gathers information on your company using Google and the step here he/she is trying to avoid being detected by the IPS. 
A vulnerability management system can even be implemented using an open source vulnerability scanner such as OpenVAS or using a more rounded commercial tool such as Tenable's Security Center. 

Pic 4: Screenshot from Tenable Security Center 

MITRE ATT&CK Gerçek Hayatta Ne İşimize Yarar?

  Rusya kaynaklı siber saldırılar webinarı sırasında üzerinde durduğum önemli bir çalışma vardı. MITRE ATT&CK matrisini ele alıp hangi...