Sign in

Image by Alexandra from Pixabay.

DscBaseline is a PowerShell module that creates DSC configurations based on the configuration of the current system. It aims to expedite the adoption of Microsoft Desired State Configuration (DSC) for configuration management. DscBaseline does not make any changes to the system. It only reads the current settings and creates several configuration files in the specified working directory. This post provides a very brief overview of DSC followed by how to use DscBaseline.

DSC Overview

Microsoft DSC is a management platform in PowerShell that enables you to manage your IT and development infrastructure with configuration as code. DSC uses a declarative syntax which…

Image by David Krüger from Pixabay

This post details how to set up a root OpenSSL Certificate Authority using Elliptic-curve cryptography (ECC) based on the following two resources.

Update — 2021–7–28

After further testing and learning more nuances of running a PKI, this post has been significantly updated.

Tested using:

  • OpenBSD 6.6 GENERIC
  • LibreSSL 3.0.2

Root Certificate Authority Configuration

The greatest hurdle to building out a certificate infrastructure is planning. One must understand how certificates will be used short term and long term as both…

Image by Harry Fabel from Pixabay

Relayd is a free load-balancer, application layer gateway, transparent proxy, and SSL/TLS gateway. It’s safe to say I would avoid placing a web server directly on the internet without placing relayd infront of it. While it may not have all the functionality of competing products (e.g. F5, nginx, haproxy) it has the right balance.

The following relayd.conf is similar to what I use as it achieves these three goals:

  1. Performs connection termination, including TLS.
  2. Updates HTTP request header with client information (e.g. X-Forwarded-For).
  3. Performs basic HTTP security checks.

Tested on: OpenBSD 6.6 GENERIC


As the title states, this is the…

Image by Taken from Pixabay

The default web server in OpenBSD is httpd. A lightweight server with only the essentials and built secure from the ground up.

There are occasions when a website must be placed into maintenance and httpd.conf makes this easy with pattern matching.

Tested on: OpenBSD 6.6 GENERIC

Create Maintenance Page

Save the following (or similar) page to the website root as maintenance.html.

This technique will redirect all requests which is why no other files are referenced. Any styles or scripts must be specified directly in the maintenance page or hosted on a different website.

<!DOCTYPE html>
<meta charset="UTF-8">…

Image by Pexels from Pixabay

Content Security Policy (CSP) is an HTTP response header used to protect the client against XSS, clickjacking, and loading untrusted content. When a page has internal scripts or styles, CSP can allow it by using a nonce or specifying it’s hash as a base64 encoded value. This post will show how to determine the value to be placed into the CSP.

For more information about the Content Security Policy specification see:

Content Security Policy Level 2 — W3C Recommendation, 15 December 2016

CSP Hash via PowerShell

The following PowerShell function can be used to calculate the SHA256 hash. …

Kringlecon 3 Greeting Card

Welcome to my write-up! Here you’ll find the steps needed to complete objectives and challenges. However some will not provide the answer. This is because if you follow the steps and understand what you’re doing; you’ll get the answer. If you’re only looking for the answer, there are other write-ups just a quick Google search away. This write-up will first cover the objectives followed by raspberry pi challenges.

System Status

Report Issues

Objective 1: Uncover Santa’s Gift List

Analyze image to find Santa’s gift for Josh Write. Relevant portion of image has been swirled which obfuscates the text. Need to “un-swirl” portions of the image to retrieve the flag.

  1. Loaded…

Image by Frantisek Krejci from Pixabay

Online Certificate Status Protocol (OCSP) stapling is a standard for checking certificate revocation. Most commonly deployed on web servers using TLS and required if you’re aiming for an A+ on Qualys SSL Server Test. Even better, CloudFlare reports connection time improvement by up to 30% in some cases. [0]

The following is based on OpenBSD 6.7.

man relayd.conf

Manual page for relayd.conf states:

An optional OCSP staple file will be used during TLS handshakes with this server if it is found as a non-empty file in /etc/ssl/name:port.ocsp or /etc/ssl/name.ocsp. …

Image by Michal Jarmoluk from Pixabay

Microsoft Desired State Configuration (DSC) is a management platform where configurations use a declarative syntax. Traditionally configurations are made by finding the particular Group Policy setting (local or otherwise). With DSC, all of the settings are in a text file stating the desired value (i.e. declared) making configuration as code possible.

One of the difficulties adopting DSC is generating the configuration files as it can be quite time-consuming. Suppose you have a server in its production configuration that needs to be migrated to DSC. Generating the configuration for Services alone will take significant time let alone the Security Policy and…

There are services within Microsoft Windows operating system that one cannot easily configure as in StartupType=Disabled. This post will show how to ensure a service is disabled regardless of errors encountered when using traditional means (e.g. gui (MMC), commandline (cmd), PowerShell) and without delving into ACLs.

This issue was identified while implementing Microsoft Desired State Configuration (DSC) on Windows Server 2019.

All of the following was launched from an elevated command prompt as Administrator.

Microsoft Management Console (MMC)

When working with Microsoft Windows services, most use services.msc. To launch, simply type services.msc into the Run dialog box and click OK. Some services cannot be…

Stack of rocks

When implementing Server Side Includes (SSI) on nginx 1.16.1, extra bytes were being returned in the responses. While this wouldn’t be noticed when viewed in a webpage, it can provide information disclosure when viewing the raw stream. The extra bytes were caused by Transfer-Encoding: Chunked being used in the HTTP response.


The Transfer-Encoding HTTP header is defined by RFC2616 as:

The Transfer-Encoding general-header field indicates what (if any)
type of transformation has been applied to the message body in order
to safely transfer it between the sender and the recipient. …

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store