You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
387 lines
12 KiB
387 lines
12 KiB
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
<title>Network Scanning - exercises! :: Swarmlab faq</title>
|
|
<link rel="canonical" href="http://docs.swarmlab.io/SwarmLab-HowTos/swarmlab/docs/swarmlab_sec-intro/docs/exer.html">
|
|
<meta name="generator" content="Antora 2.3.4">
|
|
<link rel="stylesheet" href="../../_/css/site.css">
|
|
<link rel="stylesheet" href="../../_/css/search.css">
|
|
<script>var uiRootPath = '../../_'</script>
|
|
</head>
|
|
<body class="article">
|
|
<header class="header">
|
|
<nav class="navbar">
|
|
<div class="navbar-brand">
|
|
<a class="navbar-item" href="http://docs.swarmlab.io/SwarmLab-HowTos/swarmlab/docs">Swarmlab faq</a>
|
|
<button class="navbar-burger" data-target="topbar-nav">
|
|
<span></span>
|
|
<span></span>
|
|
<span></span>
|
|
</button>
|
|
</div>
|
|
<div id="topbar-nav" class="navbar-menu">
|
|
<div class="navbar-end">
|
|
<a class="navbar-item" href="#">Home</a>
|
|
<div class="navbar-item has-dropdown is-hoverable">
|
|
<a class="navbar-link" href="#">Products</a>
|
|
<div class="navbar-dropdown">
|
|
<a class="navbar-item" target ="hybridgit" href="https://git.swarmlab.io:3000/zeus/swarmlab-hybrid">Hybrid</a>
|
|
<a class="navbar-item" target ="venusgit" href="https://git.swarmlab.io:3000/swarmlab/venus-client">Venus</a>
|
|
</div>
|
|
</div>
|
|
<div class="navbar-item has-dropdown is-hoverable">
|
|
<a class="navbar-link" href="#">Services</a>
|
|
<div class="navbar-dropdown">
|
|
<a class="navbar-item" target ="hybrid" href="https://api-client.swarmlab.io:8088/">Hybrid</a>
|
|
<a class="navbar-item" target ="venus" href="https://api-client.swarmlab.io:8088/">Venus</a>
|
|
</div>
|
|
</div>
|
|
<div class="navbar-item">
|
|
<input id="search-input" type="text" placeholder="Search docs">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
</header>
|
|
<div class="body">
|
|
<div class="nav-container" data-component="swarmlab_sec-intro" data-version="docs">
|
|
<aside class="nav">
|
|
<div class="panels">
|
|
<div class="nav-panel-menu is-active" data-panel="menu">
|
|
<nav class="nav-menu">
|
|
<h3 class="title"><a href="index.html">swarmlab_sec-intro</a></h3>
|
|
<ul class="nav-list">
|
|
<li class="nav-item" data-depth="0">
|
|
<ul class="nav-list">
|
|
<li class="nav-item" data-depth="1">
|
|
<a class="nav-link" href="index.html">Network Scanning</a>
|
|
</li>
|
|
<li class="nav-item" data-depth="1">
|
|
<a class="nav-link" href="index-analysis.html">Network analysis</a>
|
|
</li>
|
|
<li class="nav-item is-current-page" data-depth="1">
|
|
<a class="nav-link" href="exer.html">Exercises</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
<div class="nav-panel-explore" data-panel="explore">
|
|
<div class="context">
|
|
<span class="title">swarmlab_sec-intro</span>
|
|
<span class="version">docs</span>
|
|
</div>
|
|
<ul class="components">
|
|
<li class="component">
|
|
<a class="title" href="../../CloudComputing_Lab/docs/index.html">CloudComputing_Lab</a>
|
|
<ul class="versions">
|
|
<li class="version is-latest">
|
|
<a href="../../CloudComputing_Lab/docs/index.html">docs</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="component">
|
|
<a class="title" href="../../swarmlab_faq/docs/index.html">swarmlab_faq</a>
|
|
<ul class="versions">
|
|
<li class="version is-latest">
|
|
<a href="../../swarmlab_faq/docs/index.html">docs</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="component">
|
|
<a class="title" href="../../swarmlab_how-to-build-a-Swarmlab-service/docs/index.html">swarmlab_how-to-build-a-Swarmlab-service</a>
|
|
<ul class="versions">
|
|
<li class="version is-latest">
|
|
<a href="../../swarmlab_how-to-build-a-Swarmlab-service/docs/index.html">docs</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="component">
|
|
<a class="title" href="../../swarmlab_infrastructure-as-code/docs/index.html">swarmlab_infrastructure-as-code</a>
|
|
<ul class="versions">
|
|
<li class="version is-latest">
|
|
<a href="../../swarmlab_infrastructure-as-code/docs/index.html">docs</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="component">
|
|
<a class="title" href="../../swarmlab_iot-sensor-node/docs/index.html">swarmlab_iot-sensor-node</a>
|
|
<ul class="versions">
|
|
<li class="version is-latest">
|
|
<a href="../../swarmlab_iot-sensor-node/docs/index.html">docs</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="component">
|
|
<a class="title" href="../../swarmlab_network-adhoc/docs/index.html">swarmlab_network-adhoc</a>
|
|
<ul class="versions">
|
|
<li class="version is-latest">
|
|
<a href="../../swarmlab_network-adhoc/docs/index.html">docs</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="component">
|
|
<a class="title" href="../../swarmlab_poc-datacollector/docs/index.html">swarmlab_poc-datacollector</a>
|
|
<ul class="versions">
|
|
<li class="version is-latest">
|
|
<a href="../../swarmlab_poc-datacollector/docs/index.html">docs</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="component">
|
|
<a class="title" href="../../swarmlab_raspi-docker/docs/index.html">swarmlab_raspi-docker</a>
|
|
<ul class="versions">
|
|
<li class="version is-latest">
|
|
<a href="../../swarmlab_raspi-docker/docs/index.html">docs</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="component is-current">
|
|
<a class="title" href="index.html">swarmlab_sec-intro</a>
|
|
<ul class="versions">
|
|
<li class="version is-current is-latest">
|
|
<a href="index.html">docs</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="component">
|
|
<a class="title" href="../../swarmlab_sec-iptables/docs/index.html">swarmlab_sec-iptables</a>
|
|
<ul class="versions">
|
|
<li class="version is-latest">
|
|
<a href="../../swarmlab_sec-iptables/docs/index.html">docs</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="component">
|
|
<a class="title" href="../../swarmlab_sec-ssh-tunneling/docs/index.html">swarmlab_sec-ssh-tunneling</a>
|
|
<ul class="versions">
|
|
<li class="version is-latest">
|
|
<a href="../../swarmlab_sec-ssh-tunneling/docs/index.html">docs</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="component">
|
|
<a class="title" href="../../swarmlab_sidecar-firefox/docs/index.html">swarmlab_sidecar-firefox</a>
|
|
<ul class="versions">
|
|
<li class="version is-latest">
|
|
<a href="../../swarmlab_sidecar-firefox/docs/index.html">docs</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="component">
|
|
<a class="title" href="../../swarmlab_tech-list/docs/index.html">swarmlab_tech-list</a>
|
|
<ul class="versions">
|
|
<li class="version is-latest">
|
|
<a href="../../swarmlab_tech-list/docs/index.html">docs</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="component">
|
|
<a class="title" href="../../swarmlab_xelatex-thesis/docs/index.html">swarmlab_xelatex-thesis</a>
|
|
<ul class="versions">
|
|
<li class="version is-latest">
|
|
<a href="../../swarmlab_xelatex-thesis/docs/index.html">docs</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</aside>
|
|
</div>
|
|
<main class="article">
|
|
<div class="toolbar" role="navigation">
|
|
<button class="nav-toggle"></button>
|
|
<a href="../../swarmlab_faq/docs/index.html" class="home-link"></a>
|
|
<nav class="breadcrumbs" aria-label="breadcrumbs">
|
|
<ul>
|
|
<li><a href="index.html">swarmlab_sec-intro</a></li>
|
|
<li><a href="exer.html">Exercises</a></li>
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
<div class="content">
|
|
<aside class="toc sidebar" data-title="Contents" data-levels="2">
|
|
<div class="toc-menu"></div>
|
|
</aside>
|
|
<article class="doc">
|
|
<h1 class="page">Network Scanning - exercises!</h1>
|
|
<div class="sect1">
|
|
<h2 id="_find_tcp_ports_connections"><a class="anchor" href="#_find_tcp_ports_connections"></a>Find TCP Ports connections</h2>
|
|
<div class="sectionbody">
|
|
<div class="ulist">
|
|
<ul>
|
|
<li>
|
|
<p>Connect to master</p>
|
|
</li>
|
|
<li>
|
|
<p>Find All TCP Ports connections</p>
|
|
<div class="ulist">
|
|
<ul>
|
|
<li>
|
|
<p>save it</p>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</li>
|
|
<li>
|
|
<p>Find All UDP Ports connections</p>
|
|
<div class="ulist">
|
|
<ul>
|
|
<li>
|
|
<p>save it</p>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</li>
|
|
<li>
|
|
<p>run</p>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="listingblock">
|
|
<div class="content">
|
|
<pre class="highlightjs highlight"><code class="language-bash hljs" data-lang="bash">cd /project/courses/fluentd
|
|
# run
|
|
./fluentd.yml.sh</code></pre>
|
|
</div>
|
|
</div>
|
|
<div class="ulist">
|
|
<ul>
|
|
<li>
|
|
<p>Find All TCP Ports connections</p>
|
|
<div class="ulist">
|
|
<ul>
|
|
<li>
|
|
<p>save it</p>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</li>
|
|
<li>
|
|
<p>Find All UDP Ports connections</p>
|
|
<div class="ulist">
|
|
<ul>
|
|
<li>
|
|
<p>save it</p>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="admonitionblock note">
|
|
<table>
|
|
<tr>
|
|
<td class="icon">
|
|
<i class="fa icon-note" title="Note"></i>
|
|
</td>
|
|
<td class="content">
|
|
try to find the differences between them!
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sect1">
|
|
<h2 id="_find_all_live_hosts"><a class="anchor" href="#_find_all_live_hosts"></a>Find All live hosts</h2>
|
|
<div class="sectionbody">
|
|
<div class="ulist">
|
|
<ul>
|
|
<li>
|
|
<p>Find All live hosts</p>
|
|
<div class="ulist">
|
|
<ul>
|
|
<li>
|
|
<p>save it</p>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sect1">
|
|
<h2 id="_find_open_tcp_ports_in_all_hosts"><a class="anchor" href="#_find_open_tcp_ports_in_all_hosts"></a>Find open TCP Ports in All hosts</h2>
|
|
<div class="sectionbody">
|
|
<div class="ulist">
|
|
<ul>
|
|
<li>
|
|
<p>Find All open TCP Ports in All hosts</p>
|
|
<div class="ulist">
|
|
<ul>
|
|
<li>
|
|
<p>save it</p>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sect1">
|
|
<h2 id="_ssh_connect"><a class="anchor" href="#_ssh_connect"></a>SSH connect</h2>
|
|
<div class="sectionbody">
|
|
<div class="listingblock">
|
|
<div class="content">
|
|
<pre class="highlightjs highlight"><code class="language-bash hljs" data-lang="bash">ssh docker@[IP]</code></pre>
|
|
</div>
|
|
</div>
|
|
<div class="sect2">
|
|
<h3 id="_ssh_exec_remote_command"><a class="anchor" href="#_ssh_exec_remote_command"></a>SSH exec remote command</h3>
|
|
<div class="paragraph">
|
|
<p>Run command using the following syntax:</p>
|
|
</div>
|
|
<div class="listingblock">
|
|
<div class="content">
|
|
<pre class="highlightjs highlight"><code class="language-bash hljs" data-lang="bash">## user syntax ##
|
|
ssh -t docker@192.168.128.3 'ip a'
|
|
|
|
## sudo syntax ##
|
|
ssh -t docker@192.168.128.3 'echo docker | sudo -S cat /etc/passwd'
|
|
# ^^^^^ USER ^^^ IP ^^^^^^^ sudo password ^^^^^^^^ COMMAND
|
|
|
|
## su syntax ##
|
|
ssh docker@nas01 su -c "/path/to/command1 arg1 arg2"</code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sect1">
|
|
<h2 id="_ssh_password"><a class="anchor" href="#_ssh_password"></a>SSH password</h2>
|
|
<div class="sectionbody">
|
|
<div class="listingblock">
|
|
<div class="content">
|
|
<pre class="highlightjs highlight"><code class="language-bash hljs" data-lang="bash">SSH password:
|
|
SUDO password[defaults to SSH password]:</code></pre>
|
|
</div>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>password: <strong>docker</strong></p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>SUDO password: <strong>docker</strong></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</article>
|
|
</div>
|
|
</main>
|
|
</div>
|
|
<footer class="footer">
|
|
<p>This page was built using the Antora <a href="https://gitlab.com/antora/antora-ui-default" target="antora">default UI</a> </p>
|
|
</footer>
|
|
<script src="../../_/js/site.js"></script>
|
|
<script src="../../_/js/vendor/lunr.js"></script>
|
|
<script src="../../_/js/vendor/search.js" id="search-script" data-base-path="../.." data-page-path="/swarmlab_sec-intro/docs/exer.html"></script>
|
|
<script async src="../../_/../search-index.js"></script>
|
|
<script async src="../../_/js/vendor/highlight.js"></script>
|
|
</body>
|
|
</html>
|
|
|