Sample Post: Formatting Showcase

· 2 min read

Contents

Goal: Check how text, code, images, tables and callouts render on blog.bsdrip.tech before the real posts go live. This post is a sample. Delete sample-formatting-test.md and sample-terminal.png from the vault when you're done.


1. Text#

This is a regular paragraph with bold, italic, inline code and a link to the Elastic docs. A typical sentence in a post looks like this: the loader allocates RW memory, copies the payload, flips it to RX with VirtualProtect and starts a thread at the payload's entry point.

Lists work too:

  • Unordered item one
  • Item two, with a nested list:
    • nested a
    • nested b
  • Item three
  1. First step
  2. Second step
  3. Third step

1.1 A sub-heading#

Sub-headings appear in the collapsible Contents box at the top of the post.


2. Code#

A C snippet:

#include <windows.h>

unsigned char payload[] = { 0x90, 0x90, 0xC3 };

int main(void) {
    void *exec = VirtualAlloc(NULL, sizeof(payload), MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
    memcpy(exec, payload, sizeof(payload));

    DWORD old;
    VirtualProtect(exec, sizeof(payload), PAGE_EXECUTE_READ, &old);

    HANDLE t = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)exec, NULL, 0, NULL);
    WaitForSingleObject(t, INFINITE);
    return 0;
}

PowerShell:

# Pull the last 5 Sysmon process-creation events
Get-WinEvent -FilterHashtable @{ LogName = 'Microsoft-Windows-Sysmon/Operational'; Id = 1 } -MaxEvents 5 |
    Select-Object TimeCreated, @{ n = 'Image'; e = { $_.Properties[4].Value } }

Bash:

curl -sk -u elastic:$ELASTIC_PASSWORD https://10.10.10.10:9200/_cluster/health | jq .status

And a code block without a language, which is how ASCII diagrams render:

   MALDEV01 ---- build ----> TARGET01 ---- telemetry ----> ELK01

3. Image#

An Obsidian embed (![[sample-terminal.png]]):


4. Table#

Version Technique Detected? Alert
v01 VirtualAlloc + CreateThread Yes Shellcode Injection
v02 XOR-encrypted payload Yes Memory threat (unbacked RX region)
v03 Module stomping No -

5. Quote#

Red builds, blue watches, purple wins.

That's everything. If this all looks right, delete this post.