=^.^=

Recover Cisco IOS Switch Passwords (Quick-and-Dirty)

karma

The official documentation for this procedure is available at Recover Password for Catalyst Fixed Configuration Switches. What follows below is a condensed version, for our mutual convenience:

Hold down the mode switch while power cycling the unit. Issue the following over the serial terminal (9600 8 N 1) and note that load_helper may not be available on your device:
flash_init load_helper rename flash:config.text flash:config.bak boot

Abort the configuration wizard by specifying n at the prompt: --- System Configuration Dialog --- At any point you can enter a question mark '?' for help. Use ctrl-c to abort configuration dialog at any prompt. Default settings are in square brackets '[]'. Continue with configuration dialog? [yes/no]: n

Enter enable mode at the Switch> prompt:
en !-- Recover the old configuration thus: rename flash:config.bak flash:config.text copy flash:config.text system:running-config !-- Then commit new secrets to the configuration: configure terminal enable secret password enable password password line vty 0 15 password password login line con 0 password password write memory

Accidentally Stuck in Zoom aka Screen Magnification in XFCE? Try this.

karma

Using my fresh install of Qubes 4.1.2 I found myself somehow (clearly a result of careless mashing at the keyboard) stuck in an obnoxious screen magnification conundrum. If this sounds like you, try holding down the Alt key and scrolling. If you're on a laptop that does not have designated scroll bars on its (multitouch) touchpad the default XFCE emulation for a scrollwheel is two-fingered scrolling. Now instead of a nuisance we have discovered a handy tool together!

Qubes (as of 4.1.2) Does Not Support SATA Optical Disc Burning

karma

Today I learned that QubesOS, at least as of version 4.1.2 does not support burning CDs, DVDs or Blu-Ray discs via internal SATA drives - at least on the primary controller. According to the official documentation:

Passthrough reading and recording (a.k.a., “burning”) are not supported by Qubes OS. This is not a limitation of Xen, which provides scsiback and scsifront drivers, but of Qubes OS. It will be fixed in the future.

It is necessary to either attach a secondary SATA controller, a USB burner or to burn via dom0 - which of course is strongly recommended against.

furry.media Donation Auction

karma

The furry.media sites are being held ransom to the tune of $170USD/230CAD, due to an unpaid bill with our hosting company. furry.media sites include the under-development VIPlush site, Ychan, TentacleRape.Net and many more sites and services, including our Telegram bot. What this means is that it is no longer possible for me to update, fix, backup or otherwise work on any of these until the bill is paid. If it goes on too long sites will be disconnected (some already are for other reasons but I am currently powerless to fix them).

Due to personal financial struggles I'm not able to cover the bill on my own so I'd like to try something new. I'm asking for donations by paypal to fopspaws [at] gmail.com - the highest donor as of the deadline at midnight, July 19 will receive the following six brand new miniature plushies. Thank you so much for your support! Don't forget to include your shipping address with your donation! For assistance or information please feel free to drop by the foxpa.ws Telegram Group.

[attachment-Z4WxDG]
[attachment-ltpkKx]
[attachment-6MnfL5]

Mounting LUKS Encrypted Drives, Disk Images and Partitions Thereof

karma

Mounting a LUKS encrypted physical medium is a straightforward enough process, per the man page for cryptsetup:
cryptsetup open --type luks /dev/loop0 mapped-name mount /dev/mapper/mapped-name /mnt/location
Note while the man page encourages using the --type luks flag the format will typically be autodetected when omitted.

The same syntax may be used to mount a straight partition image. Things become a little more complicated however when dealing with a full disk image containing multiple partitions, as we are not able to specify partitions with the same ease that a /dev block device avails.

Those familiar with administrating Xen virtualized environs will no doubt be accustomed to using the lomount binary that comes with the distribution for gaining easy access to partitions contained in full-disk images, yet one may find one's self in a position where default repositories don't provide a simple means of installing this tool, or it might necessitate installing a full Xen implementation that may be intrusive and certainly top-heavy in storage-constrained circumstances. I encountered such a situation using a fresh installation of Kali Linux.

One may take one's chances clunkily setting up loop devices with losetup and its -o|--offset flag, but fortunately a shell-scripted drop-in has been published by Pádraig Brady at http://www.pixelbeat.org/scripts/lomount.sh:
#!/bin/sh # Mount partitions within a disk image file # License: LGPLv2 # Author: [email protected] # V1.0 29 Jun 2005 Initial release # V1.1 01 Dec 2005 Handle bootable (DOS) parititons # v1.2 25 Jan 2013 Glen Gray: Handle GPT partitions if [ "$#" -ne "3" ]; then echo "Usage: `basename $0` <image_filename> <partition # (1,2,...)> <mount point>" >&2 exit 1 fi FILE=$1 PART=$2 DEST=$3 if parted --version >/dev/null 2>&1; then # Prefer as supports GPT partitions UNITS=$(parted -s $FILE unit s print 2>/dev/null | grep " $PART " | tr -d 's' | awk '{print $2}') elif fdisk -v >/dev/null 2>&1; then UNITS=$(fdisk -lu $FILE 2>/dev/null | grep "$FILE$PART " | tr -d '*' | awk '{print $2}') else echo "Can't find the fdisk or parted utils. Are you root?" >&2 exit 1 fi OFFSET=`expr 512 '*' $UNITS` mount -o loop,offset=$OFFSET $FILE $DEST

This is an excellent, almost drop-in solution for mounting standard-issue partitions residing in disk image files, however it is not intended for dealing with encrypted volumes. As such, using it as a starting point I have made some modifications:

#!/bin/sh # Mount encrypted partitions within a disk image file # License: LGPLv2 # Original Author: [email protected] # Encryption added by: karma @ https://foxpa.ws/mounting-luks-encrypted-volumes # V1.0 29 Jun 2005 Initial release # V1.1 01 Dec 2005 Handle bootable (DOS) parititons # v1.2 25 Jan 2013 Glen Gray: Handle GPT partitions # v2.0 07 Jun 2023 karma @ foxpa.ws: Modified for LUKS encrypted volumes if [ "$#" -ne "5" ]; then echo "Usage: `basename $0` <image_filename> <partition # (1,2,...)> </dev/loopX> <dm-name> <mount point>" >&2 echo "\n [*] Run losetup -a first to determine free loop devices (i.e. compare assigned loops to available nodes at /dev/loop[0,1,...])" >&2 echo "\t [*] Provide a user-friendly label for dm-name where the volume will be mapped to under /dev/mapper/label" >&2 echo "\n You will be interactively prompted to provide a passphrase; often this is a string of random data that has itself been gpg-encrypted with a passphrase to allow for altering the password used to authenticate without changing the so-called master passphrase which would necessitate re-encrypting the entire volume. Use gpg -d keyfile if this applies to you." >&2 echo "\n To tear down and free the loop device after umounting your volume, run: cryptsetup close dm-name before disconnecting/ejecting or otherwise removing access to the image." >&2 exit 1 fi FILE=$1 PART=$2 LOOP=$3 NAME=$4 DEST=$5 if parted --version >/dev/null 2>&1; then # Prefer as supports GPT partitions UNITS=$(parted -s $FILE unit s print 2>/dev/null | grep " $PART " | tr -d 's' | awk '{print $2}') elif fdisk -v >/dev/null 2>&1; then UNITS=$(fdisk -lu $FILE 2>/dev/null | grep "$FILE$PART " | tr -d '*' | awk '{print $2}') else echo "Can't find the fdisk or parted utils. Are you root?" >&2 exit 1 fi OFFSET=`expr 512 '*' $UNITS` losetup -o $OFFSET $LOOP $FILE cryptsetup open --type luks $LOOP $NAME mount /dev/mapper/$NAME $DEST