How did I found RCE on SHAREit which rewarded $$$ bounty
The SHAREit web server was vulnerable to Log4Shell (CVE-2021-44228) because it used a vulnerable version of Log4j. An attacker could send a crafted request to trigger remote code execution, as confirmed by out-of-band DNS and LDAP callbacks.
Published on infosecwriteups.com
Hello all, hope y’all are doing great. My name is Suprit, Hacker name- s3ctat0r and today we’re going to learn a critical vulnerability.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
SHAREit runs a Vulnerability Disclosure Program, which the author also calls a bug bounty program. The target in this story is a SHAREit web server, and the vulnerability is CVE-2021-44228, the Log4j issue commonly known as Log4Shell. The author, Suprit Pandurangi (hacker name s3ctat0r), hunted it together with his friend and mentor Dilipdubey (hacker name brutlix). The bug had already been fixed by the time the story was published, which is why it could be disclosed publicly.

Log4j is a Java-based logging utility that lets developers output messages from their application to various targets: the console, a file, a database or a remote server. It offers a configurable logging framework with control over log levels, message formatting and filtering, organises loggers hierarchically, and supports appenders that write log messages to different outputs. In December 2021 a critical vulnerability was found in Log4j versions 2.0 to 2.15 that could allow attackers to execute arbitrary code remotely. Users are advised to update to the latest version (2.16.1 as of February 2023) or take other mitigating measures.
Setup
The tools used were subfinder and assetfinder for subdomain enumeration, plus Burp Suite with its proxy, Repeater and Collaborator client. The author's recon methodology is:
Subdomain enumeration > Fuzzing > analyse APIs like shodan, censys, etc > Templating > Manual Testing
In the recon phase the author normally uses subfinder and assetfinder to enumerate subdomains. This time he added API keys to subfinder, and as expected there were a greater number of results. While templating during reconnaissance, the pair discovered CVE-2021-44228, which results in Log4Shell.
Finding it
After the analysis, manual testing began on the web server. They visited the webpage and started to manipulate the network traffic captured in the Burp proxy. After trying harder, they discovered that the accept parameter was vulnerable.

Exploitation
Step 1: Send the payload through the accept parameter
The vulnerable input is the accept parameter of the request captured in Burp. The report does not reproduce the exact request or the payload string that was sent, so the precise syntax used is not shown here. The request was replayed in Burp Repeater, which the author calls the best friend of all bug hunters.
Step 2: Read the response and watch the Collaborator
The server answered with a 406 status code, meaning Not Acceptable. Despite that, they checked the Burp Collaborator client, because in this scenario it acts as an LDAP server.

Response from SHAREit server
The Collaborator interaction came back, which the author describes as a nice catch.
Step 3: Confirm with DNSLog
For further confirmation of the RCE vulnerability they investigated with a DNSLog server as well.

As expected, they got results there too.
Root cause
The report does not document the server-side path that turned the accept input into a Log4j lookup. The report does not show the payload or the server-side code, so the exact logging path is not documented. The server answered 406, yet the Collaborator and DNSLog callbacks still came back, which is why the author checked them anyway.
Impact
The report frames this as a critical RCE vulnerability on SHAREit's web server, confirmed through the Collaborator and DNSLog callbacks. The report does not describe what an attacker could execute or which data was reachable.
Fix
The vulnerability was reported to SHAREit, and after a day of reporting, the bug had been patched within 24 hours. The general remediation for CVE-2021-44228 is to upgrade Log4j to a fixed version such as 2.16.1 or later, or to apply the mitigating measures described above.
Variants to test
- Replay requests with a modified
acceptparameter and watch for Collaborator or DNSLog callbacks, even when the response is an error such as 406. - Test other user-controlled fields that are likely to be logged, such as user agents and referrers, and check for out-of-band interaction.
- Run subfinder with API keys to widen subdomain coverage, then template known CVEs against the results before manual testing.
- Use both an LDAP-capable Collaborator and a DNSLog server, as the author did for confirmation.
What happened, in plain words
A security researcher found a serious bug in a web server belonging to SHAREit, the file-sharing app. The bug is called Log4Shell (its official name is CVE-2021-44228). It is a critical flaw that can allow attackers to execute arbitrary code remotely.
The researcher, Suprit Pandurangi (online name s3ctat0r), hunted together with his friend and mentor Dilipdubey (online name brutlix). By the time the story was published the bug had been fixed, which is why it could be told in public.

This beginner version walks through the same steps in the same order. Along the way it explains every term from scratch, because the story touches on a lot of ideas that are second nature to people who hunt bugs for a living: subdomains, APIs, proxies, HTTP headers, logging libraries, and the trick of making a server call back to you.
The bug: Log4Shell
Before the hunt, you need to know what was being hunted.
Log4j is a Java-based logging utility. A logging utility is a small piece of software that a program uses to write down what it is doing: "a user logged in", "a request arrived", "something failed". Think of it as a diary that the program keeps for itself. Developers read that diary when something goes wrong, to work out what happened.
Log4j lets developers output messages from their application to various targets: the console, a file, a database or a remote server. It offers a configurable logging framework with control over log levels, message formatting and filtering. It organises loggers hierarchically, meaning each logger has a name that reflects its position in a tree, and a logger can inherit settings from its parent or override them. It also supports appenders, which are the parts responsible for writing log messages to different outputs. Developers can pick from built-in appenders or write their own.
Log4j has been widely used in the Java community for many years and is maintained by the Apache Software Foundation. In December 2021 a critical vulnerability was found in Log4j versions 2.0 to 2.15 that could allow attackers to execute arbitrary code remotely. Users are advised to update to the latest version (2.16.1 as of February 2023) or take other mitigating measures.
Why is a diary dangerous? Because a diary writes down whatever it is given. If a program writes a visitor's input into the diary without checking it, and the diary software itself has a flaw, the visitor's text can turn into instructions. That is the heart of Log4Shell: the logging library treats certain text as a command to go and fetch something from elsewhere, and an attacker can put that text into a field the server logs.
Recon: finding the target
The author believes that recon is the real success for bug hunting. Recon, short for reconnaissance, is the homework phase: before attacking anything, you map out what exists. It is like walking around a building before trying the doors, noting which windows are open and which signs are up.
The pair were hunting on SHAREit's Vulnerability Disclosure Program, which the author also calls a bug bounty program. A vulnerability disclosure program is an arrangement where a company says: if you find a security problem in our systems, tell us instead of using it, and here is how to reach us. A bug bounty program goes one step further and pays a reward, the bounty, for good reports.
In the recon phase the author normally uses subfinder and assetfinder to enumerate all the subdomains. Two terms to unpack here.
A subdomain is a smaller name inside a bigger one. If example.com is the main building, shop.example.com and mail.example.com are separate wings of it. Companies often have many wings, and some are forgotten, old or less protected than the main site. Finding them is a standard first move.
Subfinder and assetfinder are tools that do this enumeration automatically: they collect subdomain names from public sources so you do not have to guess them one by one.
This time the author thought to add API keys to subfinder, and as expected there were a greater number of results. An API key is a secret string that identifies you to a service, a bit like a membership card that lets you into a members-only section. Some data sources only answer requests that carry a key, so adding keys lets the tool ask more sources and come back with more names.
The author's recon methodology is:
Subdomain enumeration > Fuzzing > analyse APIs like shodan, censys, etc > Templating > Manual Testing
Read that as a recipe, left to right:
- Subdomain enumeration: collect the names of all the wings of the building.
- Fuzzing: throw lots of varied inputs at a system and watch how it reacts, looking for something that behaves differently.
- Analyse APIs like shodan, censys, etc: services such as Shodan and Censys keep public records about machines connected to the internet, so you can learn what software a server runs without touching it.
- Templating: run ready-made checks for known vulnerabilities against the list of targets. A template here is a reusable test, like a checklist item that a tool can apply automatically to many hosts.
- Manual Testing: once automation points at something interesting, a human pokes at it by hand.
During the reconnaissance phase, while templating, they discovered CVE-2021-44228, which results in Log4Shell. CVE stands for Common Vulnerabilities and Exposures: it is a public catalogue number given to a known security flaw, so everyone can refer to the same bug by the same name. The author describes CVEs as 0day bugs whose way of exploitation may already be available in the market. A 0day (zero-day) is a flaw that the vendor does not yet know about or has not yet fixed, so defenders have had zero days to prepare.
Manual testing: poking the web server
After the analysis, manual testing began on the web server. They visited the webpage and started to manipulate the network traffic captured in the Burp proxy.
A proxy is a middleman that sits between your browser and the website. Instead of your browser talking straight to the server, it talks to the proxy, and the proxy passes the message on. The point is that the proxy can show you every message and let you edit it before it is sent. Burp Suite is a popular tool for exactly this.
Network traffic here means the requests and responses: your browser asks for a page (a request), the server answers (a response). Each request carries extra pieces of information called headers, which are labelled fields such as what kind of content the browser will accept. A parameter is a named value sent along with a request, often in the address or in the body.
After trying harder, they discovered that the accept parameter was vulnerable. In other words, one of the fields sent with the request turned out to be vulnerable.

Exploitation
Step 1: Send the payload through the accept parameter
The vulnerable input is the accept parameter of the request captured in Burp. A payload is the actual text an attacker sends to trigger the flaw: the content of the message rather than the envelope.
The report does not reproduce the exact request or the payload string that was sent, so the precise syntax used is not shown here. What it does say is that the request was replayed in Burp Repeater. Repeater is the part of Burp that lets you take one captured request, edit it, send it again and again, and read each response. The author calls it the best friend of all bug hunters, because it turns a single observation into a controlled experiment: change one thing, send, look.
Step 2: Read the response and watch the Collaborator
The server answered with a 406 status code, meaning Not Acceptable. A status code is the short number a server sends back to say how the request went: 200 means fine, 404 means not found, and 406 means the server will not accept the request as formulated.
Despite that, they checked the Burp Collaborator client, because in this scenario it acts as an LDAP server. This is the clever part, so it is worth slowing down.
Burp Collaborator is a service that gives you a unique address you control, and it records any contact made to that address. It is like leaving a phone with a caller ID log: you do not need to speak to anyone, you just check whether the phone rang and who called.
LDAP is a protocol for looking things up in a directory, similar in spirit to a phone book: you ask a directory server for an entry and it answers. In Log4Shell, the vulnerable logging library can be tricked into treating text in a logged message as an instruction to look something up in a directory. If the attacker points that lookup at their own directory server, the server under attack will connect out to it. That outgoing connection is the proof: the target reached out to a machine the attacker chose.
So the 406 did not stop the author from checking the Collaborator, and the callback still arrived. This is why the author checked the Collaborator anyway: the interesting event is not the reply to the browser, it is the server quietly making a connection somewhere else. Such a connection is called out-of-band, meaning it happens on a separate channel from the normal request and response.

Response from SHAREit server
The Collaborator interaction came back, which the author describes as a nice catch. In plain words: the phone rang, and the caller was the SHAREit server.
Step 3: Confirm with DNSLog
For further confirmation of the RCE vulnerability they investigated with a DNSLog server as well.
RCE stands for remote code execution: the attacker can make the target machine run code of their choosing, from a distance. It is the difference between someone reading your diary over your shoulder and someone sitting at your desk writing in it.
DNS is the system that turns names like example.com into the numeric addresses computers use to find each other. It is the internet's phone book. A DNSLog server is a service that records every DNS lookup made against names it controls. If the target server looks up a name you own, the DNSLog shows it.
Why confirm twice? Because two independent signals make the conclusion much stronger. The Collaborator and the DNSLog both returned results, which the author took as confirmation. If both light up, you are not looking at a coincidence or a stray scanner.

As expected, they got results there too.
Root cause
The application logs attacker-controlled input from the accept parameter through a vulnerable Log4j version, so a lookup expression in that input is resolved by the logging library. The report does not show the payload or the server-side code, so the exact logging path is not documented. The 406 response shows that the request was rejected at the HTTP level while the lookup had already been processed, which is why the Collaborator and DNSLog callbacks matter more than the status code.
In everyday terms: the input reached the vulnerable logging library, and the researcher's servers recorded the resulting contact. The directory server belonged to the researcher, so the researcher saw the question arrive.
Impact
The report frames this as a critical RCE vulnerability on SHAREit's web server, confirmed through out-of-band interaction with a Collaborator LDAP server and a DNSLog server. The report does not describe what an attacker could execute or which data was reachable.
Fix
The vulnerability was reported to SHAREit, and after a day of reporting, the bug had been patched within 24 hours. The general remediation for CVE-2021-44228 is to upgrade Log4j to a fixed version such as 2.16.1 or later, or to apply the mitigating measures described above.
For a beginner, the lesson is simple: keep the diary software up to date, and never let a visitor's words be written into it unchecked.
Variants to test
- Replay requests with a modified
acceptparameter and watch for Collaborator or DNSLog callbacks, even when the response is an error such as 406. - Test other user-controlled fields that are likely to be logged, such as user agents and referrers, and check for out-of-band interaction. A user agent is the header where the browser says what it is; a referrer is the header that says which page you came from. Both often end up in logs.
- Run subfinder with API keys to widen subdomain coverage, then template known CVEs against the results before manual testing.
- Use both an LDAP-capable Collaborator and a DNSLog server, as the author did for confirmation.
Glossary
- 0day (zero-day): a security flaw the vendor does not yet know about or has not yet fixed, so defenders have had no time to prepare.
- API: an interface that lets one program ask another for data or actions, like a service counter where you make a request and get a defined answer.
- API key: a secret string that identifies you to a service, like a membership card for a members-only section.
- Appender: the part of a logging library that writes log messages to a particular output, such as a file or a remote server.
- Bug bounty program: an arrangement where a company pays a reward for well-reported security problems found in its systems.
- Burp Collaborator: a service that gives you an address you control and records any contact made to it, used to detect out-of-band connections.
- Burp Repeater: the part of Burp Suite that lets you edit a captured request, resend it repeatedly and read each response.
- Burp Suite: a toolkit used to intercept, inspect and modify traffic between a browser and a website.
- Callback: an outgoing connection from the target to a server the researcher controls, used as proof that the target processed the input.
- CVE (Common Vulnerabilities and Exposures): a public catalogue number given to a known security flaw so everyone can refer to the same bug by the same name.
- DNS (Domain Name System): the internet's phone book, turning names into the numeric addresses computers use.
- DNSLog server: a service that records every DNS lookup made against names it controls.
- Enumeration: systematically listing things that exist, such as all subdomains of a company.
- Fuzzing: sending lots of varied inputs to a system and watching for behaviour that differs from the norm.
- Header: a labelled field sent along with an HTTP request or response, carrying extra information such as accepted content types.
- HTTP status code: the short number a server returns to say how a request went, such as 200 for success or 406 for not acceptable.
- LDAP: a protocol for looking things up in a directory, similar in spirit to a phone book.
- Log4j: a Java-based logging utility used by applications to write down what they are doing.
- Log4Shell: the common name for CVE-2021-44228, a critical flaw in Log4j versions 2.0 to 2.15 allowing remote code execution.
- Logging: the practice of a program writing down events for later inspection.
- Out-of-band: happening on a separate channel from the normal request and response, such as the target connecting out to another server.
- Parameter: a named value sent with a request, often in the address or the body.
- Payload: the actual text an attacker sends to trigger a flaw.
- Proxy: a middleman between your browser and a website that can show and modify the messages passing through.
- RCE (remote code execution): a flaw that lets an attacker make a target machine run code of their choosing from a distance.
- Recon (reconnaissance): the homework phase of mapping out what exists before testing it.
- Referrer: the header that says which page a request came from.
- Subdomain: a smaller name inside a larger domain, such as
shop.example.cominsideexample.com. - Subdomain enumeration: automatically collecting the subdomain names of a target from public sources.
- Template (templating): a reusable automated check for a known vulnerability that a tool can apply to many hosts.
- User agent: the header in which a browser says what it is.
- Vulnerability Disclosure Program: a company's published channel for receiving security reports from outsiders.