Technical discoveries and things I don’t want to forget

Welcome to the Packetcyclotron!

Mounting filesystem from Windows in WSL

So I don’t forget How to mount something from the windows environment that wasn’t automatically mounted in WSl. I always seem to forget how to do this: cd /mnt sudo mkdir mymountpoint sudo mount -t drvfs X: /mnt/mymountpoint

<span title='2022-09-03 16:44:23 -0400 -0400'>September 3, 2022</span>&nbsp;·&nbsp;1 min&nbsp;·&nbsp;Mark G

Windows Registry Quick Note

A quick note on list windows registry You can list the contents of the registry like a file system, for some reason I had not realized this. For example: dir -recurse -erroraction ignore HKCU:\ will list the contents of HKEY_CURRENT_USER More to come on this, but just wanted to not forget.

<span title='2022-06-20 22:10:55 -0400 -0400'>June 20, 2022</span>&nbsp;·&nbsp;1 min&nbsp;·&nbsp;Mark G

Using Pwsh to Search for Files

Just a few quick notes on how to search for files on Windows using native powershell commands. Get-ChildItem Is the key. By default this just gives us the same output as boring old ‘dir’ from our cmd.exe days but with the large set of options it has we can use it as a file finding powerhouse. Under pwsh you can also just use ‘dir’ or ’ls’ which are aliases for this....

<span title='2022-06-06 01:08:47 -0400 -0400'>June 6, 2022</span>&nbsp;·&nbsp;1 min&nbsp;·&nbsp;Mark G

Winsxs Size Cleanup

The short answer To see the size that the WinSxS directory takes up: Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore To clean up if necessary: Dism.exe /online /Cleanup-Image /StartComponentCleanup To do a really deep cleanup (you will no longer be able to roll back any previous updates): Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase Background While helping someone clean up some disk space on their Windows desktop I decided it would be a good idea to collect the information about one of the more mysterious things together in one spot for easy access....

<span title='2022-05-28 22:14:35 -0400 -0400'>May 28, 2022</span>&nbsp;·&nbsp;2 min&nbsp;·&nbsp;Mark G

Tcpdump TCP Filters

Background It is occasionally useful to be able to capture packets with only defined TCP flags set while troubleshooting some issues. While you can always just search out the magic command line to do so, I had wanted to understand how the filters worked. I figured this would be a useful item to have in my toolkit. For example lets capture any TCP packet that has SYN set: root@pi3:~# tcpdump -c 3 -n -i eth0 'tcp[13] & 2!...

<span title='2020-05-22 22:58:48 -0400 -0400'>May 22, 2020</span>&nbsp;·&nbsp;4 min&nbsp;·&nbsp;Mark G