Skip to content

Commit

Permalink
cracking, ICQ
Browse files Browse the repository at this point in the history
  • Loading branch information
yurichev committed Apr 19, 2019
1 parent a8e834b commit 556386a
Show file tree
Hide file tree
Showing 27 changed files with 361 additions and 11 deletions.
17 changes: 12 additions & 5 deletions INSTALL
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
* Compiling on Ubuntu (checked way)
* Compiling on Ubuntu (checked)

1) Get all the packages listed in .travis.yml file.
1) Get these packages:

texlive
texlive-xetex
texlive-generic-extra
texlive-generic-recommended
texlive-science
texlive-fonts-extra

2) For all versions (Russian, English):
make all

For English-only version:
make EN
make RE4B-EN

For Russian-only version:
make RU
make RE4B-RU

* Compiling on Mac OS X 10.8 (unchecked)

1) Get MacTeX: https://www.tug.org/mactex/

2) Run make as it has been described before.

* Windows (unchecked)
* Windows (checked years ago...)

Install TeXlive and use Cygwin.

Expand Down
2 changes: 2 additions & 0 deletions digging_into_code/snapshots_comparing_DE.tex
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ \subsection{Memory \q{snapshots} comparing}

% TODO: пример с какой-то простой игрушкой?

% TBT

\subsubsection{Windows registry}

Es ist auch m\"oglich die Windows Regestry zu vergleichen vor und nach der Programm Installation.
Expand Down
25 changes: 25 additions & 0 deletions digging_into_code/snapshots_comparing_EN.tex
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,31 @@ \subsection{Memory \q{snapshots} comparing}

% TODO: пример с какой-то простой игрушкой?

\subsubsection{A real story from 1999}

\myindex{ICQ}
There was a time of ICQ messenger's popularity, at least in ex-USSR countries.
The messenger had a peculiarity --- some users didn't want to share their online status with everyone.
And you had to ask an \emph{authorization} from that user.
That user could allow you seeing his/her status, or maybe not.

This is what the author of these lines did:

\begin{itemize}
\item Added a user.
\item A user appeared in a contact-list, in a ``wait for authorization'' section.
\item Closed ICQ.
\item Backed up the ICQ database.
\item Loaded ICQ again.
\item User \emph{authorized}.
\item Closed ICQ and compared two databases.
\end{itemize}

It turned out: two database differed by only one byte.
In the first version: \verb|RESU\x03|, in the second: \verb|RESU\x02|.
(``RESU'', presumably, means ``USER'', i.e., a header of a structure where all the information about user was stored.)
That means the information about authorization was stored not at the server, but at the client.

\subsubsection{Windows registry}

It is also possible to compare the Windows registry before and after a program installation.
Expand Down
24 changes: 24 additions & 0 deletions digging_into_code/snapshots_comparing_RU.tex
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,30 @@ \subsection{Сравнение \q{снимков} памяти}

% TODO: пример с какой-то простой игрушкой?

\subsubsection{Реальная история из 1999}

\myindex{ICQ}
В то время был популярен мессенджер ICQ, по крайней мере, в странах бывшего СССР.
У мессенджера была особенность --- некоторые пользователи не хотели, чтобы все знали, в онлайне они или нет.
И для начала у того пользователя нужно было запросить \emph{авторизацию}.
Тот человек мог разрешить вам видеть свой статус, а мог и не разрешить.

Автор сих строк сделал следующее.

\begin{itemize}
\item Добавил человека. Он появился в контакт-листе, в разделе ``wait for authorization''.
\item Выгрузил ICQ.
\item Сохранил базу ICQ в другом месте.
\item Загрузил ICQ снова.
\item Человек \emph{авторизировал}.
\item Выгрузил ICQ и сравнил две базы.
\end{itemize}

Выяснилось: базы отличались только одним байтом.
В первой версии: \verb|RESU\x03|, во второй \verb|RESU\x02|.
(``RESU'', надо думать, означало ``USER'', т.е., заголовок структуры, где хранилась информация о пользователе.)
Это означало, что информация об авторизации хранилась не на сервере, а в клиенте.

\subsubsection{Реестр Windows}

А еще можно вспомнить сравнение реестра Windows до инсталляции программы и после.
Expand Down
40 changes: 34 additions & 6 deletions ff/XOR/main.tex
Original file line number Diff line number Diff line change
@@ -1,18 +1,46 @@
\mysection{\RU{Примитивное XOR-шифрование}\EN{Primitive XOR-encryption}\FR{Chiffrement primitif avec XOR}}
\mysection{\RU{Примитивное XOR-шифрование}\EN{Primitive XOR-encryption}\FR{Chiffrement primitif avec XOR}\DEph{}}
\label{simple_XOR_encryption}

\ifdefined\RUSSIAN
В русскоязычной литературе также используется термин \emph{гаммирование}.
\fi

% subsections
\EN{\input{ff/XOR/simplest/main_EN}}\FR{\input{ff/XOR/simplest/main_FR}}
\EN{\input{ff/XOR/ng/main_EN}}\RU{\input{ff/XOR/ng/main_RU}}%
\EN{\input{ff/XOR/simplest/main_EN}}
\FR{\input{ff/XOR/simplest/main_FR}}
\DE{\input{ff/XOR/simplest/main_DE}}

\EN{\input{ff/XOR/ng/main_EN}}
\RU{\input{ff/XOR/ng/main_RU}}
\FR{\input{ff/XOR/ng/main_FR}}
\EN{\input{ff/XOR/4byte/main_EN}}\RU{\input{ff/XOR/4byte/main_RU}}%

\EN{\input{ff/XOR/4byte/main_EN}}
\RU{\input{ff/XOR/4byte/main_RU}}
\FR{\input{ff/XOR/4byte/main_FR}}
\EN{\input{ff/XOR/mask_1/main_EN}}\RU{\input{ff/XOR/mask_1/main_RU}}%

\EN{\input{ff/XOR/mask_1/main_EN}}
\RU{\input{ff/XOR/mask_1/main_RU}}
\FR{\input{ff/XOR/mask_1/main_FR}}
\EN{\input{ff/XOR/mask_2/main_EN}}\RU{\input{ff/XOR/mask_2/main_RU}}%

\EN{\input{ff/XOR/mask_2/main_EN}}
\RU{\input{ff/XOR/mask_2/main_RU}}
\FR{\input{ff/XOR/mask_2/main_FR}}

\ifdefined\RUSSIAN
\subsection{Домашнее задание}

Очень древняя текстовая игра под MS-DOS конца 80-х.
Чтобы скрыть информацию об игре от игрока, файлы данных, скорее всего, чем-то про-XOR-ены:
\url{https://beginners.re/homework/XOR_crypto_1/destiny.zip}.
Попробуйте разобраться...
\fi

\ifdefined\ENGLISH
\subsection{Homework}

An ancient text adventure for MS-DOS, developed in the end of 1980's.
To conceal game information from player, data files, most likely, XOR-ed with something:
\url{https://beginners.re/homework/XOR_crypto_1/destiny.zip}.
Try to get into...
\fi

1 change: 1 addition & 0 deletions macro_lang_DE.tex
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,5 @@
\newcommand{\MLinputA}{\DEph{}}
\newcommand{\MLinputB}{\DEph{}}
\newcommand{\MLoutput}{\DEph{}}
\newcommand{\SoftwareCracking}{\DEph{}}

2 changes: 2 additions & 0 deletions macro_lang_EN.tex
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,6 @@
\newcommand{\MLinputA}{input A}
\newcommand{\MLinputB}{input B}
\newcommand{\MLoutput}{output}
\newcommand{\SoftwareCracking}{Software cracking}


1 change: 1 addition & 0 deletions macro_lang_ES.tex
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,5 @@
\newcommand{\MLinputA}{\ESph{}}
\newcommand{\MLinputB}{\ESph{}}
\newcommand{\MLoutput}{\ESph{}}
\newcommand{\SoftwareCracking}{\ESph{}}

1 change: 1 addition & 0 deletions macro_lang_FR.tex
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,5 @@
\newcommand{\MLinputA}{entrée A}
\newcommand{\MLinputB}{entrée B}
\newcommand{\MLoutput}{sortie}
\newcommand{\SoftwareCracking}{\FRph{}}

1 change: 1 addition & 0 deletions macro_lang_IT.tex
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,5 @@
\newcommand{\MLinputA}{input A}
\newcommand{\MLinputB}{input A}
\newcommand{\MLoutput}{output}
\newcommand{\SoftwareCracking}{\ITph{}}

1 change: 1 addition & 0 deletions macro_lang_JP.tex
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,5 @@
\newcommand{\MLinputA}{入力A}
\newcommand{\MLinputB}{入力B}
\newcommand{\MLoutput}{出力}
\newcommand{\SoftwareCracking}{\JPph{}}

1 change: 1 addition & 0 deletions macro_lang_NL.tex
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@
\newcommand{\RegHeader}{ 7th & 6th & 5th & 4th & 3rd & 2nd & 1st & 0th }

\newcommand{\ReturnAddress}{Return Adres}
\newcommand{\SoftwareCracking}{\NLph{}}

2 changes: 2 additions & 0 deletions macro_lang_PL.tex
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@

% x86 registers tables
\newcommand{\RegHeaderTop}{ \multicolumn{8}{ | c | }{ \PLph{} } }
\newcommand{\SoftwareCracking}{\PLph{}}

1 change: 1 addition & 0 deletions macro_lang_PTBR.tex
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,5 @@
\newcommand{\MLStackOverflow}{\PTBRph{}}
\newcommand{\MLStartOfHeap}{começo da heap}
\newcommand{\MLStartOfStack}{começo da pilha}
\newcommand{\SoftwareCracking}{\PTBRph{}}

1 change: 1 addition & 0 deletions macro_lang_RU.tex
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,5 @@
\newcommand{\MLinputA}{вход А}
\newcommand{\MLinputB}{вход Б}
\newcommand{\MLoutput}{выход}
\newcommand{\SoftwareCracking}{Взлом ПО}

1 change: 1 addition & 0 deletions macro_lang_TR.tex
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
\newcommand{\TitleRE}{Acemiler için Tersine Mühendislik}
\newcommand{\SoftwareCracking}{\TRph{}}

1 change: 1 addition & 0 deletions patterns/01_helloworld/string_patching_DE.tex
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ \subsubsection{String-Patching (Linux x64)}

% TBT
%\subsubsection{This is a real story of software cracking}
%\label{\SoftwareCracking}
%
%An image processing software, when not registered, added watermarks,
%like ``This image was processed by evaluation version of [software name]'', across a picture.
Expand Down
1 change: 1 addition & 0 deletions patterns/01_helloworld/string_patching_EN.tex
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ \subsubsection{String patching (Linux x64)}
\TT{q} quits.

\subsubsection{This is a real story of software cracking}
\label{\SoftwareCracking}

An image processing software, when not registered, added watermarks,
like ``This image was processed by evaluation version of [software name]'', across a picture.
Expand Down
1 change: 1 addition & 0 deletions patterns/01_helloworld/string_patching_FR.tex
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ \subsubsection{Modification de chaînes (Linux x64)}

% TBT
%\subsubsection{This is a real story of software cracking}
%\label{\SoftwareCracking}
%
%An image processing software, when not registered, added watermarks,
%like ``This image was processed by evaluation version of [software name]'', across a picture.
Expand Down
1 change: 1 addition & 0 deletions patterns/01_helloworld/string_patching_IT.tex
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ \subsubsection{String patching (Linux x64)}

% TBT
%\subsubsection{This is a real story of software cracking}
%\label{\SoftwareCracking}
%
%An image processing software, when not registered, added watermarks,
%like ``This image was processed by evaluation version of [software name]'', across a picture.
Expand Down
1 change: 1 addition & 0 deletions patterns/01_helloworld/string_patching_JA.tex
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ \subsubsection{文字列のパッチ(Linux x64)}

% TBT
%\subsubsection{This is a real story of software cracking}
%\label{\SoftwareCracking}
%
%An image processing software, when not registered, added watermarks,
%like ``This image was processed by evaluation version of [software name]'', across a picture.
Expand Down
1 change: 1 addition & 0 deletions patterns/01_helloworld/string_patching_PL.tex
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ \subsubsection{Korekcja linii (Linux x64)}

% TBT
%\subsubsection{This is a real story of software cracking}
%\label{\SoftwareCracking}
%
%An image processing software, when not registered, added watermarks,
%like ``This image was processed by evaluation version of [software name]'', across a picture.
Expand Down
1 change: 1 addition & 0 deletions patterns/01_helloworld/string_patching_RU.tex
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ \subsubsection{Коррекция строки (Linux x64)}
\TT{q} заканчивает работу.

\subsubsection{Это реальная история взлома ПО}
\label{\SoftwareCracking}

Некое ПО обрабатывало изображения, и когда не было зарегистрированно, оно добавляло водяные знаки,
вроде ``This image was processed by evaluation version of [software name]'', поперек картинки.
Expand Down
2 changes: 2 additions & 0 deletions patterns/075_cracking/main.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
\EN{\input{patterns/075_cracking/main_EN}}
\RU{\input{patterns/075_cracking/main_RU}}
Loading

0 comments on commit 556386a

Please sign in to comment.