Article View: alt.privacy.anon-server
Article #252386New Hsub Finder Procedure
From: Rooster
Date: Thu, 15 Dec 2011 21:39
Date: Thu, 15 Dec 2011 21:39
305 lines
16974 bytes
16974 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Sorry for being away preoccupied, but I have been busy as a beaver. I'm back
now. :)
I have written a new little procedure for finding your hsubs from
alt.anonymous.messages, which will run on Windows OS. It is a batch program
for the command shell. Frankly, I prefer my previous program by itself, which
works effectively and easily; and, despite its all-or-nothing approach of
attempting to decipher all messages by using a list of your symmetric passwords
or the asymmetric passphrases of your public keys, while altogether ignoring
the whole hsub/esub issues, it can quickly eliminate the messages you do not
need; and if you want to search either symmetric or asymmetric only, it can do
that as well, even more quickly.
Nonetheless, for those who may want to approach the problem more selectively,
this new procedure will satisfy that requirement. It has no fancy gui, and it
is not designed to replace something else; it is merely an alternative for you
to have available. It is simple but effective. Down the road, when Richard
finishes his much anticipated brainchild program for getting the same result,
which we can expect he will make to integrate nicely with QSL and run on
Windows, you can jump right on it without hesitation. On the other hand, if you
are not using QSL (may god bless you anyway) and you have not found an
effective or satisfying alternative, this one is now available to you. It works
quite nicely and quickly. Anyway, some of us just like tinkering with things.
(I can see no reason why it should not work on your system as well as it does
on mine.)
All of the other methods I have seen for finding an hsub are written with
another programming language, like perl or python, etc. Mine is not. Like my
previous program, it is a batch script written using the Windows command shell
routines. Even so, I have utilized two other little programs in the procedure
because Windows itself does not have a command that can generate binary files
from hex data or one that can generate a sha256 hash from binary data, both of
which are necessary to decode your hsub. At least, I have not seen any Windows
commands that do those functions. If you know of one, feel free to holler at
me. Regardless of my use of these two other programs, this batch file runs
completely in the Windows shell environment. I will post the batch file now
and give an explanation of the procedure and supplementary programs I used down
below it.
- --------------------------------
@echo off
echo.
echo Beginning Rooster's hsub searching procedure.
echo.
echo.
if not exist hsubpw (
echo There is no password file named hsubpw. Aborting procedure.
goto EOF
)
if not exist *.txt (
dir/b & echo There is no message file with '.txt' suffix. Aborting procedure.
goto EOF
)
rem: removing file names that suck
echo Checking for files with problematic names...
dir/b |findstr /i "[!\&^]">>badnames1
md badnames
FOR /f "tokens=* eol=\" %%G in (badnames1) do (
move "%%G" .\badnames\"%%G"
)
FOR /f "tokens=* eol=\" %%H in ('dir/b *.txt') do (
echo %%H|find " ">>badnames2
)
FOR /f "tokens=* eol=\" %%I in (badnames2) do (
move "%%I" .\badnames\"%%I"
)
rem: removing spaces from file names
setlocal EnableDelayedExpansion
FOR %%f in (*.txt) do SET filename=%%f & CALL:sub1 %%f
GOTO jump1
:sub1
set nospace=%filename: =%
rename "%*" %nospace%
GOTO :eof
:jump1
rem: continue removing files with non-conformant names
echo.
echo Sorting data files to create message digest...
echo.
for %%A in (*.txt) do @(
set ending=%%A
if /i !ending:~48! NEQ .txt (
move "%%A" .\badnames\"%%A"
) else (
call:sub2 %%A
))
goto jump2
rem: creating list of first 16 hex characters of files' names
:sub2
set z=%1
echo:%z:~0,16%>>hex16list
goto :eof
:jump2
rem: creating temporary binary file from 8 bytes of hex
echo Generating binary data from hsubs...
echo.
setlocal
for /f "" %%X in (hex16list) do (
echo %%X|c:\cygwin\bin\xxd.exe -r -p - randnum-out
for /f "tokens=*" %%P in ('type hsubpw') do call:sub3 %%P
)
goto jump3
rem:concatenating passwords to end of ascii code in temp file; and making
sha256 hash
:sub3
echo Creating hash digest. This can take a while depending on number of
files...
echo.
copy randnum-out combined >nul
<nul set/p z2=%1>>combined
java -jar c:\progra~1\jacksum\jacksum.jar -a sha256 -g 16 -O outfile -F
#CHECKSUM combined
for /f "" %%R in (outfile) do echo %%R>>hex32list
goto:eof
:jump3
rem: copying matches into validate folder and creating log of the result of
search.
echo.
echo Comparing file names to digest for valid matches...
echo.
for /f "" %%K in (hex32list) do (
dir/b |find /i "%%K">>result.log
)
for /f "" %%B in (result.log) do (
xcopy %%B .\validate\ /v/I
erase /f/q %%B
)
echo.
echo Cleaning up...
erase /f/q badnames? hex16list randnum-out combined hex32list outfile
type nul>hsubpw
type nul>combined
erase /f/q hsubpw combined
echo.
if exist validate (
(echo: There are files ready for validation)
) else (
(echo: There are no files for validation)
)
echo.
echo Finished processing. Check the result.log for any matches.
echo.
:EOF
- --------------------------------------
It really is simple to make this procedure work right. To start with, all you
need to do is download the messages you want to search through from 'a.a.m.',
and copy them unaltered as text files into a folder of your liking in your
directory. The messages should have a suffix of '.txt', and they should be
named with the same name you see in 'a.a.m.', the hsub. Each message saved in
the folder as an individual text file: hsub1.txt, hsub2.txt, etc.. Don't change
the names in any way. Then, put this batch file in the same folder using
whatever name you like, though the name "rooster.bat" does have a nice ring to
it. Then, put the password file into the same folder. It must be named
'hsubpw'. Notice there is no suffix. This name is necessary for the procedure
to work as it will reference it by that name. If you want to change it, change
it in the batch too, but do not give it an extension with '.txt', which only
the messages should have. The password file should be a text file, created
with a text editor like Notepad. Mine saves text files in ANSI by default, and
with a text extension, which I then need to remove after saving it. Do not
forget that step. That's pretty much all there is to it, really. Just run the
batch file with the password file and the group of text files of messages. It
does the rest.
Now about the batch file and the two supplemental programs I used, whose names
you will no doubt notice in the script itself. The first program is called
'xxd.exe', and it is already familiar to some of the linux guys here, I
suspect. Even so, it runs on Windows also. It was ported both to the cygwin
environment for Windows and to the Win32 environment. You can read about it
here: http://linuxcommand.org/man_pages/xxd1.html. It is not difficult to
understand. Its purpose is simply this: to "make a hexdump or do the reverse."
For my purposes in this procedure I use it to "do the reverse". I take the
first 16 hex characters of the hsubs and use the data to make a binary file out
of them. I then concatenate the hsub passwords to this data in the Windows
scripting routine; then, using the second supplemental program, called
'jacksum', which you can find here: http://www.jonelo.de/java/jacksum/; I can
generate a sha256 hash from the combined binary data file. This little gem is
what I need to find the matching hsub.
Both of these two programs are well made, respected and fast. They are also
open source, and best of all they are free. As I mentioned, the program
'xxd.exe' was made for cygwin, which runs on top of windows; and if you have
that installed, you may already have 'xxd' too. If not, it is easy to install
with cygwin setup utility. Get it, as you will need it. Although it can be
installed with cygwin and run in the bash shell, once installed it also runs
just as well in the Windows command shell. It does not have to be run in bash,
and I do not use bash for this procedure. Alternatively, you could use a
Win32 port of it, available here: https://code.google.com/p/unix-cmd-
win32/downloads/detail?name=xxd.exe&can=2&q=. It installs simply, but you will
need to take note of where it is on your directory so that you can put that
path into the script if it differs from the path I used, namely,
c:\cygwin\bin\xxd.exe. Once copied into a folder in your directory, it is ready
to go. Simple Simon stuff.
The second program, 'jacksum', is not much more involved, and it comes with a
nice installer. It is written in Java, but most of us already have java
installed. The documentation for 'jacksum' is exceptionally good, truly. Let
the installer do its magic, and you should be fine. It can be run from a gui,
but I do not use it here in that way. (It can be installed both ways actually,
if you want, having a very nice integration with Windows Explorer.) 'Jacksum'
is fast at what it does: to compute and verify checksums and message digests;
and it will compute just about any kind of hash you need, using binary, ascii
or hex data sources. It can do much more, but that sufficed for my purposes
here. Read about it and you will be impressed, I believe. Just install it and
make sure it is running correctly in the Windows shell; then make a reference
to its path in "your" directory following the pattern I used in the script
above: c:\progra~1\jacksum\jacksum.jar. That's it for the supplements.
I have noticed a number of messages in a.a.m. that do not have hsub-styled
subjects. Most of these, I suspect, are just troll droppings, and they can be
discarded. Feel free to delete them if you are inclined, but my procedure takes
them into account and puts all such crapola into a folder called "badnames."
You will see it after the procedure finishes. Do what you will with them. I do
not want to delete them in my script for the outside chance that one of them
may be important to someone. You can decide their fate yourselves. I have to
remove them from this script because they do not process correctly. It is
after all for hsub messages only, and these are not such, although they may
have value for someone. These abberant messages fall into three categories for
my purposes, and it is these that I move into the 'badnames' folder: those with
subject names that include uncooperative characters; those with spaces in their
names; or those with names whose lengths are not 48 characters in number. All
of these are not hsub, and they are put away into 'badnames' folder.
When the procedure is finishing up, it deletes the temp files used inside the same messages folder during the processing, as well as the 'hsubpw' file with passwords. (That is all it deletes.) We all know that Windows 'delete' or 'erase' command does not securely remove files. If this is a concern of yours, you will need to take steps to delete these files more securely. Personally, I recommend you download and install the program called 'sdelete', which you can get here: http://technet.microsoft.com/en-us/sysinternals/bb897443. It is excellent, and I say that because it is well maintained, easy to use and effective. It is one of the options available as a setting preconfigured for use in Sandboxie, if that helps you to appreciate its value. I have tested its effectiveness using a recovery program to see how well it fared. It did resist recovery. If you choose to install it and want to utilize it in my script in place of the standard Windows commands, in my script (three places) wherever you see the command 'erase /f/q', you can substitute this: '<path>\sdelete -p 5 -a'. That will do it securely. It's your choice. It's your passwords. It's your hsubs.
The script will move any valid--hsub positive--messages into a folder called
'validate.' When doing so, it will advise you of it on the monitor briefly. I
also made it create a little file in the same folder called the 'result.log',
which will keep a record of your valid messages that it finds, if there were
any. That is it for this script's output. To give you an idea of how fast it
works, if you are wondering, I put 100 random messages into the folder along
with five of them that had bad names (a number well in excess of the norm for
aam) and three valid messages for the one password I used in this particular
test. It processed the batch perfectly in about 65 seconds. Bear in mind that
it will work with multiple passwords in the 'hsubpw' file, so long as they are
each on separate lines and in text. Of course, the more passwords you use, the
more time it would take because the problem is to combine 'each' password with
each hsub to see whether a valid match is generated. As far as the password
characters themselves, there should be no need whatsoever to make adjustments
for any special characters because the routine does not send them directly to
another program through a pipe such that it would be necessary to escape
certain special characters. Simply put your passwords on separate lines in the
text file named 'hsubpw'.
Now when it has finished, you will have a badnames folder for you to decide
upon, a validate folder with any valid messages, along with a results.log, this
batch file, and all the other invalid messages. If you failed to include a
password file or a group of 'a.a.m.' messages in text format in this folder at
the beginning, the script will tell you about it and will abort deliberately,
deleting nothing. It will be left to you to decipher your messages as the
purpose of this procedure is merely to find them for you, and it does that
nicely with minimal effort. On the other hand, if you would like to avoid
having to go through the effort of decrypting all of these messages by yourself
manually, and you would prefer to have a program do it for you automatically,
you may of course take your valid hsub messages, keeping them unaltered in the
folder where this routine leaves them, and allow them to be run through the
procedure I created previously to this one. It will do so for you. All you
would need to do is to have a separate file that includes your symmetric or
asymmetric passwords, put it into the folder with the valid messages along with
the first batch program, start it up and wait a few seconds. Your
symmetrically encrypted messages would be deciphered automatically to reveal
what is underneath, be it plain text message or yet another layer of
assymetrically encrypted message, and already asymmetrically encoded messages
would be decipher to their plain text content. As a matter of fact, it would
be a fairly easy matter to combine these two routines with another scripted
procedure to do both in succession, if I saw the demand for doing so. For
those of you who may want to see the first routine, I will post it for you here
again. muchas gracias :)
-----BEGIN PGP SIGNATURE-----
Version: N/A
iQGcBAEBAgAGBQJO6lDnAAoJEO3Co03SMUtBel4L+gOdlk5gJXDVG37UwXA9gbfU
CGTMaQOSoSdW/v/9PN9Zs5jXcSMac0/0OESwsXRdolBPP79bKkgltqFtyKztc/nu
FP1DmRMBTsZIkAR+d+oGSc6Lg5MlmGyShLeZV9gfHMmV8u2qklzgU577KLkR4l5f
K3EOPFDI+CdLx64RypYjFu4dZhq4TuuGbZVxKE0jR1fxR/QcaGfFrrxFFxwGBM1I
qltQWdg5E/ipV3zvkbR40VY4VkyVUsJoHT4NO2SNltFpRmpeON4i0d3HWBn2D0fm
wxWTYO8qfCdE9D7bu6HUNjfRKVHGuXGC/qZgGlxRIbm9kVNa5w/21VQcsFHHezvx
+oEoBjPF6l73hQmkQme59j5fKfn5eOpC7k4z2r+1iuWe5PBWk8foP57wm8/FCWJO
UL4pRZb2rf8cBurv+FRb7dksfqn0bHlCy8i5ehE5LWUSi8vawCnUI7+6RbXbA50x
+02O7xyblbI77E7Dxq/nlE93D4mFrPy5y5WUYSQMLA==
=8Y8H
-----END PGP SIGNATURE-----
--
Rooster@thechickencoop.net
Technical Details
Message-ID:
<GE2BSOK140893.2355092593@reece.net.au>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.dca3.giganews.com!border2.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!goblin3!goblin.stu.neva.ru!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!news-transit.tcx.org.uk!rt.uk.eu.org!newsfeed.eweka.nl!feeder3.eweka.nl!81.171.88.16.MISMATCH!eweka.nl!hq-usenetpeers.eweka.nl!188.40.76.149.MISMATCH!mail2news.mixmin.net!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <GE2BSOK140893.2355092593@reece.net.au> Subject: New Hsub Finder Procedure Date: Thu, 15 Dec 2011 21:39:08 +0000 From: Anonymous-Remailer@See.Comment.Header (Rooster) 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.dca3.giganews.com!border2.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!goblin3!goblin.stu.neva.ru!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!news-transit.tcx.org.uk!rt.uk.eu.org!newsfeed.eweka.nl!feeder3.eweka.nl!81.171.88.16.MISMATCH!eweka.nl!hq-usenetpeers.eweka.nl!188.40.76.149.MISMATCH!mail2news.mixmin.net!not-for-mail X-Remailer-Contact: abuse@reece.net.au (English Only Please) Newsgroups: alt.privacy.anon-server Lines: 306 Injection-Info: mail2news.mixmin.net; mail-complaints-to=abuse@mixmin.net X-Original-Bytes: 16742