<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>漏洞扫描归档 - Liao&#039;s blog</title>
	<atom:link href="https://www.laobaiblog.top/tag/%E6%BC%8F%E6%B4%9E%E6%89%AB%E6%8F%8F/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.laobaiblog.top/tag/漏洞扫描/</link>
	<description>路漫漫其修远兮，吾将上下而求索</description>
	<lastBuildDate>Wed, 31 Aug 2022 04:14:23 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://www.laobaiblog.top/wp-content/uploads/2022/01/cropped-tyuu-32x32.png</url>
	<title>漏洞扫描归档 - Liao&#039;s blog</title>
	<link>https://www.laobaiblog.top/tag/漏洞扫描/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>CentOS Docker环境部署Nessus漏洞扫描 系列一</title>
		<link>https://www.laobaiblog.top/2022/08/31/centos-docker%e7%8e%af%e5%a2%83%e9%83%a8%e7%bd%b2nessus%e6%bc%8f%e6%b4%9e%e6%89%ab%e6%8f%8f-%e7%b3%bb%e5%88%97%e4%b8%80/</link>
		
		<dc:creator><![CDATA[大白]]></dc:creator>
		<pubDate>Wed, 31 Aug 2022 04:14:00 +0000</pubDate>
				<category><![CDATA[Docker]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[分享]]></category>
		<category><![CDATA[docker]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nessus]]></category>
		<category><![CDATA[漏洞扫描]]></category>
		<guid isPermaLink="false">https://www.laobaiblog.top/?p=271</guid>

					<description><![CDATA[<p>一、Docker部署Nessus 部署环境 操作系统版本：CentOS Linux release  &#8230;</p>
<p><a href="https://www.laobaiblog.top/2022/08/31/centos-docker%e7%8e%af%e5%a2%83%e9%83%a8%e7%bd%b2nessus%e6%bc%8f%e6%b4%9e%e6%89%ab%e6%8f%8f-%e7%b3%bb%e5%88%97%e4%b8%80/">CentOS Docker环境部署Nessus漏洞扫描 系列一</a>最先出现在<a href="https://www.laobaiblog.top">Liao&#039;s blog</a>。</p>
]]></description>
										<content:encoded><![CDATA[<h1>一、Docker部署Nessus</h1>
<h2>部署环境</h2>
<ul>
<li>操作系统版本：CentOS Linux release 7.9.2009 (Core)</li>
<li>Docker版本：Docker Server Version: 20.10.17</li>
<li>Nessus版本： 10.3.0 （#80） Linux</li>
</ul>
<h2>部署Nessus</h2>
<pre><code class="language-shell line-numbers">#搜索nessus相关镜像
docker search nessus
#pull nessus最新镜像
docker pull tenableofficial/nessus
#启动docker镜像，同时配置用户名和口令、不启动自动更新
docker run -it -d -p8834:8834 --name nessus -e USERNAME=Nessus -e AUTO_UPDATE=no -e PASSWORD=HDuUNO1XzDEq2Ls tenableofficial/nessus
</code></pre>
<pre><code class="language-shell line-numbers">#进入nessus容器
docker exec -it nessus bash
#启动nessus服务
/opt/scripts/configure_scanner.py

</code></pre>
<h2>访问nessus界面</h2>
<p><strong><code>https://localhost:8834</code></strong></p>
<p><a class="wp-editor-md-post-content-link" href="https://www.laobaiblog.top/wp-content/uploads/2022/08/wp_editor_md_48afaed8f27d566dfcd378d912ee0f8f.jpg"><img decoding="async" src="https://www.laobaiblog.top/wp-content/uploads/2022/08/wp_editor_md_48afaed8f27d566dfcd378d912ee0f8f.jpg" alt="" /></a></p>
<p><strong>用户名和口令为创建nessus容器时配置的用户名和口令</strong></p>
<pre><code class="language-shell line-numbers">username:Nessus
password:HDuUNO1XzDEq2Ls
</code></pre>
<p><a class="wp-editor-md-post-content-link" href="https://www.laobaiblog.top/wp-content/uploads/2022/08/wp_editor_md_c582b125111664a9c6b32a7822448b6b.jpg"><img decoding="async" src="https://www.laobaiblog.top/wp-content/uploads/2022/08/wp_editor_md_c582b125111664a9c6b32a7822448b6b.jpg" alt="" /></a></p>
<h1>二、官方注册插件库和激活码</h1>
<p><a class="wp-editor-md-post-content-link" href="https://plugins.nessus.org/v2/offline.php">官网插件库地址</a>：<br />
https://plugins.nessus.org/v2/offline.php</p>
<p><a class="wp-editor-md-post-content-link" href="https://www.laobaiblog.top/wp-content/uploads/2022/08/wp_editor_md_ada4e589a08b061fb9cc269bc159a4bd.jpg"><img decoding="async" src="https://www.laobaiblog.top/wp-content/uploads/2022/08/wp_editor_md_ada4e589a08b061fb9cc269bc159a4bd.jpg" alt="" /></a></p>
<h4>获取第一个值Challenge code</h4>
<pre><code class="language-shell line-numbers">#进入Nessus容器
docker exec -it nessus bash
#生成匹配Challenge code
/opt/nessus/sbin/nessuscli fetch --challenge
</code></pre>
<p><a class="wp-editor-md-post-content-link" href="https://www.laobaiblog.top/wp-content/uploads/2022/08/wp_editor_md_53f7bd59813c35b6213db9c1f36f484c.jpg"><img decoding="async" src="https://www.laobaiblog.top/wp-content/uploads/2022/08/wp_editor_md_53f7bd59813c35b6213db9c1f36f484c.jpg" alt="" /></a></p>
<p><strong>Challenge code: be86f8bde86494e544d6bad87c2ea9122f8b012d</strong></p>
<h4>获取第二个值激活码Activation Code</h4>
<p>进入<a class="wp-editor-md-post-content-link" href="https://zh-cn.tenable.com/products/nessus/nessus-essentials?tns_redirect=true">官网</a>，邮箱注册获取激活码，填写邮箱接收邮件<br />
https://zh-cn.tenable.com/products/nessus/nessus-essentials?tns_redirect=true</p>
<p><a class="wp-editor-md-post-content-link" href="https://www.laobaiblog.top/wp-content/uploads/2022/08/wp_editor_md_2e284d8c7dda8752214f442a95eb0fa8.jpg"><img decoding="async" src="https://www.laobaiblog.top/wp-content/uploads/2022/08/wp_editor_md_2e284d8c7dda8752214f442a95eb0fa8.jpg" alt="" /></a></p>
<p>获取激活码</p>
<p><a class="wp-editor-md-post-content-link" href="https://www.laobaiblog.top/wp-content/uploads/2022/08/wp_editor_md_2dedf9fed1be758a698876ce8209394c.jpg"><img decoding="async" src="https://www.laobaiblog.top/wp-content/uploads/2022/08/wp_editor_md_2dedf9fed1be758a698876ce8209394c.jpg" alt="" /></a></p>
<p>提交获取插件下载地址和证书内容</p>
<p><a class="wp-editor-md-post-content-link" href="https://www.laobaiblog.top/wp-content/uploads/2022/08/wp_editor_md_57e8f77cc73b6aa8c53aefb92aabfc7a.jpg"><img decoding="async" src="https://www.laobaiblog.top/wp-content/uploads/2022/08/wp_editor_md_57e8f77cc73b6aa8c53aefb92aabfc7a.jpg" alt="" /></a></p>
<p>插件下载地址及激活码License</p>
<p><a class="wp-editor-md-post-content-link" href="https://www.laobaiblog.top/wp-content/uploads/2022/08/wp_editor_md_eb3ac519e7b116dbe71dc06b373ea579.jpg"><img decoding="async" src="https://www.laobaiblog.top/wp-content/uploads/2022/08/wp_editor_md_eb3ac519e7b116dbe71dc06b373ea579.jpg" alt="" /></a></p>
<h2>更新docker中nessus插件库</h2>
<p>将下载的插件库上传至nessus容器中</p>
<p><a class="wp-editor-md-post-content-link" href="https://www.laobaiblog.top/wp-content/uploads/2022/08/wp_editor_md_12b65f4dbd5a4c3dc004423e6af78266.jpg"><img decoding="async" src="https://www.laobaiblog.top/wp-content/uploads/2022/08/wp_editor_md_12b65f4dbd5a4c3dc004423e6af78266.jpg" alt="" /></a></p>
<pre><code class="language-shell line-numbers">#从Docker宿主机复制文件到Docker容器 all-2.0.tar.gz插件位置看个人上传宿主机目录
docker cp /data/middleware/nessus/all-2.0.tar.gz nessus:/usr/local/
#Docker容器中更新插件库
docker exec -it nessus /bin/bash
cd /usr/local
#更新插件库
/opt/nessus/sbin/nessuscli update all-2.0.tar.gz
</code></pre>
<p><a class="wp-editor-md-post-content-link" href="https://www.laobaiblog.top/wp-content/uploads/2022/08/wp_editor_md_78c7f20c643d7823d9d26297908c62a0.jpg"><img decoding="async" src="https://www.laobaiblog.top/wp-content/uploads/2022/08/wp_editor_md_78c7f20c643d7823d9d26297908c62a0.jpg" alt="" /></a></p>
<h2>激活Nessus</h2>
<pre><code class="language-shell line-numbers">#进入容器
docker exec -it nessus /bin/bash
cd /usr/local
#填写刚才所获得的激活码
vi nessus.license

</code></pre>
<pre data-language=XML><code class="language-markup line-numbers">-----BEGIN TENABLE LICENSE-----
aTJZK2tGL1NQY3Fad2UrR0pWeWRobFpxdjJiY1F3d0Q0cEk0OWJtR3FuYjhmOTduOUF1OUMrY0FF
SmRVTkNJUUp5dEN6WTFiY1UrTnlsMG02VEQ0eUZBNU0yVGNDNDA4MmRMZEYyZy9VelhacWYyY3JH
aXFkY29kdnRhUzJtNytBbnJpUnprU21URjQva21kT3VwRWNVYmlHb0QzaXFUekNtZnZITnJaVldx
Wmh1eEFxYU9Pb2cwQW5GZXVRTWFsS1ZOODRBaXBGbFNJWjRrUi9XUUtGYWZZTmY1RGplZjZWVE1F
aUgzUDJnRmxSazJ2WFI4ZVcyazBPVEQ4R3JuTlpIaUZnNVZKdkZqdHJLZ1lYNlBRcU4zTWhIdzZF
Z2ZlajZqaG5QeUpWSkhSVFlTaHcvdzB3OEZUVXRZNU1TZmttRWlpT1lEOHcxejM2STlha1BCSGFB
dERETmFxN3l6SXJ4QTQ3ekRlY3FiS0lLYUhwWUMyeFpPbGNoV3VXZloxNGRvSXRySnFGVXB6MXRP
TERDUkNGQ2lHSHIrYUtjMUM1SUpqWTZKcFRiSHIrZm5wU3k2VDMrY1NzeU1JV3VyUmw1cUNFVWVs
WkJudUxXNkg4R0pwd3gvZEdHYi9TUjNpVjV2dzFoQUpGWG91K2NqM04zTktKVE5VcUp2Zi9URUth
SHNKTy9uWW9ZeXpGck9IUGtzWmxpdVdnMzR6U3V1MGpEamZZYVFsK3Y2ZkRlUHp5dU4vZjhhREdw
MUpSQTN4NGYwUTl3dzg0aXdKd0Zyb0Z1L3ltZE9ValIrbGR2cWFpemp3b0k3cnVCckpiNXlJb0tw
bXR3NDF4OWx5aXFPczM5d056bEkrUlN1UlpRV1BJNDJjUStFN2dwOVA4dUhndzVuZmNXK2RySzA9
DQp7ImFjdGl2YXRpb25fY29kZSI6IkdSQTctMkxVRC1EUENOLTg1WEQtWE1CTSIsInVwZGF0ZV9w
YXNzd29yZCI6ImY4MjM0OTFlYzExYjIxMGI0ODczYTllM2YxMzVlMDE3IiwicGVuZG9fYXBpX2tl
eSI6ImE3YzhkNWM0LWI2YWUtNDg2Ny03ZGFiLTY5YTkyYTA4NDdlMSIsIm5hbWUiOiJOZXNzdXMg
SG9tZSIsInR5cGUiOiJob21lIiwiZXhwaXJhdGlvbl9kYXRlIjoxODE5NTkzMzkwLCJjdXN0b21l
cl9pZCI6MCwiaXBzIjoxNiwidXBkYXRlX2xvZ2luIjoiMDdhOGZhNGZkYmYzNGIxNzU5NGZhNGUw
YTc1NmM2ZTAiLCJkcm0iOiJjMDUyOGZkOWQyNGIyZGQ0MDExMmZjZTNlM2I2NzY1MiJ9
-----END TENABLE LICENSE-----
</code></pre>
<h4>激活</h4>
<pre><code class="language-shell line-numbers">/opt/nessus/sbin/nessuscli fetch --register-offline nessus.license
#重启nessus
/opt/scripts/configure_scanner.py

</code></pre>
<p>等待加载插件库后访问nessus界面</p>
<p><code>https://localhost:8834</code></p>
<pre><code class="language-shell line-numbers">username:Nessus
password:HDuUNO1XzDEq2Ls
</code></pre>
<p><a class="wp-editor-md-post-content-link" href="https://www.laobaiblog.top/wp-content/uploads/2022/08/wp_editor_md_48afaed8f27d566dfcd378d912ee0f8f.jpg"><img decoding="async" src="https://www.laobaiblog.top/wp-content/uploads/2022/08/wp_editor_md_48afaed8f27d566dfcd378d912ee0f8f.jpg" alt="" /></a></p>
<p>插件正常加载</p>
<p><a class="wp-editor-md-post-content-link" href="https://www.laobaiblog.top/wp-content/uploads/2022/08/wp_editor_md_772a469666fb869bbe65c533211c309e.jpg"><img decoding="async" src="https://www.laobaiblog.top/wp-content/uploads/2022/08/wp_editor_md_772a469666fb869bbe65c533211c309e.jpg" alt="" /></a></p>
<h1>三、Nessus破解修改限制</h1>
<pre><code class="language-shell line-numbers">#nessus初始化完成后Hosts显示为"0 of 16 used”，修改其限制
docker exec -it nessus /bin/bash
#复制插件到容器根目录
cp -r /opt/nessus/lib/nessus/plugins/ /
#查看plugins插件库复制是否成功，若不成功则重新复制
du -h /plugins/
#删除重新复制
rm -rf /plugins
cp -r /opt/nessus/lib/nessus/plugins/ /

</code></pre>
<p><a class="wp-editor-md-post-content-link" href="https://www.laobaiblog.top/wp-content/uploads/2022/08/wp_editor_md_f1c564b79bbfc14f7b63e656daab9dcc.jpg"><img decoding="async" src="https://www.laobaiblog.top/wp-content/uploads/2022/08/wp_editor_md_f1c564b79bbfc14f7b63e656daab9dcc.jpg" alt="" /></a></p>
<ul>
<li>查看plugin_feed_info.inc文件位置</li>
</ul>
<pre><code class="language-shell line-numbers">[root@7b287c8f02b0 /]# find / -name "plugin_feed_info.inc"
/opt/nessus/var/nessus/plugin_feed_info.inc
/opt/nessus/lib/nessus/plugins/plugin_feed_info.inc
</code></pre>
<ul>
<li>备份plugin_feed_info.inc</li>
</ul>
<pre><code class="language-shell line-numbers">mkdir /pluginsinc
cp /opt/nessus/lib/nessus/plugins/plugin_feed_info.inc /pluginsinc/plugin_feed_info.inc.libinc
cp /opt/nessus/var/nessus/plugin_feed_info.inc /pluginsinc/plugin_feed_info.inc.varinc
</code></pre>
<ul>
<li>将plugin_feed_info.inc内容修改为专业版，PLUGIN_SET序号号为Policy Template Version=202208301606或其后序号</li>
</ul>
<pre><code class="language-shell line-numbers">vi /pluginsinc/plugin_feed_info.inc
PLUGIN_SET = "202208301606";
PLUGIN_FEED = "ProfessionalFeed (Direct)";
PLUGIN_FEED_TRANSPORT = "Tenable Network Security Lightning";
</code></pre>
<ul>
<li>关闭Nessus服务</li>
</ul>
<pre><code class="language-shell line-numbers">supervisorctl stop nessusd
rm -f /opt/nessus/lib/nessus/plugins/plugin_feed_info.inc
cp /pluginsinc/plugin_feed_info.inc /opt/nessus/var/nessus/plugin_feed_info.inc
</code></pre>
<ul>
<li>重启Nessus服务</li>
</ul>
<pre><code class="language-shell line-numbers">supervisorctl start nessusd
du -h /opt/nessus/lib/nessus/plugins/
more /opt/nessus/lib/nessus/plugins/plugin_feed_info.inc
more /opt/nessus/var/nessus/plugin_feed_info.inc
</code></pre>
<ul>
<li>访问Nessus并更新规则库，此过程特慢需放置等待</li>
</ul>
<p><a class="wp-editor-md-post-content-link" href="https://www.laobaiblog.top/wp-content/uploads/2022/08/wp_editor_md_ca43e3cfd0153a5b5649895b972084a2.jpg"><img decoding="async" src="https://www.laobaiblog.top/wp-content/uploads/2022/08/wp_editor_md_ca43e3cfd0153a5b5649895b972084a2.jpg" alt="" /></a></p>
<ul>
<li>查看状态</li>
</ul>
<pre><code class="language-shell line-numbers">du -h /opt/nessus/lib/nessus/plugins/
more /opt/nessus/lib/nessus/plugins/plugin_feed_info.inc
more /opt/nessus/var/nessus/plugin_feed_info.inc
#若状态异常，重新执行插件删除程序
rm -rf /opt/nessus/lib/nessus/plugins/
cp -r /plugins /opt/nessus/lib/nessus/
supervisorctl stop nessusd
rm -f /opt/nessus/lib/nessus/plugins/plugin_feed_info.inc
cp /pluginsinc/plugin_feed_info.inc /opt/nessus/var/nessus/plugin_feed_info.inc
supervisorctl start nessusd
</code></pre>
<h4>重置启动</h4>
<p>因服务重启时unlimited失效，根据状态异常操作步骤重新操作，编写nessus_start.sh代替service nessusd start，因为命令执行过程较长且Nessus需要重新加载插件，启动过程慢是正常现象。</p>
<pre><code class="language-shell line-numbers">vi /root/nessus_start.sh

#!/bin/bash
rm -rf /opt/nessus/lib/nessus/plugins/
cp -r /plugins /opt/nessus/lib/nessus/
supervisorctl stop nessusd
rm -f /opt/nessus/lib/nessus/plugins/plugin_feed_info.inc
cp /pluginsinc/plugin_feed_info.inc /opt/nessus/var/nessus/plugin_feed_info.inc
supervisorctl start nessusd

chmod +x /root/nessus_start.sh
</code></pre>
<p>手动执行脚本</p>
<pre><code class="language-shell line-numbers">/root/nessus_start.sh
</code></pre>
<p><a href="https://www.laobaiblog.top/2022/08/31/centos-docker%e7%8e%af%e5%a2%83%e9%83%a8%e7%bd%b2nessus%e6%bc%8f%e6%b4%9e%e6%89%ab%e6%8f%8f-%e7%b3%bb%e5%88%97%e4%b8%80/">CentOS Docker环境部署Nessus漏洞扫描 系列一</a>最先出现在<a href="https://www.laobaiblog.top">Liao&#039;s blog</a>。</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
