rust Peter Girnus rust Peter Girnus

Rust Reqwest Crate - GET JSON Object

The reqwest HTTP client library can be utilized to make HTTP requests and receive responses from a server. Once a response is received, it can be converted into a JSON object for further processing using HashMap or the serde_json::Value object, depending if the JSON struct is known ahead of time or not. This allows you to access the data within the response object, regardless of its structure.

Read More
cybersecurity Peter Girnus cybersecurity Peter Girnus

Cybersecurity - Secure by Default vs. Secure by Design

In information security, the principles of secure by design and secure by default represent two paradigms that work together to enhance the security of networks and systems. These two paradigms represent essential elements in cybersecurity. The Secure-by-principle integrates security as a fundamental element during the development process and throughout its lifecycle. The principle of secure-by-default means that the product is as secure as possible out-of-the-box without any additional security configurations.

Read More
rust, rust-fs, windows Peter Girnus rust, rust-fs, windows Peter Girnus

Rust Metadata Extensions (std::os::windows::fs::MetadataExt) Trait for the Windows OS

The Rust std::os::windows::fs::MetadataExt trait provides operating system extensions for the Microsoft Windows platform. These Metadata extensions for Windows allow programmers to view metadata such as its permissions, size, modification times, and other information about a file. The MetadataExt trait is a part of the Windows-specific extensions to primitives in the std::fs module. Data exposed by this trait include those of the Windows BY_HANDLE_FILE_INFORMATION structure.

Read More
rust, rust-fs, linux Peter Girnus rust, rust-fs, linux Peter Girnus

Rust Metadata Extensions (std::os::linux::fs::MetadataExt) Trait for the Linux OS

In Rust the std::os::linux::fs::MetadataExt trait provides os-specific extensions for the Linux platform. These extensions allow programmers to view metadata about a file such as its permissions, size, modification times, and other information about a file. The MetadataExt trait is a part of the Linux-specific extensions to primitives in the std::fs module.

Read More
rust, rust-fs Peter Girnus rust, rust-fs Peter Girnus

Rust Standard Library (std::fs): Getting File Metadata With Code Examples

In Rust, the standard library (std::fs) provides the Metadata structure, which gives programmers Metadata about a file, such as its permissions, size, times, file type, block information, etc. In addition, the Metadata structure contains a plethora of implementations for platform-specific behavior and fields that include functions for Linux, Unix, MacOS, and Windows. In this blog post, I will highlight Rust examples of the various functions and implementations provided by the Rust standard library.

Read More
cybersecurity, cisa, nsa Peter Girnus cybersecurity, cisa, nsa Peter Girnus

CISA & NSA - Identity & Access Management (IAM) Vendor Challenges

Recently, the Cybersecurity and Infrastructure Security Agency (CISA) and the National Security Agency (NSA), in partnership with the Enduring Security Framework (ESF), published new identity and access management guidance (IAM). CISA and the NSA address development and technology challenges that limit the organizational adoption of multifactor authentication (MFA) and single sign-on (SSO). CISA and the NSA also provide best practices that smaller organizations can implement as an IAM framework for identity access management (IAM). A broad IAM solution is critical in managing access to mission-critical resources.

Read More
chrome, javascript Peter Girnus chrome, javascript Peter Girnus

Browser Web Scraping - Scrape Data With Chrome Developer Tools (Chrome DevTools)

Did you know you can use the Developer Tools (DevTools) in the Chrome Browser to scrape data from a website and copy that data to the clipboard? Few know of this highly effective web scraping technique. Chrome Developer Tools is a powerful feature that allows you to interact with the Chrome browser, websites, and the Document Object Model (DOM).

Read More
rust, rust-fs Peter Girnus rust, rust-fs Peter Girnus

Rust std::fs Programming - Filetype Struct, Learning Through Rust Code

The Rust FileType struct is a structure within the Rust standard library (std::fs) and is part of the filesystem manipulation operations (fs) module. The FileType structure represents a type of file and provides accessors for each file type. This is accomplished through the return of the Metadata::file_type method. In this post, we will explore the FileType struct with examples using Rust code, providing valuable examples based on the Rust lang documentation.

Read More
cybersecurity, malware, threat-hunting Peter Girnus cybersecurity, malware, threat-hunting Peter Girnus

Exploring Ransomware Samples Written As Windows Batch File / HTA Hybrids

A Ransomware attack is an attack deployed by malware that weaponizes encryption to encrypt a victim's files and other data to prevent the victim from accessing their data. At the same time, the ransomware operators demand, through a ransom note, something of value (often money or cryptocurrency, such as Bitcoin) for the key to decrypt the files. Ransomware attacks are a common problem for businesses and individuals worldwide as malicious actors use ransomware infections to profit by holding data hostage. In a recent study, 73% of organizations were hit by ransomware, with a third saying they were hit more than once. Ransomware variants and the threat actors who deploy them continue to affect the largest companies worldwide, such as the ransomware attack on MGM by the ALPHV/BlackCat ransomware group. The most sophisticated ransomware attacks involve complex attack chains with the following:  social engineering attacks, phishing emails, malware/viruses, and zero-day and/or n-day exploits. 

Read More
cybersecurity, rust Peter Girnus cybersecurity, rust Peter Girnus

Rust vs. C/C++: Ensuring Memory Safety & Security

C/C++ is popular for system development due to its hardware control. However, manual memory management in these languages can be unsafe and lead to memory corruption and other security vulnerabilities. Rust is a modern programming language with guaranteed memory safety. This post compares Rust and C/C++ regarding memory safety and security and provides Rust programming examples.

Read More
rust, rust-fs Peter Girnus rust, rust-fs Peter Girnus

Rust std::fs: Creating, Writing, & Reading Files In Rust

Today, I want to explore the Rust std::fs library and its file creation, writing, and reading functions. This post can be helpful to Rust newcomers or those seeking a refresher on this topic. In this guide, we will explore the impressive capabilities of the File object, including how to create files in Rust using this object and how to read them using various techniques.

Read More
cisa, cybersecurity Peter Girnus cisa, cybersecurity Peter Girnus

Breaking Down CISA's Open Source Software Security Roadmap

Today, we're diving into a recent publication titled Open Source Software Security Roadmap by the Cybersecurity and Infrastructure Security Agency's (CISA). We’ll be breaking down this publication into bite-sized, easy-to-digest pieces. So strap-in and enjoy the ride as we learn how CISA is trying to impact chaotic world of open source software security.

Read More
linux, google, chrome Peter Girnus linux, google, chrome Peter Girnus

Open Google Chrome From The Linux Command Line

In the realm of Linux, mastering the command line is an essential skill for both novice and seasoned users. The command line interface, often accessed through the terminal or shell, is a powerful tool that allows users to interact with their Linux system in a text-based environment. Unlike the graphical user interface (GUI), which provides a point-and-click experience, the command line provides direct control over the operating system, enabling users to perform a wide range of tasks with precision and efficiency. This guide shows you how to open Google Chrome through the command-line as well as provides useful command-line switches along with some additional resources to get you started using Google Chrome through the command line!

Read More
how-to, linux, google, chrome Peter Girnus how-to, linux, google, chrome Peter Girnus

How to Install Google Chrome on Debian Linux

Discover how to effortlessly install Google Chrome on Debian distributions like Ubuntu using the command line. Our step-by-step guide simplifies the process, enabling you to quickly access Google Chrome's powerful features and capabilities on your Debian-based Linux system. Follow our straightforward instructions to unlock the full potential of Google Chrome, the versatile and reliable web browser, ensuring seamless performance and enhanced user experience on your Debian distribution.

Read More
rust, rust-fs Peter Girnus rust, rust-fs Peter Girnus

Rust std::fs: Parsing Directories & File Entries with DirEntry

The Rust programming language provides a robust and efficient way to interact with the file system, making it a popular choice for systems programming and file manipulation tasks. In this mini how-to guide, we will explore the powerful capabilities of the DirEntry struct, which is part of the Rust standard library's std::fs module. DirEntry enables developers to navigate and extract valuable information from directory entries effortlessly, making it an essential tool for file-related operations.

Read More
rust, rust-fs Peter Girnus rust, rust-fs Peter Girnus

Rust std::fs: Creating Directories with DirBuilder

This lightning how-to focuses on creating directories in Rust using the the DirBuilder impl which is is part of the Rust standard library (source code).

The DirBuilder impl is part of the the DirBuilder Struct contained in the std::fs module (filesystem manipulation operations) which allows us to use Rust to manipulate the filesystem.

This lightning how-to will first define a simple problem and then work out the solution. Let’s define our problem first.

Read More
rust, threat-hunting, malware Peter Girnus rust, threat-hunting, malware Peter Girnus

Scanning Files With Regular Expressions (RegEx) In Rust

This article shows you how to easily scan the contents of files using Regular Expressions (RegEx) using the Rust language. Rust implements a regular expression engine similar to many other regex engines such as Perl Compatible Regular Expressions (PCRE) and ECMAScript but lacks features such as look-arounds and backreferences. You can visit the source code of the regex crate by visiting the Rust implementation of regular expressions on GitHub.

Read More
how-to, rust, malware, threat-hunting Peter Girnus how-to, rust, malware, threat-hunting Peter Girnus

How To Compile YARA Rules & Scan With Files Rust

In this how-to I will show you how to easily compile yara rules and scan files using Rust. While VirusTotal does not have an official Rust implementation there is an experimental project hosted on GitHub. In this how-to we will use he yara-rust crate which provides the bindings around yara inspired by the popular yara-python library maintained by VirusTotal. Using this step-by-step guide we will install the yara-rust crate, compile a yara rule file as well as a yara rule string, and finally we will scan a file using yara-rust.

Read More
Peter Girnus Peter Girnus

cURL - The Ultimate Reference Guide

This page contains a comprehensive curl command-line reference and guide based on the Mastering the Curl Command Line master class as well additional notes related to curl. cURL is a computer software project providing the libcurl library and curl command-line tool for transferring data such as downloads and uploads using various network protocols. In this post you’ll find a huge selection of commands and examples related to curl and it’s usage.

Read More
how-to, windows, systems administration Peter Girnus how-to, windows, systems administration Peter Girnus

How to Easily Download & Install the Sysinternals Suite on Windows

Sysinternals Suite is a bundle of the Sysinternals utilities including Process Explorer, Process Monitor, Sysmon, Autoruns, ProcDump, all of the PsTools, and many more. Written Mark Russinovich the the Sysinternals Suite helps users, developers, cybersecurity professionals, researchers, and IT professionals to manage, troubleshoot and diagnose Windows and Linux systems and applications.

Read More