summaryrefslogtreecommitdiff
path: root/other/b-scan/doc/bscan.tex
blob: 4da94c3ba4feb7d48f2e6a54cf66729b0e17d376 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
% just run: pdflatex bscan.tex

\ifx\pdfoutput\undefined
\documentclass[11pt,a4paper,twoside]{article}
\else
\documentclass[pdftex,11pt,a4paper,twoside]{article}
\pdfcompresslevel=9
\fi

\ifx\pdfoutput\undefined
\else
\RequirePackage[colorlinks,hyperindex]{hyperref}
\def\pdfBorderAttrs{/Border [0 0 0] }
\fi

\usepackage{fancyhdr}
\pagestyle{fancy}
%\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
%\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
\fancyhf{}
\fancyhead[LE,RO]{\bfseries\thepage}
\fancyhead[LO]{\bfseries\rightmark}
\fancyhead[RE]{\bfseries\leftmark}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0pt}
\addtolength{\headheight}{0.5pt}
\fancypagestyle{plain}{%
    \fancyhead{}%
    \renewcommand{\headrulewidth}{0pt}%
}

\begin{document}

\title{b-scan manual}
\author{b-scan team}
\maketitle
\begin{center}
version 0.0
\end{center}

\tableofcontents


\section{Introduction}
B-scan is a network scan program. It probes a number of hosts for certain
properties and evaluates the responses, saving interesting data in a easy
to understand output format. In contrast to most other network scanning
programs, b-scan aims at being the best in both stability and speed. There are,
however very popular programs that are neither stable nor fast, but have
dozens of useless options you will not find in b-scan.

\section{How b-scan works}

\section{The network layout}
% include graphic how b-scan sees the network

\subsection{Setting up a proper host environment}
\subsection{Common problems}
\subsubsection{MAC address}
In case bscan will complain about `{\tt arp}' not being found, you have to
include the path to `{\tt arp}' in the {\tt PATH} variable. Often it is
found in {\tt /usr/sbin} or {\tt /sbin}, so a simple
`{\tt export PATH=\$PATH:/sbin:/usr/sbin}' before bscan is started will
solve this issue.

In case it still does not work, check whether bscans ARP daemon is running
properly and shows up in {\tt ps}. Then proceed by {\tt ping}ing the source
IP you have choosen and afterwards to a `{\tt arp -n}' to see whether the
correct MAC address shows up with the source IP. In case it does not show
up, you may have a device problem or another host in your LAN is using the
assigned IP.

\section{Options}
\subsection{Target}
\subsubsection{Random mode}
Using the random mode you can scan random IP addresses, for statistical
purposes. It is not recommended to use this random mode to scan complete
networks, there the spread mode fits better, since it takes care of
target-network routers and their load. However if you want to extrapolate
statistically correct data from randomly scanned hosts, this mode is the
right choice. It filters nonsense, reserved, private and multicast addresses
from the random ones and feeds the remaining ones into the scanner. You can
specify a counter which will stop bscan after having scanned a number of
random IPs using the `{\tt :}' suffix:
\begin{verbatim}
$ bscan ... random:2000
\end{verbatim}
Will scan 2000 random IP addresses. If you leave the number out or give
`{\tt :0}', then bscan will scan forever, until it is terminated.


\section{Scans}
\subsection{ICMP}
\subsection{TCP}
\subsection{UDP}
\subsection{special}

\section{Logs}
\subsection{Logformat}
\subsection{Utilities}
\subsubsection{BIND-distribution.awk}
This utility parses the output logs of the {\tt VERSION.BIND} scan and shows
the percentage and count of each BIND version. It expects only properly
formatted lines, for example:

\begin{verbatim}
$ grep "VERSION.BIND" out.log | \
        awk -f contrib/BIND-distribution.awk
\end{verbatim}

\section{B-Scan internals}
\subsection{Directory structure}
\subsection{Code Layout}
\subsubsection{Structures}
\subsubsection{Modules}

\label{references}
\begin{thebibliography}{99}
\bibitem{blablafooauthor1} ICMP scanning blabla
\bibitem{foofooblaauthor2} NMAP portalskasa
\end{thebibliography}

\end{document}