Skip to content

Instantly share code, notes, and snippets.

@ameeuw23
ameeuw23 / post_message_example.js
Created August 8, 2019 15:47 — forked from vishaltelangre/post_message_example.js
window.postMessage example
// recieve message
// event object contains:
// - data: message sent
// - origin (host from which the message was sent, e.g. http://blah.example.com)
// - source (reference to a Window object from which message was sent)
function postMessageHandler( event ) {
console.log("We've got a message!");
console.log("* Message:", event.data);
console.log("* Origin:", event.origin);
console.log("* Source:", event.source);
@ameeuw23
ameeuw23 / cloudSettings
Last active July 23, 2020 20:28 — forked from sarthaksavvy/cloudSettings
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-07-23T20:28:37.984Z","extensionVersion":"v3.4.3"}
@ameeuw23
ameeuw23 / cheatsheet-elasticsearch.md
Created February 23, 2022 11:48 — forked from ruanbekker/cheatsheet-elasticsearch.md
Elasticsearch Cheatsheet : Example API usage of using Elasticsearch with curl
@ameeuw23
ameeuw23 / ubuntu-server-hardening.md
Created November 13, 2022 17:23 — forked from mirajehossain/ubuntu-server-hardening.md
ubuntu-server-hardening checklist

Ubuntu-Server-Hardening

1. Secure Shared Memory

What is shared memory?

Shared memory is an efficient means of passing data between programs. Because two or more processes can use the same memory space, it has been discovered that, since shared memory is, by default, mounted as read/write, the /run/shm space can be easily exploited. That translates to a weakened state of security.

If you’re unaware, shared memory can be used in an attack against a running service. Because of this, you’ll want to secure that portion of system memory.