• 0

I think someone tried to hack my website!


Question

Hey all,

One of my sites allows users to upload images and I had this file uploaded. I don't think it was able to run since it was saved a jpg. How can I tell if the hack was sucessful?

 

Filename - It's just a php file with a jpg extension

dz.php;.jpg

 

Here is the file in a zip. You might need to turn off your antivirus. Mine keeps catching it. If you don't want to download it, I understand. The main concern for me is figuring out if I was compromised. :(

The file is really interesting though.

 

<snip>

Edited by Barney T.
We do not want our members downloading infected files.

21 answers to this question

Recommended Posts

  • 0

Certainly looks like an injection script. 

 

You really should make sure that your directory permissions are proper as well as the publicly accessible files.  What should be written to and what is read only type of thing. 

 

I have seen this type of hack attempt all to often with various CMS systems having incorrect permissions and vulnerabilities.  I'm guessing your site isn't a CMS based one though, so this goes back to permissions and if you coded it yourself, you might want to look at any potential security holes they can exploit in your code that you may have overlooked. Also, if you haven't done so already - make sure your PHP is up to date and Apache is as well. 

 

You can always view the access and/error logs to see if this file is accessed a lot, (Botnet or Spammer type of thing), or analyze them for when the POST request was put on your site for the affected file. 

 

The hacker(s) that messed with your site embedded base 64 code in the script to make it non-readable by humans, but you can pretty much decode it online if you want.

 

  • 0

I don't know if this is legit or not, but offering to download something that might be infected with a virus isn't something the average user here should be exposed to.

  • 0

Hey all,

One of my sites allows users to upload images and I had this file uploaded. I don't think it was able to run since it was saved a jpg. How can I tell if the hack was sucessful?

dz.php;.jpg

 

Here is the file in a zip. You might need to turn off your antivirus. Mine keeps catching it. If you don't want to download it, I understand. The main concern for me is figuring out if I was compromised. :(

The file is really interesting though.

 

This is a PHP hack shell. From there, they can see ALOT of informations about your server and, if the rights are improperly set, they can do DDoS attacks, take over the webserver and so on as well as modify various things on your website.

  • 0

I don't know if this is legit or not, but offering to download something that might be infected with a virus isn't something the average user here should be exposed to.

Well it's a PHP file. I don't think this can harm anyone's PC.

  • 0

Certainly looks like an injection script. 

 

You really should make sure that your directory permissions are proper as well as the publicly accessible files.  What should be written to and what is read only type of thing. 

 

I have seen this type of hack attempt all to often with various CMS systems having incorrect permissions and vulnerabilities.  I'm guessing your site isn't a CMS based one though, so this goes back to permissions and if you coded it yourself, you might want to look at any potential security holes they can exploit in your code that you may have overlooked. Also, if you haven't done so already - make sure your PHP is up to date and Apache is as well. 

 

You can always view the access and/error logs to see if this file is accessed a lot, (Botnet or Spammer type of thing), or analyze them for when the POST request was put on your site for the affected file. 

 

The hacker(s) that messed with your site embedded base 64 code in the script to make it non-readable by humans, but you can pretty much decode it online if you want.

Thanks so much for the advice. I'll check on the logs. I'm also going to remove the upload ability. No one uses it anyway haha

  • 0

I don't know much about PHP, but the last section looks like it sends an e-mail to [email protected] .

I noticed that as well. I kind of want to email him/her.

Also earlier in the code it links to tutorials on hacking and downloading pdfs about it. One site was in Moroccan. Very odd.

  • 0

I'm having an interesting time decoding the script online.  Pretty funny how they didn't even change their default password for the hack tool they are using. Best of luck on your end for sure and for safety's sake, run an updated  ClamAV scan on your site as well to make sure nothing else was compromised.  ;)

  • 0

Well it's a PHP file. I don't think this can harm anyone's PC.

 

You didn't say it was PHP. That makes it a lot less serious to the average desktop user.

 

Checking MIME types on upload is a good way to stop some of the script kiddie stuff. Also, your upload directory should never have execute access.

  • 0

I'm having an interesting time decoding the script online.  Pretty funny how they didn't even change their default password for the hack tool they are using. Best of luck on your end for sure and for safety's sake, run an updated  ClamAV scan on your site as well to make sure nothing else was compromised.  ;)

If you want, post anything interesting here in this thread, or PM. I'm relly interested in it. Sadly my logs seem to get overriden everyday but it doesn't look like this file was accessed. Maybe it was never able to run.

  • 0

You didn't say it was PHP. That makes it a lot less serious to the average desktop user.

 

Checking MIME types on upload is a good way to stop some of the script kiddie stuff. Also, your upload directory should never have execute access.

Oh sorry. I posted the file name up above. I'll make it clearer. Good tip thanks :)

  • 0

your site was hacked? welcome to the Internet :D

as long you don't keep users emails and CC numbers in plain text, you will be fine.

Haha! So far I'm not liking my stay :P  This is the first time it's happened to me. My websites arent very popular!

  • 0

If you want, post anything interesting here in this thread, or PM. I'm relly interested in it. Sadly my logs seem to get overriden everyday but it doesn't look like this file was accessed. Maybe it was never able to run.

PM Sent.  :)

 

Rather than link to or post code snippets that can hack which is a TOS violation of Neowin AFAIK, I won't.  But it is easy enough to decode this stuff online. 

  • 0

Well now you are

I think you need to look up the definition.  If I wanted to share/save a large file with anyone and your site allows JPG file uploads, anyone could just add ".jpg" to any file and upload it.  So......how is that hacking a site?

  • 0

I think you need to look up the definition.  If I wanted to share/save a large file with anyone and your site allows JPG file uploads, anyone could just add ".jpg" to any file and upload it.  So......how is that hacking a site?

I'm going off the contents of the file.

  • 0

I think you need to look up the definition.  If I wanted to share/save a large file with anyone and your site allows JPG file uploads, anyone could just add ".jpg" to any file and upload it.  So......how is that hacking a site?

 

Pretty sure, he means they attempted to do some sort of injection attack. Possible, uploading it and then trying to run it by injecting unsanitized input somewhere else (or just tried to run it directly from their web browser).

 

 

EDIT: see: http://stackoverflow.com/questions/8025236/is-it-possible-to-execute-php-with-extension-file-php-jpg

  • 0

We do not want to subject our members to suspicious files through our forums. We need to keep this a safe place for all.

 

Thread Closed

 

Barney

  • Like 2
This topic is now closed to further replies.
  • Posts

    • Ventoy 1.1.14 by Razvan Serea Ventoy is an open source tool to create bootable USB drive for ISO/WIM/IMG/VHD(x)/EFI files. With Ventoy, you don't need to format the disk over and over, you just need to copy the ISO/WIM/IMG/VHD(x)EFI files to the USB drive and boot them directly. You can copy many files at a time and ventoy will give you a boot menu to select them. Both Legacy BIOS and UEFI are supported in the same way. Most type of OS supported (Windows/WinPE/Linux/Unix/Vmware/Xen...) Ventoy features: 100% open source Simple to use Fast (limited only by the speed of copying iso file) Directly boot from ISO/WIM/IMG/VHD(x)/EFI file, no extraction needed Legacy + UEFI supported in the same way UEFI Secure Boot supported (since 1.0.07+) Persistence supported (since 1.0.11+) MBR and GPT partition style supported (1.0.15+) WIM files boot supported (Legacy + UEFI) (1.0.12+) IMG files boot supported (Legacy + UEFI) (1.0.19+) Auto installation supported (1.0.09+) File injection supported (1.0.16+) ISO files larger than 4GB supported Native boot menu style for Legacy & UEFI Most type of OS supported(Windows/WinPE/Linux/Unix/Vmware/Xen...), 550+ iso files tested Not only boot but also complete installation process ISO files can be listed in List mode/TreeView mode Linux vDisk boot supported (vdi/vhd/raw) "Ventoy Compatible" concept Plugin Framework Menu Alias/Menu Style/Customized Menu supported USB drive write-protected support USB normal use unaffected Data nondestructive during version upgrade No need to update Ventoy when a new distro is released Ventoy 1.1.14 changelog: Update secure boot shim file to solve the UEFI CA 2023 issue. The new release use a new CA, so you need to enroll the new key for the first boot time. VentoyPlugson update synchronously. Global control plugin add a VTOY_SECURE_BOOT_POLICY option. Notes Download: Ventoy 1.1.14 | 15.9 MB (Open Source) Download: Ventoy Live CD | 187.0 MB Link: Ventoy Home Page | Project Page @GitHub | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Save 83% on PRO$PER Lifetime Pass by Sterling Stock Picker by Steven Parker Today's deal from our Apps + Software section of the Neowin Deals store, lets you save 83% on PRO$PER Lifetime Pass by Sterling Stock Picker. Note: Only available to NEW users. This deal is exclusive to Stacksocial. Gain Financial Freedom Through Expert Education PRO$PER Financial Success System is a comprehensive financial education platform designed to help individuals build stronger money habits, make informed financial decisions, and create a clear path toward long-term wealth. The program includes 12+ in-depth financial courses, more than 150 lessons, personalized learning pathways, and a financial dashboard that tracks your progress and goals. Members receive lifetime access to expert-led training from seasoned financial educator Jaden Sterling, along with exclusive resources such as worksheets, eBooks, webinars, and practical implementation tools. The platform also features Finley AI, an intelligent financial coaching assistant that delivers personalized guidance, recommendations, and educational support tailored to your unique financial journey. Ideal for anyone looking to reduce debt, improve budgeting skills, grow investments, prepare for retirement, or achieve greater financial confidence and stability. Whether you're a beginner learning the fundamentals of personal finance or someone seeking to strengthen an existing financial plan, the platform provides actionable strategies and step-by-step guidance to help you reach your goals. Through personalized recommendations, community support, and AI-powered coaching, members can develop better financial habits, avoid common money mistakes, and stay focused on long-term success. By combining education with practical implementation, PRO$PER empowers users to build sustainable wealth, improve financial security, and create a stronger foundation for their future. Comprehensive Financial Training Made Simple Financial Success Blueprint: Learn the fundamentals of budgeting, saving, debt reduction, investing, retirement planning, and wealth creation. 12+ Comprehensive Financial Courses: Access a growing library of expert-led courses covering personal finance and money management. 150+ Financial Lessons: Explore a wide range of educational content designed to strengthen your financial knowledge. Lifetime Access: Enjoy unlimited access to all current and future training materials at your own pace. Self-Paced Learning: Study anytime, anywhere, with no deadlines or fixed class schedules. Expert-Led Instruction: Learn from experienced financial educator and mentor Jaden Sterling. Step-by-Step Learning Paths: Follow structured roadmaps that simplify complex financial topics. AI-Powered Support for Financial Success Finley AI Financial Coach: Get on-demand guidance, insights, and support from an AI-powered financial assistant. Personalized Financial Dashboard: Track financial goals, confidence levels, progress, and areas for improvement. Tailored Learning Recommendations: Receive customized course suggestions based on your profile and objectives. Investment & Wealth-Building Insights: Explore strategies to grow wealth and make informed financial decisions. Resources and Support to Thrive Financially Decision-Making Support: Gain confidence in managing money, investing, and long-term planning. Community Support Network: Connect with like-minded members, share experiences, and learn from others. Exclusive Educational Resources: Access eBooks, worksheets, webinars, guides, and practical financial tools. Actionable Learning Approach: Apply concepts immediately through exercises, implementation strategies, and real-world examples. Good to know Length of access: Lifetime Redemption deadline: redeem your code within 60 days of purchase Access Options: Desktop and mobile Max number of devices: Unlimited Updates included Only available to NEW users PRO$PER Lifetime Pass by Sterling Stock Picker normally costs $499 but it can be yours for only $79.99, that's a saving of $420 (83%) off! For terms, and more details click the link below. PRO$PER Lifetime Pass by Sterling Stock Picker at 83% off (was $499) Although priced in U.S. dollars, this deal is available for digital purchase worldwide. Support queries If you have queries or need support for any of the Neowin Deals, please use the contact form here. Neowin Deals are managed and sold by StackCommerce who represent Neowin on an affiliate basis. Why we post these deals We post these because we earn commission on each sale so as not to rely solely on advertising, which many of our readers block. It all helps toward paying staff reporters, servers and hosting costs. So for those that keep moaning and complaining, be thankful we're still online for you to even do that. Other ways to support Neowin Whitelist Neowin by not blocking our ads Create a free member account to see fewer ads Make a donation to support our day to day running costs Subscribe to Neowin - for $14 a year, or $28 a year for an ad-free experience Disclosure: Neowin benefits from revenue of each sale made through our branded deals site powered by StackCommerce.
    • Windows 10 is end-of-life (EOL) anyway.
    • 1. It only affects Windows 10, which is EOL anyway. 2. NVIDIA had very serious driver issues for >6 months after the GeForce RTX 5000 series came out.
  • Recent Achievements

    • First Post
      Tom Schmidt earned a badge
      First Post
    • One Month Later
      D0nn13 earned a badge
      One Month Later
    • Rookie
      +ChiefOfNeo went up a rank
      Rookie
    • One Year In
      Tom Schmidt earned a badge
      One Year In
    • One Month Later
      Tom Schmidt earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      456
    2. 2
      +Edouard
      177
    3. 3
      PsYcHoKiLLa
      123
    4. 4
      Michael Scrip
      84
    5. 5
      Xenon
      76
  • Tell a friend

    Love Neowin? Tell a friend!