Skip to content

Instantly share code, notes, and snippets.

View avenjamin's full-sized avatar
🤓

Ben Perry avenjamin

🤓
  • Sydney, Australia
  • 12:25 (UTC +10:00)
View GitHub Profile
@mirajehossain
mirajehossain / ubuntu-server-hardening.md
Last active May 12, 2024 01:41
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.

# Defaults / Configuration options for homebridge
# The following settings tells homebridge where to find the config.json file and where to persist the data (i.e. pairing and others)
HOMEBRIDGE_OPTS=-U /var/lib/homebridge
# If you uncomment the following line, homebridge will log more
# You can display this via systemd's journalctl: journalctl -f -u homebridge
# DEBUG=*
@dun4n
dun4n / vcard.html
Last active April 26, 2024 04:32
#JavaScript vcard generator example
<!doctype html>
<html>
<head>
<script type="text/javascript" src="vcard2.js"></script>
</head>
<body>
<script type="text/javascript">
// With helper methods
var fooBar = vCard.create(vCard.Version.FOUR)
fooBar.addFormattedname("Mr Foo Bar")