How to Trace a Phone Hacker: Code to Check if Phone is Hacked

When it comes to the modern online world, there is little doubt that you should have security at the top of your priority list. And you don’t need a computer science degree to secure your online presence.

To help you navigate this process, this guide will cover everything you need to know about checking to see if your phone is hacked or tracked, using code to check if yur phone is hacked, and even using a number to dial to see if your phone is tapped. With the help of these codes and numbers, you can learn more about your smartphone settings and begin to work out a plan for your security.

You can also find out if your text messages and other information is safe or not. Most of all, though, with the short codes shown below, you’ll know for sure if someone is tracking you.

We have searched the internet and gathered a list of the most useful and critical codes to check if your phone is hacked. We’ll also share some tips and tricks for boosting your online security.

Without further ado, let’s dive in.

a person successfully hacking a phone through a laptop

Code *#21#: To Check Diversion Commands on Your Phone

The “diversion” code is an important code to check if you believe your phone is hacked. It will tell you if someone or something is diverting your data, messages and/or calls. It can also show you the number your information is going to.

a person holding a phone facing towards the camera indicating that it has been hacked or used for hacking

What to dial if your phone is hacked? *#21#

What is *#21# Meaning? 

It is a system call on your smartphone to retrieve all the forwarding settings, this will show you if any service on your phone is automatically forwarding your information.

So who is this function for? Well, anyone can use it to check on the status of their security, but the code is particularly useful for parents/guardians and caregivers.

Parents can protect their kids from hacking and tracking, while you can protect yourself from spam or cybercriminals. This function is especially great for older adults, as caregivers and family members can use it to confirm their phone’s security is intact.

If you lend your phone to a stranger on the street, even if for a single call, then you need to check your phone with this code.

Hackers posing as innocent strangers can steal and sell your phone number, residential address, accounts and other private information. Hackers might even know who your family and friends are, as well as your online habits and daily activities. Hackers can gain intimate knowledge about a person’s financial circumstances and then pass this information to other criminals.

Call diversions are notorious for staying hidden since, unlike in many other hacking instances, the user’s phone doesn’t have any record of it. In a call redirection, some red flags might show up on your phone bill at the end of the month.

Code *#62*: Useful To Tackle Redirection Code on Your Mobile Phone

There are tons of ways someone can try to track you. This is where the redirection code comes in handy. If you feel that someone is redirecting your data, messages and calls, all you have to do is dial the *#62* (*#62#on iPhones) redirection code to check if your phone is hacked.

a person using a smartphone being alerted that his data has been breached

Moreover, if you have an inkling that your contacts can’t connect to you through messages, calls or other online messaging services, then you need this code. There’s a strong chance that someone is redirecting your voice calls. Most of the time, it is your smartphone operator’s number to which your voice calls are redirected to, but it can be any hacker’s number as well.

Dial this redirection code (also known as the phone tapping code) to check if your phone has been hacked. In return, your phone will display a list of numbers that may be receiving your voice messages along with SMS messages and internet data.

Code ##002#: To Undo Redirection and Diversion

This is another useful code you can use to check if your phone has been hacked. It switches off any form of hidden redirection away from your smartphone.

Pro Tip:

If you want to use the roaming feature on your phone, it’s a good idea to use this code before you do so.

This code to check if your phone is tapped will also help you save money if you’ve been hacked. If you find out your phone has been consuming suspicious amounts of data, fixing this problem would mean that your phone bill might not be as high. Any command that is redirecting phone call attempts or SMS messages and other personal data from your cell phone to another will be removed from your device.

Code *#06#: To Check IMEI Information on Your Device

This code is particularly helpful if you lose your smartphone. With this code, you can find your exact International Mobile Equipment Identifier (or IMEI).

an image of a hacked smartphone

If someone steals your mobile phone and you have noted down this number, then you can locate your phone again. When your stolen phone is turned on, your network operator automatically receives your phone location, even if the person who has your phone uses a different SIM card.

What happens if someone other than you knows your smartphone’s IMEI number? Well, they can find a lot about the technical specifications of your phone, including the make and model of the device and your cell ID.

So, make sure you note down the IMEI number in case your phone is hacked or stolen.

How To Find the Location of Your Smartphone

You can find the location of your smartphone from any corner of the world. You just need to learn how.

an image showcasing how a smartphone can be used to write lines of codes potentially used for data breach

Did you know that smartphones have special codes that enable anyone to track your current location? Some special codes can also show if someone is following you.

To find out this information, you’ll need to install a utility netmonitor. You can take advantage of the utility netmonitor feature by first knowing the utility netmonitor code. Keep in mind that the utility netmonitor code will differ depending on the operating system of your device.

To get started, type the following utility netmonitor code on your phone, depending on the operating system you use:

  • If you have an iPhone, type this code: 3001#12345#
  • If you have an Android phone, type this code: ##4636##
  • If you have an Android phone and the above code doesn’t work for you, then type: *#*#197328640#*#*

After you’ve done that, follow these steps:

  1. Go to your phone’s UMTS Cell Environment section.
  2. Then, go to UMTS RR info.
  3. Note down everything under the heading that says Cell ID. These numbers are for local stations based near your location. By default, smartphones automatically connect to the base station that emits the best possible signal.
  4. Go back to your main menu.
  5. Click the tab that says MM info.
  6. Click the option that says Serving PLMN.
  7. After that, note down all the numbers listed under the heading Local Area Code or LAC.

an unknown person in a hoodie using a smartphone to hack a system

Now you should have two numbers from the previous three steps. Using those two numbers and this website, you can calculate your phone’s location and area code on the map. In reality, though, you will only know the location of the base station that your smartphone is connected to at that moment, but at least something is better than nothing.

But there are some suspicious base stations as well, particularly mobile base stations. Mobile base stations are large antennas that are placed on a small truck or bus. Sometimes, people use these vehicles in places where is there is very little internet coverage.

But if you see one of these near your location and you live in a city, then it’s highly likely that someone is trying to spy on someone—or even you.

There has to be a logical reason for a mobile base station near your location. Otherwise, be on your guard.

Should You Use an Antivirus Software for Your Smartphone?

Hackers and cybercriminals can spy on you, your home and your family. If you have an Android phone, you must regularly check for potential viruses.

One of the most dangerous viruses that can infect your mobile device is a program known as PlaceRaider. Cybersecurity researchers developed this virus in 2012 to demonstrate how vulnerable our smartphones really are.

Once PlaceRaider infects a device, it takes a logical series of pictures of the smartphone’s surrounding area. PlaceRaider is a type of Trojan, which is a seemingly innocent yet highly malicious virus that can go undetected in a victim’s computer or mobile device.

PlaceRaider then creates a detailed 3D model of the place where the user is located. This Trojan searches for nearby internet connections and links itself to that network.

Finally, it sends the collected data to the operator of the Trojan. PlaceRaider can also steal your passwords and share them with hackers.

an image of a smartphone sitting on top of a laptop keyboard indicating that it has been hacked and the security has been breached

This example underscores the importance of antivirus software. These programs can check if your phone is hacked or compromised by malware, spyware, ransomware and other viruses.

An antivirus software program is always something you should have in your cybersecurity arsenal.

Secret Services and How They Listen in on You via Your Smartphone

Cell phone operators and internet service providers cooperate with national security agencies in almost all countries of the world. They can do so for any of their company’s customers. Government surveillance exists in some fashion in most countries worldwide.


In many countries, such as the U.S., security agencies first have to present a warrant to the cell phone operator. Only a court can issue this warrant so that law-abiding citizens have nothing to worry about.

a network of people showcasing how easily smartphones can connect to one another and potentially hack each other

However, if cell phone operators want to, they can provide government agencies data from any customer’s three-month usage. If a security agency has tapped your smartphone, you usually don’t know it until it’s too late.

But what if your phone makes weird noises while you engage in conversation with your contacts? What if your phone loses its battery percentage a bit too quickly? What if it also overheats rapidly or restarts unexpectedly? All of these are signs that you might need to go to a phone repair expert to get your device fixed.

In other words, there are no telltale signs that a security agency is listening in on your conversations.

Phone conversations are usually useless because they require too many resources to analyze. So agencies or hackers who want to listen in to your phone calls don’t have any incentive to do so.

It’s much more productive for them to set up special bug devices in a target’s home or place of business. You can use radio wave detectors to check if there are bugs present in your home or building.

To avoid spying from your internet service provider or cell service operator, consider using a virtual private network or VPN.

For more information on this, check out our complete VPN guide.

How To Protect Your Smartphone From Spies and Criminals

One of the best things you can do to protect your smartphone communications is to avoid using messaging apps that aren’t secure. Stay away from WhatsApp and Viber, and only use platforms that utilize end-to-end encryption.

Here are some of the most popular end-to-end encrypted messaging apps available today:

a holographic image of how a smartphone can be traced on a worldwide basis

You should always have a clear understanding of what information you want to share with others. Don’t allow anyone to gain unlimited access to your sensitive information.

Avoid using your phone number or cell ID to sign up for online services. Don’t let information about your loved ones roam around, either.

Here are some more cybersecurity tips to be aware of:

  • Never install programs that you don’t know anything about, even on legitimate platforms like the Google Play Store or Apple App Store. Check to see if the app is legitimate by checking the developer site in the app listing. Use this information to verify that the app is connected to a legitimate source.
  • Always keep a close eye on which apps you have downloaded and installed on your phone. If you find an app you don’t recognize or remember downloading, delete it and check to see if you can find anything about it in the news.
  • Always use multiple security locks and two-factor authentication.
  • If you think a link is unsafe, don’t click on it. If it looks suspicious, it probably is.
  • Don’t click on any links or open attachments from sources that you don’t know. This includes random emails and text messages. Always check the source of an email to see if it’s connected to one of your contacts. Even then, proceed with caution if the message is out of character for that person.
  • Don’t ever click on pop-ups. You can avoid intrusive advertisements and pop-ups by installing an ad-blocker on your device.
  • Don’t connect your smartphone to free charging access points.
  • Remember, the only entity that can carry out tracking services is your cell phone operator. Even your cell phone operators can’t do it if you don’t give them your explicit approval.
  • Don’t fall for websites that promise to find the location of other people from your smartphone. These sites are typically designed to trick you into sharing your personal information. So, it’s best to avoid them.

How To Protect Your Smartphone From Being Hacked or Tracked

The most important thing you can do is to make sure you never lose possession of your phone. That alone will eliminate many of the ways in which hackers can gain private information and/or track your device.

Another key step is to encrypt all of your devices. Encryption can ensure that no third party can get access to your phone calls, call logs, text messages and other personal data.

Most modern phones automatically encrypt your information these days. Apart from that, you can use the SIM card locking feature on your phone to further keep hackers at bay.

Pro Tip:

Always turn off Bluetooth and Wi-Fi features when you aren’t using them. This will not only keep you safe from many types of attacks but will also prolong battery life.

Most importantly, get into the habit of using a VPN service and an antivirus program on your mobile phone. There are plenty of VPN and antivirus apps for both Android and iPhone in the market today, so you really have no reason to stay unprotected.

How Are Phones Tracked?

If you have a phone and a connection with any mobile network, your operator can know your location. There is nothing sinister about it by default because that’s how modern mobile networks work. This technique is known as triangulation.

an image of location services running on a smartphone device

Mobile signal tracking via towers happens when an operator records the signal strength that various network towers near your location send to the operator. Different signal strengths from different towers can help operators identify your phone location and track you.

This type of tracking is not exact, though. The most that operators can know is which block you are currently in. However, with the right access and resources, they can take it up a notch.

Government security agencies and other third-parties can track your phone by collecting your location data more directly. In such cases, they use what is called a cell-site simulator. As the name suggests, it is essentially a fake network tower masking as a real one. Your phone then connects to it, thereby exposing your location.

Another method that agencies use is Bluetooth and Wi-Fi tracking. All mobile devices work with a mobile network interface so you can send and receive phone calls. In addition to that, phones also have Bluetooth and Wi-Fi features that can act as radio transmitters.

Although a mobile signal is more powerful, law enforcement agencies and hackers can use specialized antenna equipment to catch Wi-Fi and Bluetooth signals from your device.

Most of the time, a hacker would record your MAC address by analyzing the wireless signals from your device. The problem with this is that even if you don’t have any wireless network connection, the hacker can still get the MAC address.

Plenty of businesses use this technique to track the length of time a customer spends in their store. Operators behind any Wi-Fi network can also see your MAC address and recognize your device, thus identifying you as the user.

Another way your phone can be tracked is through different web browsing sessions and apps. Modern cell phones can use GPS technology to determine their own location. Different websites and services, such as Google Maps or Apple Maps, can ask for this location information.

Nothing is stopping these apps and websites from transmitting that location data to another service provider. Hackers and government agencies can trick the developer of the app or the website into giving up your location information.

Ultimately, all of these phone-tracking techniques track your movements over a long period of time rather than at a given instant. In most cases, no one will track you on a second-by-second basis.

However, they can match your location data with metadata to determine where you’ve been on a given day. In fact, apps and services regularly use customers’ location data for advertising purposes.

With your metadata, they can identify circumstantial information about your life, such as your relationship status, your favorite activities, your career field, your favorite places to travel, and more. They can then use this information to present relevant ads and sell you products.

They can also know if you went to a protest or visited a particular location at some point in time. There are tools that can co-relate location data from two devices and know the relationship between the users of two devices in question.

How Are Phones Hacked?

There are a ton of ways hackers can compromise your cell phone. The most common is hacking applications.

Spy apps, malware apps and other tools are freely available online, even on legitimate platforms such as the Google Play Store and Apple App Store. Then there are other spy apps available on third-party platforms that don’t cost a cent to download and use.

Most of the time, though, hackers first have to find a way to get a spy app onto the target’s mobile phone. In some cases, they don’t even need to be near the device physically.


Once a user downloads a spy app or a spy app makes its way onto the target device, the hacker uses keylogging processes or Trojan viruses to access the victim’s data.

This is where techniques like phishing come into play. Fundamentally, hackers impersonate a legitimate site like Facebook or Gmail and trick you into giving up your login credentials. Hackers can also exploit the SS7 signaling system that all phone networks use to connect devices to each other to record calls, access phone call logs, read messages, forward calls and find users’ locations.

In addition to these methods, hackers can take advantage of Bluetooth and SIM card technologies to get hold of the user’s personal data.

Zohair A. Zohair is currently a content crafter at Security Gladiators and has been involved in the technology industry for more than a decade. He is an engineer by training and, naturally, likes to help people solve their tech related problems. When he is not writing, he can usually be found practicing his free-kicks in the ground beside his house.

7 thoughts on “How to Trace a Phone Hacker: Code to Check if Phone is Hacked”

    • Hi Anonymous.
      Thanks for the comment.
      It really depends on your connection.
      We’re assuming that since you want to get to the UMTS cell environment section you have a 3G connection. Now if you have a 3G connection you should press *3001#12345#* and enter the Field Test Mode.
      From there click the option that says UMTS Cell Environment.
      Did you install netmonitor or not?

Leave a Comment