Code Monkey home page Code Monkey logo

file-attribute-changer's Introduction

File Attribute Changer

A simple file attribute modification tool. It allows users to manipulate various attributes and properties associated with files, such as modifying timestamps, setting attributes like read-only, hidden, compressed, encrypted, and system. The purpose of this program is to better understand the Windows API and the .NET Framework, specifically with file manipulation and bitmasks.

File-Attribute-Changer-UI

Installation and use

This program does not require any setup. Simply navegate to the Release folder, then download File-Attribute-Changer.exe, and then run it. Once open, click Browse to select a file of your choice. From there, you can modify timestamps, encrypt/decrypt the file, compress/decompress the file, set the file to read-only, or set it as a system file. When finished just click Apply or OK for the application to save and exit. In order to modify files located in system directories, you will have to give this application elevated privileges.

Timestomping

In the context of cybersecurity and hacking, timestomping is a technique used to manipulate or forge timestamps associated with system files or logs on a computer system or network. It is typically used by black hat hackers to cover their tracks and evade detection from cybersecurity professionals and investigators. By altering timestamps, attackers can make it appear as though their activities occurred at different times. Timestomping is part of a broader set of techniques used in cybercrime to undermine the integrity of digital evidence. Ethical hackers may also use timestomping to simulate scenarios where hackers use manipulated timestamps to cover their tracks.

File attributes

The Windows file attributes enum has 16 different fields. This program reads and manipulates 7 of those. A file can only either be compressed or encrypted, and a read-only file cannot be modified. All of these fields can be parsed using bitwise operators. For example, you can find out whether or not a file is read-only by using:

FileAttributes attributes = File.GetAttributes(filePath);
bool isReadOnly = (attributes & FileAttributes.ReadOnly) == FileAttributes.ReadOnly;

FileAttributes

Attribute Description
Normal The file has no attributes
Compressed The file is compressed
Hidden The file is hidden
Encrypted The file's data is encrypted
ReadOnly The file is read-only
System The file is a system file
NotContentIndexed The file won't be indexed
Offline The file is offline/unavailable

Encryption and compression

This tool uses System.IO for encryption and decryption. For compression and decompression, it uses Windows native methods. It first checks to ensure that the file system is NTFS before proceeding with compression. If a compression operation is performed on an encrypted file, the tool decrypts the file first. Note that for encryption and compression operations, it is not enough to just modify the bitmask; the encryption and compression operations themselves must be done in addition to the bitmask modifications.

Sources

file-attribute-changer's People

Contributors

julianozelrose avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

feranimaciones

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.