Topic: Tech

Tech ! Tech ! and Tech only !

WannaCRY Ransomware , How to keep your system safe 0

We will discuss about wannacry ransomware cyber attack and how to decrypt data which encrypted by wannacry.

 

The WannaCry ransomware began to spread across the all over the Internet on Friday May 12th, 2017. I took my phone to see the text from my friend, “What should we do to beware the ransomware?” My stomach tightened. It was time for friendly IT support.

Their home system was set to auto-install patches. All of their files were backed up remotely to a secure system and their firewall & malicious software protections were current.

I determined to share the steps that I use to protect my friend’s computer so that end users can better protect themselves when issues like the WannaCry ransomware crop up from time to time. If you are using a Windows operating system here is a helpful steps to follow.

Open Windows Update by clicking the Start button in the lower left corner. In the search box, type Update, and then, in the list of results, click Windows Update.

 

  1. Click on Check for updates, and then wait while Windows looks for the latest updates for your computer.

  2. Then turn on the automatic windows update

 

   3.  Click Install updates.

 

If you’re not of a mind to do thing automatically you can set it to manually install patches.

• Use this link to download update Manual :

MS17-010 Update for Windows 8.1
The first option is for 64bit system and another option for 32bit system
MS17-010 Update for Windows 10
The first option is a 32bit system and a second option for a 64bit system
Update link for MS17-010 for Windows 7 and Server 2008
Choose the first 64bit system choice or the second 32bit option.
Links Update for MS17-010 for Windows XP and Server2003 and 8

In the case of a user that has MacOS who might not be technically sound knowledge, have them click on the AppStore and select “update” next to the patches that need to be installed.

 

 

  •  No matter what your platform of choice.
     
  • Make sure that you have malicious software protections   installed and that they are kept up to date.
  • Your system firewall should deny inbound connections and anti-virus should be kept current.
  • While these programs are not a 100% guarantee, by any stretch of the imagination, they will help with the lot of the cruft that could negatively affect your systems.

 

How to Decrypt WannaCRY.

 

A tool under the name WanaKiwi is “able” to decrypt the data in the hands of the ransom software,But only if the user has not restarted or turned off the computer.

This condition must come from how the rudimentary software algorithm works. The researcher focused on the initial numbers stored in the random memory of the computer on which the software is based to perform the encryption process.

More generally and simply, the tool searches for these numbers and begins the process of decrypting encrypted data in advance, hence the importance of the above requirement, in addition to the reference of some other reports to another condition is not to take off new software after infection such as games and office applications which can damage the order Store those numbers on your computer’s memory by using that space for another program.

Note: The new tool works on both Windows 2008, 7, XP and Vista, and has been proven effective by some security companies. Another tool named WanaKey is based on the same principle
Link Download direct: Wanakiwi_0.2.zip or Wanakiwi.zip

For more information and reference.
answer.microsoft.com

Often I see people finding fault to the end users. Rather than do that, I preferred to share what should be done to better protect their systems. Hopefully, if we preserve to share more information like this it will help to better protect the home user.

Powershell – How To – SID To User 0

Step 1: Domain User to SID

This will give you a Domain User’s SID
$objUser = New-Object System.Security.Principal.NTAccount(“DOMAIN_NAME”, “USER_NAME”)
$strSID = $objUser.Translate([System.Security.Principal.SecurityIdentifier])
$strSID.Value

Step 2: SID to Domain User

This will allow you to enter a SID and find the Domain User
$objSID = New-Object System.Security.Principal.SecurityIdentifier `
(“ENTER-SID-HERE”)
$objUser = $objSID.Translate( [System.Security.Principal.NTAccount])
$objUser.Value

Step 3: LOCAL USER to SID

$objUser = New-Object System.Security.Principal.NTAccount(“LOCAL_USER_NAME”)
$strSID = $objUser.Translate([System.Security.Principal.SecurityIdentifier])
$strSID.Value

Found on Spiceworks: https://community.spiceworks.com/how_to/2776-powershell-sid-to-user-and-user-to-sid?utm_source=copy_paste&utm_campaign=growth

Dlightdily : “ Have you any query ? , Post It below in comment box” !

windows script to check Server Uptime 0

Description

Ever wanted a simple HTML report showing you the UP/DOWN status of your servers?

And for a little extra flavor how long that server has been up for?

Some basic disk information?

1. Download the script to your favorite location and name it Uptime.ps1

2. Open a Powershell prompt and type: Get-Help pathtoscript\Uptime.ps1 –Full

3. Edit PARAM section so that variables match your environment.

4. Edit $Key variable with random numbers, this is your encryption key.

5. Run it manually once, if you are using alternative credentials script will prompt you for password and save those credentials to a file.

To run as a scheduled task:

1. Create the scheduled task and set your trigger (hourly?)
2. For action the Executable should be Powershell.exe
3. For Arguments use: -ExecutionPolicy Bypass -File pathtoscript\Uptime.ps1

//////////////////////////////////////////////////////////////////////////////////////////////////////////////

Source Code

This script has not been checked by Dlightdaily. Please understand the risks before using it.

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

<#
.SYNOPSIS
     Simple HTML report generator for UP/DOWN status of servers.
.DESCRIPTION
     Create a simple UP/DOWN report, with length of uptime report in a simple HTML
     report.  Also includes a “lowest” disk alert, showing you whichever disk has the
     lowest amount of disk space and how much that is (bar graph).  There is also
     a detailed disk report you can click on to view.
    
     Will accept an secondary credential and use that to gather information.  The
     username and password are stored in an encrypted file in the path you designate.
    
     Since this script is intended to be run from a scheduled task, it is important
     to modify the PARAM section to suit your needs. 
    
     How to Run:
     Make sure to run the script once on the server you intend to run the scheduled
     task.  The script will prompt for the specified credential password on the first
     run (or any time you change the credential username).  After that first run it
     will run without prompting.
    
     *** IMPORTANT ***
     Required:  Modify the $Key variable (line 74) to get unique encryption on your
     credentials.
.PARAMETER Name
     Will accept a comma seperated array of server names and if not specified default
     to load the server names from a text file.  Make sure to edit the Param section
     to fit your environment.  Will also accept object input from Get-ADComputer.
.PARAMETER AlertThreshold
     A number representing the % that free space has to go below to trigger an alert
     (changing the display to red).
.PARAMETER Path
     The output path and file name for the HTML report.  Make sure to edit the Param
     section to fit your environment.
.PARAMETER Credential
     Specify the alternative credential
.PARAMETER PathToCred
     Path where the script will store the encrypted password file.
.EXAMPLE
     .\Uptime.ps1
     Produces the report based on the servers in C:\utils\servers.txt and will save the
     report at c:\utils\uptime.html
.EXAMPLE
     .\Uptime.ps1 -Servers server1,server2,server3 -path \\webserver\share\uptimereport.html
     Will create the uptime report for servers 1,2 and 3 and save the report at
     \\webserver\share\uptimereport.html
.EXAMPLE
     .\Uptime.ps1 -Servers server1,server2,server3 -AlertThreshold 25
     Will create the uptime report for servers 1,2 and 3 and if the lowest disk free percentage
     is below 25% it will show up in red.
.LINK
     http://community.spiceworks.com/scripts/show/1641-simple-server-uptime-report
.NOTES
     Author:        Martin Pugh
     Twitter:       @TheSurlyAdm1n
     Spiceworks:    Martin9700
     Blog:          www.thesurlyadmin.com
    
     Changelog
         1.7        Added the ability to use alternative credentials.  Added quite a bit of error
                    handling and verbose output (if wanted).  Added the ability for the script to
                    accept pipeline input from Get-ADComputer as well as other pipeline items.
         1.6        Added remaining disk information in a more detailed report below the primary
                    status table.  Click on the “Show Disk Detail Report” link to display the detailed
                    report.
         1.5        Added the “Lowest Disk Status” column.  The script will now look at all disk
                    volumes and report on the one with the lowest free disk space.  It will so the free
                    space as a percentage of the total.  By default if that percentage drops below 10%
                    it will “alert” and show that percentage in red.  This setting is configurable
                    using the -AlertThreshold parameter.
         1.0        Initial release
#>
[CmdletBinding()]
Param (
     [Parameter(ValueFromPipeline=$true,
         ValueFromPipelinebyPropertyName=$true)]
     [Alias(“Servers”)]
     [string[]]$Name = (Get-Content “c:\utils\servers.txt”),
     [int]$AlertThreshold = 10,
     [string]$Path = “c:\utils\uptime.html”,
     [string]$Credential = “surly\administrator”,
     [string]$PathToCred = “c:\utils”
)

Begin {
     Function Get-Credentials {
         Param (
             [String]$AuthUser = $env:USERNAME
         )
         $Key = [byte]29,36,18,74,72,75,85,52,73,44,0,21,98,76,99,28
    
         #Build the path to the credential file
         $CredFile = $AuthUser.Replace(“\”,”~”)
         $File = $PathToCred + “\Credentials-$CredFile.crd”
         #And find out if it’s there, if not create it
         If (-not (Test-Path $File))
         {    (Get-Credential $AuthUser).Password | ConvertFrom-SecureString -Key $Key | Set-Content $File
         }
         #Load the credential file
         $Password = Get-Content $File | ConvertTo-SecureString -Key $Key
         $AuthUser = (Split-Path $File -Leaf).Substring(12).Replace(“~”,”\”)
         $AuthUser = $AuthUser.Substring(0,$AuthUser.Length – 4)
         $Credential = New-Object System.Management.Automation.PsCredential($AuthUser,$Password)
         Return $Credential
     }

    Write-Verbose “$(Get-Date): Script begins!”

    #Define static HTML
     $HeaderHTML = @”
<html>
<head>
<style type=’text/css’>
body { background-color:#DCDCDC;
}
table { border:1px solid gray;
   font:normal 12px verdana, arial, helvetica, sans-serif;
   border-collapse: collapse;
   padding-left:30px;
   padding-right:30px;
}
th { color:black;
   text-align:left;
   border: 1px solid black;
   font:normal 16px verdana, arial, helvetica, sans-serif;
   font-weight:bold;
   background-color: #6495ED;
   padding-left:6px;
   padding-right:6px;
}
td.up { background-color:#32CD32;
   border: 1px solid black;
}
td.down { background-color:#B22222;
   border: 1px solid black;
}
td { border: 1px solid black;
   padding-left:6px;
   padding-right:6px;
}
div.red { background-color:#B22222;
   float:left;
   text-align:right;
}
div.green { background-color:#32CD32;
   float:left;
}
div.free { background-color:#7FFF00;
   float:left;
   text-align:right;
}
a.detail { cursor:pointer;
   color:#1E90FF;
   text-decoration:underline;
}
</style>
</head>
<body>
<script type=’text/javascript’>
<!–
window.onload=function(){
     document.getElementById(“ShowHideLink”).innerHTML=”<h6>Show Disk Detail Report</h6>”
     document.getElementById(“diskdetail”).style.visibility=”hidden”
}
function ShowHide() {
     if (document.getElementById(“diskdetail”).style.visibility==”visible”)
     {
         document.getElementById(“diskdetail”).style.visibility=”hidden”
         document.getElementById(“ShowHideLink”).innerHTML=”<h6>Show Disk Detail Report</h6>”
     }
     else
     {
         document.getElementById(“diskdetail”).style.visibility=”visible”
         document.getElementById(“ShowHideLink”).innerHTML=”<h6>Hide Disk Detail Report</h6>”
     }
  }
//–>
</script>
<h1>Server Uptime Status Report</h1>
<p>
<table class=”Main”>
<tr><th style=”width:175px;”>Server Name</th><th style=”width:125px;”>Status</th><th style=”width:475px;”>Lowest Disk Status</th></tr>

“@

    $DiskDetailHeaderHTML = @”
</table>
<a id=”ShowHideLink” class=”detail” onClick=”ShowHide()”></a>
<br>
<br>
<div id=”diskdetail”>
<h1>Disk Detail Report</h1><p>

“@

    $FooterHTML = @”
</div>
</body>
</html>
“@

    $AllComputers = @()
}

Process {
     #Gather all computer names before processing
     ForEach ($Computer in $Name)
     {   $AllComputers += $Computer
     }
}

End {
     #Sort the servers by name, then start getting information
     Write-Verbose “Sort server names and gather Credential information”
     $Name = $Name | Sort
     $DiskData = @()

    If ($Credential)
     {   $Cred = Get-Credentials $Credential
     }

    ForEach ($Computer in $AllComputers)
     {    Write-Verbose “Testing $Computer…”
         $ErrorReport = $null
         If (Test-Connection $Computer -Quiet)
         {    #Set parameters for splat, determine if checking local
             $CredParameter = @{
                 ComputerName = $Computer
                 ErrorAction = “Stop”
             }
             If ($Computer.ToUpper() -notlike “*$($env:COMPUTERNAME.ToUpper())*” -and $Cred)
             {   $CredParameter.Add(“Credential”,$Cred)
             }
        
             #Get uptime information
             Try {
                 $WMI = Get-WmiObject Win32_OperatingSystem @CredParameter
                 If ($WMI)
                 {    $Uptime = New-TimeSpan -Start $($WMI.ConvertToDateTime($WMI.LastBootUpTime)) -End (Get-Date)
                     $UpText = “<td class=””up””>$($Uptime.Days)d, $($Uptime.Hours)h, $($Uptime.Minutes)m</td>”
                 }
                 Else
                 {    $UpText = “<td class=””up””>Up</td>”
                 }
                 #Get disk information and pretty up the data
                 $Disks = Get-WmiObject Win32_LogicalDisk -Filter “DriveType=3” @CredParameter | Select `
                     @{LABEL=”Server”;EXPRESSION={$Computer}},
                     @{LABEL=”DriveLetter”;EXPRESSION={$_.DeviceID}},
                     @{LABEL=”Size”;EXPRESSION={[int](“{0:N0}” -f ($_.Size/1gb))}},
                     @{LABEL=”FreeSize”;EXPRESSION={[int](“{0:N0}” -f ($_.FreeSpace/1gb))}},
                     @{LABEL=”perUsed”;EXPRESSION={[int](“{0:N0}” -f ((($_.Size – $_.FreeSpace)/$_.Size)*100))}},
                     @{LABEL=”perFree”;EXPRESSION={[int](“{0:N0}” -f (100-(($_.Size – $_.FreeSpace)/$_.Size)*100))}},
                     VolumeName
                 $DiskData += $Disks
             }
             Catch {
                 Write-Verbose “Error encountered gathering information for $Computer”
                 $ErrorReport = $Error[0]
                 $Error.Clear | Out-Null
             }
            
             #Create the simple Status table
             If ($ErrorReport)
             {   $UpText = “<td class=””down””>WMI Error</td>”
                 $DiskHTML = “<div class=””red””>$($Error[0])</div>”
             }
             ElseIf ($Disks)
             {    $LowDisk = $Disks | Sort FreeSize | Select -First 1
                 If ($LowDisk.perFree -le $AlertThreshold)
                    {    $FreeClass = “red”
                 }
                 Else
                 {    $FreeClass = “free”
                    }
                 $DiskHTML = “<div class=””green”” style=””width:$($LowDisk.perUsed)%””>$($LowDisk.DriveLetter) $($LowDisk.Size)gb ($($LowDisk.perUsed)% used)</div><div class=””$FreeClass”” style=””width:$($LowDisk.perFree)%””>$($LowDisk.FreeSize)gb free ($($LowDisk.perFree)%)</div>`n”
             }
             Else
             {    $DiskHTML = “”
             }
             $DetailHTML += “<tr><td>$Computer</td>$UpText<td>$DiskHTML</td></tr>`n”
         }
         Else
         {    $DetailHTML += “<tr><td>$Computer</td><td class=””down””>DOWN</td><td class=””down””></td></tr>`n”
         }
     }

    #Disk Details Report
     Write-Verbose “WMI data gathered, making the report”
     $Servers = $DiskData | Select Server -Unique
     ForEach ($Server in $Servers)
     {    $Server = $Server.Server
         $DiskDetailHTML += “<h3>$Server</h3>”
         $DiskDetailHTML += “<table>”
         $DiskDetailHTML += “<tr><th>Drive Letter</th><th>Volume Name</th><th>Total Disk Space</th><th>Used</th><th>Free</th><th style=””width:350px;””>Usage</th></tr>`n”
         $Disks = $DiskData | Where { $_.Server -eq $Server } | Sort DriveLetter
         ForEach ($Disk in $Disks)
         {    $DiskDetailHTML += “<tr><td>$($Disk.DriveLetter)</td><td>$($Disk.VolumeName)</td><td>$($Disk.Size)gb</td><td>$($Disk.Size – $Disk.FreeSize)gb</td><td>$($Disk.FreeSize)gb</td>”
             If ($Disk.perFree -le $AlertThreshold)
             {    $FreeClass = “red”
             }
             Else
             {    $FreeClass = “free”
             }
             $DiskDetailHTML += “<td><div class=””green”” style=””width:$($Disk.perUsed)%””> </div><div class=””$FreeClass”” style=””width:$($Disk.perFree)%””>$($Disk.perFree)%</div></td></tr>`n”
         }
         $DiskDetailHTML += “</table><br>`n”
     }

    #Combine all the HTML fragments and save to a file
     $HTML = $HeaderHTML + $DetailHTML + $DiskDetailHeaderHTML + $DiskDetailHTML + $FooterHTML
     $HTML | Out-File $Path

    Write-Verbose “$(Get-Date): Script completed!”

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

Found on Spiceworks: https://community.spiceworks.com/scripts/show/1641-simple-server-status-report?utm_source=copy_paste&utm_campaign=growth

Offline Squid Proxy log analysis 0

Squid Access Log analysis with simple python command

What is SquidMagic Master?

squidmagic is a tool which is designed to analyze a web-based network traffic to detect central command and control (C&C) servers and Malicious site, using Squid proxy server and Spamhaus.

 

Who is  Spamhaus?

The Spamhaus Project is an international nonprofit organization that tracks spam and related cyber threats such as phishing, malware and botnets, provides realtime actionable and highly accurate threat intelligence to the Internet’s major networks, corporations and security vendors, and works with law enforcement agencies to identify and pursue spam and malware sources worldwid

 

 

 

You Could get many post regarding squid log analyse in a sort way which are not in depth, However, while you are doing in practice scenario, i’m sure you would get many error to run a tool.

Requirement:

Linux Machine (I’m Using Ubuntu 16.04)
Squidmagic Master tool
 
Dependent packages:
Python3

 

sh, termcolor, configparser, pyzmq.

So here is the step by step configuration.

Install Python 3.6 from PPA

You can also install Python 3.6 from J Fernyhough’s Personal Package Archive
Install the following requirements.
apt-get install software-properties-common python-software-properties
Run the Following command to add the ubuntu repository.
sudo add-apt-repository ppa:jonathonf/python-3.6
Update the repository
sudo apt-get update
Install Python version 3.6 on Ubuntu 16.04
and finally install Python version 3.6
sudo apt-get install python3.6
However, it can shows you the older python version which is 3.5
# python3 -V 
Python 3.5.2
On my Ubuntu machine, there are two versions of python available, python3.5 as default python version and python3.6. In this step, we will change the default python version to python 3.6
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 1
 
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 2
sudo update-alternatives --config python3
 
 
 
Selection    Path                Priority   Status
————————————————————
* 0            /usr/bin/python3.6   2         auto mode
  1            /usr/bin/python3.5   1         manual mode
  2            /usr/bin/python3.6   2         manual mode
 
After the installation of python and selected a best version, we need to install python module so here is the following command to get install.
 
Python Packages name : python-zmq
sudo apt-get install python-zmq
Install Python Packages: sh
 
sh is a full-fledged subprocess replacement for Python 2.6 – 3.6, PyPy and PyPy3 that allows you to call any program as if it were a function:
pip install sh
Install Python Package : python-pip
 
 
Pip is a package management system used to install and manage software packages written in Python which can be found in the Python Package Index (PyPI).
sudo apt-get install python-pip
install python package: termcolor
termcolor is Color formatting for output in terminal
pip install termcolor
Install python package: configparser
 
 

 

Note
The ConfigParser module has been renamed to configparser in Python 3. The 2to3 tool will automatically adapt imports when converting your sources to Python 3.
 
 
sudo pip install configparser
Go to your squidmagic dirctory which you had downloaded, if not you can download the tool https://github.com/ch3k1/squidmagic
 
Now we can run the script to following command.
python squidmagic.py /path of your access.log
                 _     _                       _      
                (_)   | |                     (_)     
 ___  __ _ _   _ _  __| |_ __ ___   __ _  __ _ _  ___ 
/ __|/ _` | | | | |/ _` | '_ ` _ \ / _` |/ _` | |/ __|
\__ \ (_| | |_| | | (_| | | | | | | (_| | (_| | | (__ 
|___/\__, |\__,_|_|\__,_|_| |_| |_|\__,_|\__, |_|\___|
        | |                               __/ |       
        |_|                              |___/        
     Analyzing...

Analyzing by SBL Advisory...
 Spam server detected, ip is 65.182.101.221
Analyzing by SBL_CSS Advisory...
 safe server detected, host or ip is 65.182.101.221
Analyzing by PBL Advisory...
 safe server detected, host or ip is 65.182.101.221

Clear DNS Cache – How to Guide 0

clear your DNS cache if you use MacOSDNS is a backbone of the internet world. DNS Flush (Clear DNS Cache) is a very common activity done by system engineers to resolve internet browsing issue. Here we are trying to explain various methods to clear dns cache for Windows and Mac Operating Systems.

What is DNS Cache and Why You Need To Clear It.

The DNS cache is a small database maintained by a computer. The database contains records of all recently accessed hostnames and IP addresses.

If the location of the web server changes before the entry in your DNS cache updates, you can no longer access the site.

If you encounter a large number of HTML 404 error codes, you may need to clear your DNS cache.

After you clear your DNS cache, your computer will query name servers for the new DNS information.

How to clear your DNS cache

The following methods allow you to remove old and inaccurate DNS information that may result in HTML 404 errors.

Clear DNS Cache in Windows 10

File:Windows 10 Logo.svg
To reset the DNS resolver cache, perform the following steps:

1. Hold down the Windows key and press “R” to bring up the Run dialog box.

2. Type ipconfig /flushdns then press “Enter“. (be sure there is a space before the slash)

clip_image001

That’s all there is to it. A command box will flash on the screen for a split second and the DNS Resolver cache is cleared.

image

Windows 8

To clear your DNS cache if you use Windows 8, perform the following steps:
1.    On your keyboard, press Win+X to open the WinX Menu.
2.    Right-click Command Prompt and select Run as Administrator.
3.    Run the following command:

Ipconfig /flushdns

If the command succeeds, the system returns the following message:

“Windows IP configuration successfully flushed the DNS Resolver Cache.”
image

Windows  7

To clear your DNS cache if you use Windows 7, perform the following steps:

1.    Click Start.
2.    Enter cmd in the Start menu search text box.
3.    Right-click Command Prompt and select Run as Administrator.
4.    Run the following command:

Ipconfig /flushdns

5.    If the command succeeds, the system returns the following message:
“Windows IP configuration successfully flushed the DNS Resolver Cache.”

image

Windows XP, 2000, or Vista

To clear your DNS cache if you use Windows XP, 2000, or Vista, perform the following steps:
1.    Click Start.
2.    On the Start menu, click Run….
•    If you do not see the Run command in Vista, enter run in the Search bar.
3.    Run the following command in the Run text box:
Ipconfig /flushdns
4.    If the command succeeds, the system returns the following message:
Successfully flushed the DNS Resolver Cache.

image

MacOS 10.10.4 and above

To clear your DNS cache if you use MacOS X version 10.10.4 or above, perform the following steps:

1.    Click Applications.
2.    Click Utilities.
3.    Click Terminal.
4.    Run the following command:

sudo killall -HUP mDNSResponder

5.    If the command succeeds, the system does not return any output.
6.    Warning:
7.    To run this command, you must know the computer’s administrator account password.

image

MacOS 10.5 and 10.6

To clear your DNS cache if you use MacOS X version 10.5 or 10.6, perform the following steps:

1.    Click Applications.
2.    Click Utilities.
3.    Double-click Terminal.
4.    Run the following command:

sudo dscacheutil –flushcache
5.    If the command succeeds, the system does not return any output.
6.    Warning:
7.    To run this command, you must know the computer’s administrator account password.

image

MacOS 10.7, 10.8, and 10.9

To clear your DNS cache if you use MacOS X version 10.7, 10.8, or 10.9, perform the following steps:

1.    Click Applications.
2.    Click Utilities.
3.    Double-click Terminal.
4.    Run the following command:


sudo killall -HUP mDNSResponder
5.    If the command succeeds, the system does not return any output.
6.    Warning:
7.    To run this command, you must know the computer’s administrator account password.

image

MacOS 10.10.1, 10.10.2, and 10.10.3

To clear your DNS cache if you use MacOS X version 10.10 through 10.10.3, perform the following steps:

1.    Click Applications.
2.    Click Utilities.
3.    Click Terminal.
4.    Run the following command:
sudo discoveryutil mdnsflushcache
5.    If the command succeeds, the system does not return any output.
6.    Warning:
7.    To run this command, you must know the computer’s administrator account password.

Do you have any question? write in comment box.