• Log In
  • Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Home
  • About
  • Structure
  • Gradebook

ITACS 5211: Introduction to Ethical Hacking

Wade Mackey

Webserver serving swap files – vulnerability

September 11, 2018 by Frederic D Rohrer 2 Comments

https://webdevetc.com/blog/how-to-get-someones-database-credentials-while-they-are-editing-config-files-on-a-live-server

 

When editing on a web-server in production with an editor like Vim, that editor will create a swap file which could mistakenly be served to the public. Therefore it is

A) important to restrict the filetype that is being served (you can do this in .htaccess or php config (NodeJS doesn’t have this problem since files are served from the public folder only and html is templated first)).

B) do not edit on a production server, instead use a staging tool like Git.

Filed Under: Week 02: TCP/IP and Network Architecture Tagged With:

Reader Interactions

Comments

  1. Ruby(Qianru) Yang says

    September 11, 2018 at 5:24 pm

    Hi Frederic, thank you for sharing this interesting article about how to get someone’s database credentials while they are editing config files on a live server and how to prevent this attack.

    Log in to Reply
  2. Xinteng Chen says

    September 11, 2018 at 6:13 pm

    Thank you for introducing this kind of attack for us. It is dangerous to lose the information from database while users are editing. config files. It is important for users to have some ways to prevent this attack. Sharing the edit files can help hackers attack the servers o obtain the information. This article reminds users to edit database on a secure environment.

    Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Weekly Discussions

  • Uncategorized (14)
  • Week 01: Overview (7)
  • Week 02: TCP/IP and Network Architecture (18)
  • Week 03: Reconnaisance (17)
  • Week 04: Vulnerability Scanning (19)
  • Week 05: System and User Enumeration (17)
  • Week 06: Sniffers (17)
  • Week 07: NetCat and HellCat (15)
  • Week 08: Social Engineering, Encoding and Encryption (21)
  • Week 09: Malware (14)
  • Week 10: Web Application Hacking (17)
  • Week 11: SQL Injection (15)
  • Week 12: Web Services (25)
  • Week 13: Evasion Techniques (8)
  • Week 14: Review of all topics (15)

Copyright © 2025 · Magazine Pro Theme on Genesis Framework · WordPress · Log in