I was sent this E-mail from Facebook
I don't have time to decipher it.It's self modifying Javascript code. It's seems to also randomly encrypt itself to hide signatures. Maybe I am overestimating it but I don't think so.
Friend Xyz suggested you like Only 5% of rocket scientists know the answer to this...
Friend liked Only 5% of rocket scientists know the answer to this on Facebook and suggested you like it too.To see more details and confirm this invitation, follow the link below:
http://www.facebook.com/n/?
It answer this question, they trick you in to copy and pasting this long string of scrambled Javascript in to your browsers URL windows, thereby running it.
Once there they get you to do this.CTRL C - copy
ALT D - Move Focus to URL bar
CTRL V - past and it runs because there is /n at the end.
After inspecting it I figured what the hell and ran it. SO if you get something you'll know what it was.
From there it just seem to hang.
function(){
a='app126063127406590_jop';
b='app126063127406590_jode';
ifc='app126063127406590_ifc';
ifo='app126063127406590_ifo';
mw='app126063127406590_
eval(
function(p,a,c,k,e,r){
e=function(c){
return(c
if(!''.replace(/^/,String)){
while(c--)r[e(c)]=k[c]||e(c);
k=[function(e){return r[e]}];
e=function(){return'\\w+'};
c=1};
while(c--)
if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),
return p
}('
Pe=[
"\\p\\g\\l\\g\\I\\g\\k\\g\\h\\
d=M;d[e[2]](1a)[e[1]][e[0]]=
d[e[2]](a)[e[4]]=d[e[2]](b)[e[
s=d[e[2]](e[6]);
m=d[e[2]](e[7]);
N=d[e[2]](e[8]);
c=d[e[10]](e[9]);
c[e[12]](e[11],E,E);
s[e[13]](c);
B(C(){1b[e[14]]()},O);
B(C(){1c[e[17]](e[15],e[16]);
B(C(){c[e[12]](e[11],E,E);
N[e[13]](c);
B(C(){F=M[e[19]](e[18]);
1d(i 1eF){1f(F[i][e[5]]==e[1g]){F[
m[e[13]](c);
B(C(){d[e[2]](1h)[e[4]]=d[e[2]
d[e[2]](e[1j])[e[1]][e[0]]=e[
',62,85,'||||||||||||||_
{}))})();
RAW as it arrived.
javascript:(function(){a='
Further analysis: Gemini ai.
However, this specific code is broken and will not work. It contains programming errors that will cause it to fail immediately.
Here is a breakdown of what it tries to do and why it fails.
🧐 What It Tries to Do (Its Intent)
The code is "obfuscated" (intentionally scrambled) to hide its purpose. After de-obfuscating it, we can see its goal is to perform actions on a specific Facebook application (with the ID app126063127406590).
The script's intended actions are:
Hide the App: It first tries to hide the application's main wrapper on the page (the element with ID
app126063127406590_mwrapper).Access Your Friends List: It contains a URL to fetch a list of up to 5,000 of your Facebook friends. This is a common tactic for spam scripts, which use the list to tag all your friends in a post.
Post a Status: It finds Facebook's status update elements, including the text area (
composer_text_field) and the submit button (composer_submit).Perform Spam Actions: The ultimate goal is almost certainly to automatically post spam to your profile (and possibly tag your friends) on your behalf, all while hidden.
🛑 Why This Code Is Broken and Fails
This script won't work because it's badly written. It errors out on one of its first steps.
The script tries to run this line of code:
c = document.getElementsByTagName("createElement")
This is an error. The programmer likely confused getElementsByTagName (which finds existing elements) with createElement (which creates a new one).
Immediately after, the script tries to call c.setAttribute(...), but c is not a single element; it's a list of elements (an HTMLCollection). This action fails and throws a fatal JavaScript error, stopping the entire script from running any further.
Even if it got past that error, it has other, similar errors later on (like trying to call fs.responseText(...) as if responseText were a function).
⚠️ Security Warning
You should never run unknown, obfuscated code in your browser's address bar or as a bookmarklet.
It's a common way to execute a Cross-Site Scripting (XSS) attack.
If the code were functional, it could steal your login information, compromise your account, post spam, or send messages to all your friends without your permission.
Delete this bookmarklet immediately.
Further analysis: Meta.ai
Whoa, that's some heavily obfuscated JavaScript code!
It looks like the code is using a technique called "packing" to compress and obscure the original code. The eval function is used to execute the unpacked code.After deobfuscating the code, it appears to be a Facebook-related script that interacts with the page's DOM. Here's a high-level summary:- It defines several variables and functions, including
a, b, ifc, ifo, mw, and others. - It uses
document methods to access and manipulate HTML elements, such as getElementById and appendChild. - It sets up several timeouts using
setTimeout to execute functions at specific intervals (e.g., 5000ms, 2000ms, 4000ms, etc.). - The code seems to be interacting with Facebook's Social Graph API, possibly to fetch or update data.
Without more context, it's difficult to provide a more specific explanation. Can you tell me where you encountered this code?
Also, keep in mind that executing unknown JavaScript code can be a security risk. If you're unsure about the code's origin or purpose, it's best to avoid running it.how do I de-obfuscate it?De-obfuscating JavaScript code can be a challenging task, but I'll guide you through the process.Method 1: Manual De-obfuscation- Identify the packing technique: In this case, the code uses a simple string replacement technique, where the original code is encoded as a string and then unpacked using a function.
- Extract the unpacking function: The unpacking function is the code inside the
eval statement. Copy it into a separate file or a JavaScript console. - Replace the encoded string: Replace the encoded string (
Pe array) with a decoded string. You can use a JavaScript console or a text editor with regex capabilities to replace the encoded characters. - Run the unpacking function: Execute the unpacking function in a JavaScript console or a Node.js environment. This should output the de-obfuscated code.
Method 2: Using Online Tools- Use a JavaScript de-obfuscator: Websites like JSBeautifier or JavaScript Deobfuscator can help de-obfuscate JavaScript code.
- Paste the code: Copy the obfuscated code into the de-obfuscator tool.
- De-obfuscate: Click the de-obfuscate button or run the tool. The output should be the de-obfuscated code.
Method 3: Using Browser DevTools- Open DevTools: Open the browser's developer tools (e.g., Chrome DevTools).
- Create a breakpoint: Set a breakpoint at the
eval statement. - Run the code: Execute the code until it hits the breakpoint.
- Inspect the decoded string: In the DevTools console, inspect the decoded string (e.g.,
Pe array). - Copy the de-obfuscated code: Copy the de-obfuscated code from the console.
Keep in mind that some obfuscation techniques may be more complex, and these methods might not work. In such cases, you may need to use more advanced tools or techniques, such as reverse engineering or dynamic analysis.
eval function is used to execute the unpacked code.- It defines several variables and functions, including
a,b,ifc,ifo,mw, and others. - It uses
documentmethods to access and manipulate HTML elements, such asgetElementByIdandappendChild. - It sets up several timeouts using
setTimeoutto execute functions at specific intervals (e.g., 5000ms, 2000ms, 4000ms, etc.). - The code seems to be interacting with Facebook's Social Graph API, possibly to fetch or update data.
- Identify the packing technique: In this case, the code uses a simple string replacement technique, where the original code is encoded as a string and then unpacked using a function.
- Extract the unpacking function: The unpacking function is the code inside the
evalstatement. Copy it into a separate file or a JavaScript console. - Replace the encoded string: Replace the encoded string (
Pearray) with a decoded string. You can use a JavaScript console or a text editor with regex capabilities to replace the encoded characters. - Run the unpacking function: Execute the unpacking function in a JavaScript console or a Node.js environment. This should output the de-obfuscated code.
- Use a JavaScript de-obfuscator: Websites like JSBeautifier or JavaScript Deobfuscator can help de-obfuscate JavaScript code.
- Paste the code: Copy the obfuscated code into the de-obfuscator tool.
- De-obfuscate: Click the de-obfuscate button or run the tool. The output should be the de-obfuscated code.
- Open DevTools: Open the browser's developer tools (e.g., Chrome DevTools).
- Create a breakpoint: Set a breakpoint at the
evalstatement. - Run the code: Execute the code until it hits the breakpoint.
- Inspect the decoded string: In the DevTools console, inspect the decoded string (e.g.,
Pearray). - Copy the de-obfuscated code: Copy the de-obfuscated code from the console.
No comments:
Post a Comment