Dương Minh Nhật Đặng
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    In the digital age, chat applications like Zalo and Telegram are essential tools for communication. However, they also open doors for cybercriminals to exploit users. One sophisticated method involves extracting IP addresses using spoofed URLs and phishing tactics. This blog post dives into the mechanics of URL spoofing, the common types of attacks, and a step-by-step demonstration of how attackers can track IP addresses through seemingly harmless interactions on these chat applications. I'll also explore a specific vulnerability in Telegram that allows hackers to discover a user's IP address during calls, revealing the potential risks and the necessary precautions to safeguard your online privacy. ## Table of Contents - [Table of Contents](#table-of-contents) - [Tracking IP Address by using an Image URL](#tracking-ip-address-by-using-an-image-url) - [Background](#background) - [URL spoofing](#url-spoofing) - [Phishing](#phishing) - [Proof of Concept](#proof-of-concept) - [Attack Scenario](#attack-scenario) - [Exploitation Demo](#exploitation-demo) - [Discover the user’s IP address using Telegram.](#discover-the-user’s-ip-address-using-telegram.) - [Introduction](#introduction) - [Root Cause](#root-cause) - [Proof of Concept](#proof-of-concept) - [Conclusion](#conclusion) - [References](#references) # Tracking IP Address by using an Image URL ## Background ### URL spoofing **Definition of URL Spoofing** - **URL Spoofing**: URL spoofing involves creating a fraudulent link that appears to be from a legitimate source. This deceptive tactic aims to trick users into providing personal data or inadvertently downloading malware. - **Consequences**: Interacting with spoofed URLs can result in the installation of malicious software or the unauthorized collection of sensitive information, such as passwords, financial details, and personal identification. **Distribution of Spoofed URLs Through Phishing**: Spoofed URLs are often disseminated via phishing attacks. Phishing involves sending deceptive emails or text messages that lure recipients into clicking on fraudulent links. These messages often include enticing offers or urgent requests to prompt immediate action. **Common Types of URL Spoofing Attacks** 1. **Links Behind Buttons or Words:** A common phishing tactic involves embedding malicious links within buttons or hyperlinked text in emails that appear to be from trusted sources. By disguising the link, attackers can redirect users to harmful websites. Users can identify these links by hovering over them to reveal the true URL. Example: An email from a purported airline might offer discounted flights with a "Book Now" button. Clicking the button could lead to a malicious site that installs malware on the user’s device. 2. **Misspelled Links:** Hackers often create URLs that closely resemble legitimate ones, altering only a single character. This method exploits users’ tendency to skim read, making it easy to overlook minor discrepancies. Example: A phishing email from a fake Netflix account may request confirmation of payment details, linking to “netfliix.com” or “n3tflix.com” instead of the official Netflix site. 3. **URL Shorteners:** URL shortening services (e.g., [bit.ly](bit.ly)) are used to condense long URLs, making them easier to share. However, these shortened links obscure the destination URL, allowing attackers to mask malicious links. Example: A shortened URL shared on social media or via text message may lead unsuspecting users to harmful websites. 4. **Links with Non-Latin Characters:** Hackers exploit non-Latin characters to create URLs that look nearly identical to legitimate ones. This method, known as homograph attack, involves using characters from different alphabets that appear similar to Latin characters. Example: A spoofed URL like “ņordvpn.com” may appear to be the legitimate “nordvpn.com” at a quick glance, deceiving users into visiting a fraudulent site. ### Phishing Phishing is a type of cyber-attack where attackers impersonate a trusted entity to deceive users into providing personal information. Commonly, cybercriminals masquerade as banks, online transaction websites, e-wallets, or credit card companies to trick users into sharing sensitive information, such as login credentials, transaction passwords, credit card details, and other valuable data. Typically, phishing attacks are executed via emails and text messages. When users open these emails and click on the spoofed links, they are directed to a fake login page where they are prompted to enter their credentials. If they fall for the scam, the attackers immediately gain access to their information. In this case, I will focus on the use of phishing to distribute URL spoofing attacks. ## Proof of Concept ### Attack Scenario In this section, I will outline a detailed attack scenario demonstrating the use of URL spoofing to track the IP addresses of victims through various interactions on chat applications like Zalo and Telegram. **Step 1: Creation of a Spoofed URL.** Select an image to use as bait. This image could be a popular meme, an interesting photograph, or a seemingly important document that the attacker believes will entice the victim to click the link. Upload the selected image to a website that allows for IP logging, such as Grabify, IP Logger, or a similar service. These services generate a URL that captures the IP address of the visitor when clicked. **Step 2: URL Shortening.** Use a URL shortening service like Bitly or TinyURL to condense the lengthy IP logging URL into a shorter, more innocuous-looking link. Obtain the shortened URL, which will be less suspicious and more likely to be clicked by the victim. **Step 3: Distribution of the Spoofed URL.** Craft a message to send to the victim through a chat application like Zalo or Telegram. The message should be compelling enough to encourage the victim to click the link. Send the message with the shortened URL to the victim via the chosen chat application. **Step 4: Tracking the IP Address.** When the victim clicks on the shortened URL, they are redirected to the IP logging service, which records their IP address before displaying the image. Log in to the IP logging service to view the captured IP address and other relevant information about the victim's device and location. ### Exploitation Demo **Step 1: Creation of a Spoofed URL.** Start by uploading the image to an image hosting website such as [ImgBB](https://imgbb.com/). For this demonstration, I will use the link to the [image](https://i.ibb.co/R6z9myy/Hacker.jpg). To track the IP address, I will use a service that logs and tracks IP addresses. Many websites offer logging services, but for this demo, I will use [Grabify](https://grabify.link/). Grabify allows us to log and track IP addresses and provide additional information about our target, such as the browser and operating system used. While Grabify offers both free and paid services, I will use the free package for this demonstration. Go to the Grabify website and enter the link to our online hosted [image](https://i.ibb.co/R6z9myy/Hacker.jpg) into the provided field. Click on the "Create URL" button to generate a tracking link. ![grabify](https://hackmd.io/_uploads/HJvevpY9C.png) A screen will pop up requesting you to agree to the terms of service and privacy policy. Make sure to read through the terms to ensure compliance with legal requirements. Accept the terms and continue to proceed with the creation of the tracking URL. ![requires](https://hackmd.io/_uploads/H1Ak_aKqR.png) ![information](https://hackmd.io/_uploads/Bk3g_6FqA.png) On this page I have several types of information to help us track IP address: - Original URL - This is the original URL to your image on the website it is hosted on. - New URL - This is the URL which I will send to our target in order to obtain information to help us track the IP address. - Access Link - This is the link I will be using to access the information already logged onto our grabify platform. **Step 2: URL Shortening.** After creating the tracking link with Grabify, you will have a URL that can be used to track the IP address of the target. However, this link can be identified as an information-fetching link, potentially raising suspicion. To make the link less detectable and more likely to be clicked by the target, I will use a URL shortening service. This service will convert the lengthy and potentially suspicious link into a shorter and more inconspicuous one. For this demonstration, I will use [Bitly](https://bitly.com/), a popular free URL shortening service. ![bitly](https://hackmd.io/_uploads/SJc7u6tqC.png) Visit the Bitly website and enter the Grabify tracking link into the URL shortening field. Click “Enter” to generate a shortened URL. For this example, the shortened URL is: https://bit.ly/4dtLE3Y. ![link](https://hackmd.io/_uploads/S1NrO6Y5C.png) **Step 4: Tracking the IP Address.** Use Grabify to log and track IP addresses and provide additional information about our target. See the log results on the statistics table and its referring URL from Zalo. ![result](https://hackmd.io/_uploads/SyVDOaYqC.png) Click on to see full details. ![log](https://hackmd.io/_uploads/rJe2O6Y5R.png) # Discover the user’s IP address using Telegram. ## Introduction Telegram, a popular messaging app, can unintentionally leak your IP address if you add a hacker to your contacts and accept a phone call from them. This vulnerability is identified as [CVE-2018-17780](https://nvd.nist.gov/vuln/detail/CVE-2018-17780): - **Affected Versions:** Telegram Desktop (aka tdesktop) 1.3.14, and Telegram 3.3.0.0 WP8.1 on Windows. - **Vulnerability:** Leaks end-user public and private IP addresses during a call due to unsafe default behavior that accepts P2P connections from clients outside of the "My Contacts" list. - **CVSS Score:** 6.5 (Medium - Version 3.x). Unfortunately, this vulnerability still exists and continues (until now) to expose users' IP addresses during calls. ![cve](https://hackmd.io/_uploads/rJmxFat50.png) To avoid leaking your IP address while using Telegram, go to Telegram’s Settings > Privacy and Security > Calls, and then select “Never” in the Peer-to-Peer menu. ![p2p](https://hackmd.io/_uploads/SJobtpKq0.png) ## Root Cause According to Simonov, "An unprepared person can easily reveal his IP address to his interlocutor if he does not know about them." The reason for this leak is that Telegram, by default, uses a peer-to-peer (P2P) connection between callers for better quality and reduced latency. A Telegram spokesperson, Remi Vaughn, explained, "The downside of this is that it necessitates that both sides know the IP address of the other (since it is a direct connection). Unlike on other messengers, calls from those who are not your contact list will be routed through Telegram’s servers to obscure that." ## Proof of Concept **Step 1: Establishing the Scenario** 1. **Add the Hacker to Contacts:** The attacker persuades the victim to add them to their Telegram contacts, potentially through social engineering techniques or by impersonating a known contact. 2. **Initiate a Call:** The attacker initiates a voice or video call to the victim using Telegram. The call request appears legitimate to the victim, who subsequently accepts the call. **Step 2: Capture Network Traffic** 1. **Open Wireshark:** The attacker opens Wireshark, a network protocol analyzer, to monitor the network traffic during the call. 2. **Filter for STUN Traffic:** The attacker sets a filter in Wireshark to capture STUN (Session Traversal Utilities for NAT) traffic. STUN is a protocol used by Telegram for establishing peer-to-peer connections. **Step 3: Identify the IP Address** 1. **Monitor the Call:** While the call is in progress, the attacker closely monitors the STUN traffic in Wireshark for any packets containing IP address information. 2. **Extract the IP Address:** Upon detecting the relevant STUN packets, the attacker analyzes the packet details to extract the victim's public IP address. This information is now accessible to the attacker. ![wireshark](https://hackmd.io/_uploads/r12XtpY9R.png) With the IP address in hand, you can use a web service like [InfoSniper](https://infosniper.net/) to find the location associated with the IP address. ![info2](https://hackmd.io/_uploads/B10UtaY50.png) # Conclusion Understanding the methods cybercriminals use to extract IP addresses through chat applications like Zalo and Telegram is crucial in today's digital landscape. By highlighting the tactics of URL spoofing and phishing, as well as exposing vulnerabilities within these platforms, I hope to raise awareness about the potential risks and encourage proactive measures for online safety. Always be vigilant when interacting with links and unknown contacts, and take advantage of privacy settings to protect your personal information. Staying informed and cautious is your best defense against cyber threats. Stay safe, and keep your data secure! # References 1. Kennedy Muthii. (2024, January 1). _How to track IP address using an image._ Retrieved from https://www.golinuxcloud.com/track-ip-address-using-an-image/ 2. Lorenzo Franceschi-Bicchierai. (2023, October 19). _Telegram is still leaking user IP addresses to contacts._ TechCrunch. Retrieved from https://techcrunch.com/2023/10/19/telegram-is-still-leaking-user-ip-addresses-to-contacts/ 3. Jomilė Nakutavičiūtė. (2024, January 2). _URL Spoofing: Definition and explanation._ Retrieved from https://nordvpn.com/blog/url-spoofing/ 4. CyStack. (n.d.). _Phishing là gì? Cách phòng chống tấn công Phishing hiệu quả._ Retrieved from https://cystack.net/blog/phishing-la-gi 5. National Vulnerability Database. (2018). _CVE-2018-17780._ Retrieved from https://nvd.nist.gov/vuln/detail/CVE-2018-17780 6. Catalin Cimpanu. (2018, Septemper 29). _Telegram fixes IP address leak in desktop client._ ZDNet. Retrieved from https://www.zdnet.com/article/telegram-fixes-ip-address-leak-in-desktop-client/

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully