🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.privacy.anon-server
Article #270319

Re: Ping Zax

#270319
From: Jack Ryan
Date: Sun, 05 Oct 2014 06:00
55 lines
2680 bytes
The idea of putting remailer keys on a partition with a randomly-generated
key is a good one.

Rather than using a "real" disk, it is also possible to do this using a ramdisk.

Here are a couple of scripts to create and destroy a ramdisk that is encrypted
with a randomly-generated key that is different with each boot. Change
maxsize=##### in the first line of the script to generate a disk of your desired
size. maxsize is in kB, so 50000 corresponds to a 50MB disk (plenty big to store
mix keys).

Before running the scripts for the first time, you should create a directory
/media/rdisk:

sudo mkdir /media/rdisk

You only need to do this once. Also, replace <your_user_id> with your user id.

The first script will create the ramdisk:

#!/bin/bash
mount -t ramfs none /media/rdisk -o maxsize=50000
chmod 700 /media/rdisk
chown -R <your_user_id> /media/rdisk
chgrp -R <your_user_id> /media/rdisk
dd if=/dev/urandom of=/media/rdisk/cryptainer bs=1M count=500
losetup -f
losetup /dev/loop0 /media/rdisk/cryptainer
cryptsetup create --cipher aes-xts-plain --key-size 512 cryptramdisk /dev/loop0 -d /dev/urandom
badblocks -swt random /dev/mapper/cryptramdisk
mkfs.ext2 /dev/mapper/cryptramdisk
if [ ! -d /media/ramdisk ]; then
 mkdir /media/ramdisk
fi
mount /dev/mapper/cryptramdisk /media/ramdisk
chmod 755 /media/ramdisk
chown <your_user_id> /media/ramdisk
rm -rf /media/ramdisk/lost+found

And the second script will destroy the ramdisk (probably not useful for the
current discussion, but I'm including it for completeness).

#!/bin/bash
umount /media/ramdisk
rmdir /media/ramdisk
cryptsetup remove cryptramdisk
losetup -d /dev/loop0
rm /media/rdisk/cryptainer
umount /media/rdisk

Both scripts should be run as root (using sudo, preferably).

The ramdisk will be created at /media/ramdisk. You should be able to see it with
the command df -h
Technical Details
Message-ID: <e90bdee8044a46beca3d38f04146bf8c@remailer.cpunk.us>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.privacy.anon-server.20141023.mbox.gz!border1.nntp.dca1.giganews.com!nntp.giganews.com!news.glorb.com!news2.arglkargh.de!sewer!news.dizum.net!not-for-mail
References: <94a41661f8d42a12efd527385714859f@remailer.privacy.at>

Show Full Headers
Complete Article Headers
Message-ID: <e90bdee8044a46beca3d38f04146bf8c@remailer.cpunk.us>
Subject: Re: Ping Zax
Date: Sun, 05 Oct 2014 06:00:59 +0000
From: Jack Ryan <noreply@remailer.cpunk.us>
References: <94a41661f8d42a12efd527385714859f@remailer.privacy.at>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.privacy.anon-server.20141023.mbox.gz!border1.nntp.dca1.giganews.com!nntp.giganews.com!news.glorb.com!news2.arglkargh.de!sewer!news.dizum.net!not-for-mail
Newsgroups: alt.privacy.anon-server
Organization: dizum.com - The Internet Problem Provider
X-Abuse: abuse@dizum.com
Injection-Info: sewer.dizum.com - 194.109.206.211
Lines: 54