# Visit http://digitalacropolis.us/?p=113 to see a html version of this paper # ---------------------------------------------------------------------------- # Title: Exploiting DLL Hijack in the real world # Date: 27/08/2010 # Author: Bruno Filipe (diwr) - bmilreu[]at[]gmail.com # ---------------------------------------------------------------------------- Dll hijacking is the new hype on Windows exploiting. This vulnerability is caused by a misbehavior practiced by all versions of Windows, as far as I’m concerned. This misbehavior can be found explained in this MSDN page [link at bottom] (see Remarks). Note that many people consider this flaw a feature and not a real bug because it was intended to be made this way by Microsoft. I strongly disagree as I can’t think of a single legitimate usage of a dll being loaded from the same directory of a opened file. I won’t go into minor details about this issue, as they can be found in reference links at the bottom of this article. I recommend reading them first if you don’t know what Dll Hijacking is. Basically, it works by creating a custom malicious dll and putting it in the same directory of a clean file. When this clean file is opened by a vulnerable application, your custom dll will be loaded and your code executed. This malicious dll must have specific filenames for each vulnerable application, which can be discovered using any simple debugging tool. There are vulnerabilities in many major programs, so it’s possible to bundle a dll with almost any filetype, like pdf, html, jpg, mp3, avi, ANYTHING. Even some programs included with Windows are vulnerable. Peter Eeckhoute from corelan team started an unofficial list that you might want to check [link at bottom]. You’re almost certainly using many exploitable applications so it’s a must to check there if you use Windows regardless of it’s version or edition. This is a major security issue that affects every Windows version and cannot be patched universally as it would break many existing applications. Inside this article I’ll also provide some tips about how you can try to protect yourself and your network. There’s no bullet-proof solution at this moment but you can certainly avoid getting exploited in many cases. This article is focused on showing how this flaw can be exploited in a real world scenario from an attacker’s side. This is important because there are many possible attack vectors that can be used either making use of another vulnerability or even some simple social engineering. I’ll explain some of them and how can be possibly avoided by an user or sysadmin. * Using a SMB/WebDav shared folder This is perhaps the most common way dll hijacking is being used, probably because it can be exploited remotely. There are already a module for Metasploit which uses this vector. It works by putting together a malicious dll and a clean file that triggers it inside a share and then making your target open this clean file. Remember a shared folder link always starts with double slashes like \\123.45.67.890. Real world examples: 1. Attacker sends a shared folder link to a victim. Victim opens and sees some .html files and double-clicks one of them. When a vulnerable browser or application opens this file it loads a dll directly from this share, and victim is now infected. 2. Attacker posts a link in a forum that looks like a http link but redirects victim to a shared folder. Victim opens a simple .pdf file and gets infected. 3. Attacker gains access to a trusty website and puts iframes or redirects to his share. Victim trusts this site and opens a mp3 file inside the shared folder and… gets infected as well. 4. Attacker uses the .lnk bug or any browser vulnerability together with any of above examples and thus increase his infect rate. Tip: This kind of attack can be neutralized blocking any outbound connection to a smb/webdav share. Ports are 445 and 135. * A compressed package (.zip, .tar.gz, .rar etc) This vector can be exploited by putting together a bunch of clean files and a malicious dll inside a compressed folder/package. Target will extract these files and open one of them, getting attacker’s dll loaded. Real world example: 1. Attacker compresses 30 jpg pictures and a dll in a zip file. Victim extracts everything to a folder and double-clicks one of the pictures. Infected. I won’t provide any other example of this because it’d look the same. Tip: Before opening any kind of file, specially downloaded from the internet, check if there’s any dll file in the same directory. Don’t forget to enable show hidden files and show all extensions on your Folder Options. It’s also recommended to move only the files you need to open to another directory created by you. This should make you safe. * Torrents This one is kinda nasty and can be very effective to contaminate large amounts of people. A torrent can contain large numbers of files and can be used to get a malicious dll downloaded together with clean files without being noticed. This is very dangerous, specially if a big torrent tracker or database can be compromised. Real world examples: 1. Attacker posts a custom torrent in a public tracker, which contains a pack of mp3′s and a malicious dll. Victim goes listen it’s new song album and get infected. 2. Attacker gains admin access to a torrent database (this actually happened to ThePirateBay not so long ago) and changes a legitimate high-traffic torrent for a infected one. This could cause a massive infection in a matter of minutes. Tip: Same tip as above. Make sure there are no dlls in the current folder before opening any kind of file. If you own a tracker or database make sure your webserver and/or database are not vulnerable to any kind of vulnerability like SQL injections, XSS etc. * Exploiting multiple application hijacks We have not seen yet a real world malware that uses dll hijacks to it’s max but one of the ways attackers can (and will) use to increase their success rate is putting multiple dlls to exploit the same filetype. Real world example: * Attacker shares a folder which contains a bunch of .avi files and three malicious dlls: one for VLC, other for MediaPlayer Classic and, finally, the last one for Winamp. Attacker can now exploit three apps in the same attack, increasing the chance of victim getting infected. These are just some of the many ways we might seem this breach being exploited in real world in a very near future. You might wanna check all vulnerable apps and discover your own way or you can also try to discover your own vulnerable apps using this kit, provided by HD Moore (creator of Metasploit) [link at bottom]. - Bruno Filipe (diwr) Links: [MSDN page] http://msdn.microsoft.com/en-us/library/ms686203%28VS.85%29.aspx [hdm’s DLL Hijack Audition kit and instructions] http://blog.metasploit.com/2010/08/better-faster-stronger.html [Rapid7 Blog advisory about DLL Hijacking flaw] http://blog.rapid7.com/?p=5325 [Corelan blog – Unofficial list of vulnerable apps] http://www.corelan.be:8800/index.php/2010/08/25/dll-hijacking-kb-2269637-the-unofficial-list/ [exploit-db list of vulnerable apps] http://www.exploit-db.com/dll-hijacking-vulnerable-applications/ [Sample DreamWeaver CS5 exploit] http://www.exploit-db.com/exploits/14740/
8/27/2010
Exploiting dll hijack in real world
8/26/2010
How to call phone from Gmail
Since Google has announced Google Voice feature on Gmail page that allows Google's users to place a call to any one in US and Canada for free. (http://gmailblog.blogspot.com/2010/08/call-phones-from-gmail.html) So, I would like to try it out.
Here is what I did to get the "Call Phone" button on GMail page.
First, start out with normal Google Chat on Gmail.
My browser was installed Google Voice and Video plugin for browser before, so I can vdo chat with other people (notice a vdo camera icon on my name).
But I didn't have the button "Call Phone" under my name yet, so I tried install the plugin again.
(The plugin download page is http://www.google.com/chat/voice/)
See that it says something about new "Call Phone" button. I think I come in the right place.
Then, I downloaded and installed it.


Here is what I did to get the "Call Phone" button on GMail page.
First, start out with normal Google Chat on Gmail.
My browser was installed Google Voice and Video plugin for browser before, so I can vdo chat with other people (notice a vdo camera icon on my name).
But I didn't have the button "Call Phone" under my name yet, so I tried install the plugin again.
(The plugin download page is http://www.google.com/chat/voice/)
See that it says something about new "Call Phone" button. I think I come in the right place.
Then, I downloaded and installed it.
Installing...
installation is done and restarting browser.
after installed, google will show this page.
Now, it comes a little bit frustrating part. Because I was trying to get the "Call Phone" button the day after Google announce it, Google hasn't finished rolling out to all users yet. That's why even after I re-installed the plug-in, my GMail page is still the same. So, I have no other choice but to wait....
Just today (Aug 26), my GMail page has a ballon showing the new feature has finally arrived.
When click on it, it pops up a dial pad on bottom-right of the screen.
I was just so excited to try it out. I dialed my phone number :D
Guess what, my phone rang, with showing my Google Voice's phone number as the caller.
And this is the stat page after I ended my call (to myself).
This means I got 2 phone numbers now. And the Google Voice number's totally free, and also free call to both US and Canada for the whole 2010 year. Wow!
[update on call quality] It is very good. I didn't hear any static, or noise on the line from both ends. It's simply the same as normal phone call.
8/24/2010
คำสั่งน่าใช้บน CMD
Actions | Command |
เรียกโปรแกรม Accessibility Options | access.cpl |
เรียกโปรแกรม Add Hardware | hdwwiz.cpl |
เรียกโปรแกรม Add/Remove Programs | appwiz.cpl |
เรียกโปรแกรม Administrative Tools control | admintools |
ตั้งค่า Automatic Updates | wuaucpl.cpl |
เรียกโปรแกรม Bluetooth Transfer Wizard | fsquirt |
เรียกโปรแกรม เครื่องคิดเลข (Calculator) | calc |
เรียกโปรแกรม Certificate Manager | certmgr.msc |
เรียกโปรแกรม Character Map | charmap |
เรียกโปรแกรม ตรวจสอบดิสก์ (Check Disk Utility) | chkdsk |
เรียกดูคลิปบอร์ด (Clipboard Viewer) | clipbrd |
เรียกหน้าต่างดอส (Command Prompt) | cmd |
เรียกโปรแกรม Component Services | dcomcnfg |
เรียกโปรแกรม Computer Management | compmgmt.msc |
เรียกดู/ตั้ง เวลาและวันที่ | timedate.cpl |
เรียกหน้าต่าง Device Manager | devmgmt.msc |
เรียกดูข้อมูล Direct X (Direct X Troubleshooter) | dxdiag |
เรียกโปรแกรม Disk Cleanup Utility | cleanmgr |
เรียกโปรแกรม Disk Defragment | dfrg.msc |
เรียกโปรแกรม Disk Management | diskmgmt.msc |
เรียกโปรแกรม Disk Partition Manager | diskpart |
เรียกหน้าต่าง Display Properties control desktop | desk.cpl |
เรียกหน้าต่าง Display Properties เพื่อปรับสีวินโดวส์ | control color |
เรียกดูโปรแกรมช่วยแก้ไขปัญหา (Dr. Watson) | drwtsn32 |
เรียกโปรแกรมตรวจสอบไดร์ฟเวอร์ (Driver Verifier Utility) | verifier |
เรียกดูประวัติการทำงานของเครื่อง (Event Viewer) | eventvwr.msc |
เรียกเครื่องมือตรวจสอบไฟล์ File Signature Verification Tool | sigverif |
เรียกหน้าต่าง Folders Options | control folders |
เรียกโปรแกรมจัดการ Fonts | control fonts |
เปิดไปยังโฟลเดอร์ Fonts (Fonts Folder) | fonts |
เรียกเกม Free Cell | freecell |
เปิดหน้าต่าง Game Controllers | joy.cpl |
เปิดโปรแกรมแก้ไข Group Policy (ใช้กับ XP Home ไม่ได้) | gpedit.msc |
เรียกเกม Hearts | mshearts |
เรียกโปรแกรมสร้างไฟล์ Setup (Iexpress Wizard) | iexpress |
เรียกโปรแกรม Indexing Service | ciadv.msc |
เรียกหน้าต่าง Internet Properties | inetcpl.cpl |
เรียกหน้าต่าง Keyboard Properties control | keyboard |
แก้ไขค่าความปลอดภัย (Local Security Settings) | secpol.msc |
แก้ไขผู้ใช้ (Local Users and Groups) | lusrmgr.msc |
คำสั่ง Log-off | logoff |
เรียกเกม Minesweeper | winmine |
เรียกหน้าต่าง Mouse Properties control mouse | main.cpl |
เรียกหน้าต่าง Network Connections control netconnections | ncpa.cpl |
เรียกหน้าต่าง Network Setup Wizard | netsetup.cpl |
เรียกโปรแกรม Notepad | notepad |
เรียกโปรแกรม Object Packager | packager |
เรียกคีย์บอร์ดบนหน้าจอ (On Screen Keyboard) | osk |
เรียกหน้าต่าง Performance Monitor | perfmon |
เรียกหน้าต่าง Power Options Properties | powercfg.cpl |
เรียกหน้าต่าง Printers and Faxes control | printers |
เรียกหน้าต่าง Printers Folder | printers |
เรียกโปรแกรม Private Character Editor | eudcedit |
เรียกหน้าต่าง Regional Settings | intl.cpl |
เรียกหน้าต่าง Registry Editor | regedit |
เรียกโปรแกรม Remote Desktop | mstsc |
เรียกหน้าต่าง Removable Storage | ntmsmgr.msc |
เรียกหน้าต่าง Removable Storage Operator Requests | ntmsoprq.msc |
เรียกดู Policy ที่ตั้งไว้ (ใช้กับ XP Home ไม่ได้) | rsop.msc |
เรียกหน้าต่าง Scanners and Cameras | sticpl.cpl |
เรียกโปรแกรม Scheduled Tasks | control schedtasks |
เรียกหน้าต่าง Security Center | wscui.cpl |
เรียกหน้าต่าง Services | services.msc |
เรียกหน้าต่าง Shared Folders | fsmgmt.msc |
คำสั่ง Shuts Down | shutdown |
เรียกหน้าต่าง Sounds and Audio | mmsys.cpl |
เรียกเกม Spider Solitare | spider |
แก้ไขไฟล์ระบบ (System Configuration Editor) | sysedit |
แก้ไขการตั้งค่าระบบ (System Configuration Utility) | msconfig |
ตรวจสอบระบบด้วย System File Checker Utility (เริ่มทันที) | sfc /scannow |
ตรวจสอบระบบด้วย System File Checker Utility (เริ่มเมื่อบู๊ต) | sfc /scanonce |
เรียกหน้าต่าง System Properties | sysdm.cpl |
เรียกหน้าต่าง Task Manager | taskmgr |
เรียกหน้าต่าง User Account Management | nusrmgr.cpl |
เรียกโปรแกรม Utility Manager | utilman |
เรียกโปรแกรม Windows Firewall | firewall.cpl |
เรียกโปรแกรม Windows Magnifier | magnify |
เรียกหน้าต่าง Windows Management Infrastructure | wmimgmt.msc |
เรียกหน้าต่าง Windows System Security Tool | syskey |
เรียกตัวอัพเดตวินโดวส์ (Windows Update) | wupdmgr |
เรียกหน้าต่าง Windows XP Tour Wizard | tourstart |
เรียกโปรแกรม Wordpad | write |
ดู MAC Address ทุกเครื่องในวงแลน | arp -a |
8/07/2010
Twitter Trend in Thai
ความพยายามในการ Analyze ข้อมูล twitter เฉพาะของคนไทยเท่านั้น
http://www.lab.in.th/thailand-trending
ข้อมูล trend ปัจจุบันของ ผู้ใช้ twitter ในไทย (และใช้ภาษาไทยเท่านั้น)
http://www.lab.in.th/thaitrend/
Thanks to http://www.lab.in.th
http://www.lab.in.th/thailand-trending
ข้อมูล trend ปัจจุบันของ ผู้ใช้ twitter ในไทย (และใช้ภาษาไทยเท่านั้น)
http://www.lab.in.th/thaitrend/
Thanks to http://www.lab.in.th
8/05/2010
Windows Live's new features
เพิ่งเห็นว่า Windows Live มีความสามารถ link กับ Facebook ได้ด้วยเลยลอง setup ดู
http://profile.live.com/Services
มี Services อื่นๆให้เชื่อมต่อกับ Windows Live ด้วย
พอsetup Windows Live - Facebook เสร็จ
จะทำให้ อะไรที่พิมพ์เข้าไปใน quick message ของ MSN จะไปปรากฎใน Facebook status เอง
(โดยใช้ facebook application อันนี้ http://www.facebook.com/apps/application.php?id=30713015083)
รวมถึงจะเอา สิ่งที่เพื่อนๆโพสต์ใน Facebook ไปปรากฎบนหน้า Home ของ Windows Live ด้วย
..........ว่าแต่ใครจะไปเข้าหน้า Windows Live เพื่อดูstatus facebook ล่ะ???
//-------------------------------------------------------//
ด้วยความสนใจเลยเข้าไปดูหน้าที่เป็น Facebook App ที่ชื่อ Windows Live Messenger
Appตัวนี้ยังมีความสามารถ ทำให้เรา chat online กับเพื่อนในMSNเรา ผ่านหน้าเวปหน้านั้นด้วย
คิดว่าน่าจะมีประโยชน์ เอาไว้ไปเล่นเครื่องอื่นที่ไม่ได้ลง MSN เอาไว้
*อัพเดต Windows Live หน้า Home ก็ทำ online chat ได้ด้วย (เพิ่งเห็น)
ภาพด้านขวา ของหน้า Home ใน Windows Live
ถ้า sign-in ไว้สองที่ ก็ส่งข้อความไปทั้งสองที่ด้วย??
แปลกดีแฮะ เมื่อก่อนต้องบังคับให้sign-outที่อื่นโดยไม่มีข้อแม้นี่นา
แต่ก็ดีละแบบนี้
http://profile.live.com/Services
มี Services อื่นๆให้เชื่อมต่อกับ Windows Live ด้วย
พอsetup Windows Live - Facebook เสร็จ
จะทำให้ อะไรที่พิมพ์เข้าไปใน quick message ของ MSN จะไปปรากฎใน Facebook status เอง
(โดยใช้ facebook application อันนี้ http://www.facebook.com/apps/application.php?id=30713015083)
รวมถึงจะเอา สิ่งที่เพื่อนๆโพสต์ใน Facebook ไปปรากฎบนหน้า Home ของ Windows Live ด้วย
..........ว่าแต่ใครจะไปเข้าหน้า Windows Live เพื่อดูstatus facebook ล่ะ???
//-------------------------------------------------------//
ด้วยความสนใจเลยเข้าไปดูหน้าที่เป็น Facebook App ที่ชื่อ Windows Live Messenger
Appตัวนี้ยังมีความสามารถ ทำให้เรา chat online กับเพื่อนในMSNเรา ผ่านหน้าเวปหน้านั้นด้วย
คิดว่าน่าจะมีประโยชน์ เอาไว้ไปเล่นเครื่องอื่นที่ไม่ได้ลง MSN เอาไว้
*อัพเดต Windows Live หน้า Home ก็ทำ online chat ได้ด้วย (เพิ่งเห็น)
ภาพด้านขวา ของหน้า Home ใน Windows Live
ถ้า sign-in ไว้สองที่ ก็ส่งข้อความไปทั้งสองที่ด้วย??
แปลกดีแฮะ เมื่อก่อนต้องบังคับให้sign-outที่อื่นโดยไม่มีข้อแม้นี่นา
แต่ก็ดีละแบบนี้
Subscribe to:
Posts (Atom)