Monday 25 November 2013

ZDI-13-252 - Cogent DataHub Heap Overflow Remote Code Execution Vulnerability

Zero Day Initiative (ZDI) has published an advisory for a heap overflow vulnerability in Cogent DataHub which i have found few months ago. Full advisory can be read here ZDI-13-252.

Earlier this year i have also found some null pointer dereference bugs leading to a denial of service in DataHub. I will post some PoC's soon.

Tuesday 3 September 2013

Funny sudo bug

Around a month ago i was performing a task where i needed to create a user with a very large UID in the system. The required UID happened to be 2147483648 (0x80000000) exactly.

root@hive:~# adduser -u 2147483648 test1
Next i switched to the newly created user and typed sudo.
test1@hive:/$ su test1
test1@hive:/$ sudo
And this was the result:
test1@hive:/$ sudo
sudo: perm stack underflow: Invalid argument
sudo: unknown uid: 2147483647
Segmentation fault
We can see here that the UID value was wrapped to the 2147483647 value (0x7fffffff) followed by a segfault.

We can have some fun with it e.g. creating a user with the 0x7fffffff UID. This way sudo will no longer crash, but it will be called for a different user : ). The bug was tested on the 1.8.5p2 version 32-bit OS. Additional details can be found in the bug report.

Monday 18 March 2013

Skype Malware Analysis

When i came back from work today and fired up Skype, multiple messages popped up immediately. Some of them in in English and some in Polish, but all leading to the same url with "pictures" of me ; oo. Another interesting fact was that all the messages came from people working at the same company (zomg APT alert ;D).

The messages looked like this:
Messages in English and Polish encouraging to visit the links
We check what is behind the url shortener:
zip file !
Crunchpress seems to be a 'hacked' website:
crunchpress image folder with some aditional content
Lets download and unzip it:
Oh noez! no pics just exe : (
Quick scan @ gives 7/44 and identifies the file as a dropper:
virustotal results
Not surprisingly it downloads something using HTTP protocol:
Actual bad stuff downloaded here
Let's see what we have there. First some quick geo localization request:
hi ho
Next a list of 'unwanted' domain names is downloaded (full list available here).