quinta-feira, 16 de março de 2017

HOW TO MONITORING FROM ZABBIX SERVICES OF (KASPERSKY) TEMPLATE ZABBIX

Kaspersky manager consolee 9:
zbx_export_templateskaspersky_console_ksc9.xml  https://mega.nz/#!GFtQCBgK!lM2Pfm4dkOyNXgmAFdFQbc-rQN_Np5bMgie2YllWf9M

Kaspersky manager consolee 10:
zbx_export_templateskaspersky_console_ksc10.xml https://mega.nz/#!mFU2HIxJ!rB2vL6GgbaEsLqckTngAUOFBcak4lLpgHg63v60Pthc

Kaspersky av agent 10:
zbx_export_templates_kaspersky_agent.xml https://mega.nz/#!HIVHyDhJ!wJxdBJcpa1kGzmZfsct3DHuFwllIyjbZDk4gj_xMp2U

Kaspersky av fs 10 e enterprise 8:
zbx_export_templates_services_kaspersky_av_fs_kes10
zbx_export_templates_kaspersky_av_fs_kes10.xml  https://mega.nz/#!SMVBUSCT!DUoJkpDtM8AoG5706JGuYoyG_-7coMnIcipauLzVw7A

Kaspersky av wks 10:
zbx_export_templateskaspersky_av_wks_kes10.xml  https://mega.nz/#!OQ8hzAYY!AjxzMYduV871F61LRg9cKJJwuEji4IU3RiELaL3pux8







HOW TO ENABLE SNMP COMMUNITIES ON ESXI

First, enable ssh on esxi and try to connect by terminal.
after that, execute this command:
#esxcli system snmp set --communities YOUR COMMUNITIE NAME
# esxcli system snmp set --enable true

if you have some issue for test with the command snmpwalk execute this configuration:

# esxcli network firewall ruleset set --ruleset-id snmp --allowed-all true
# esxcli network firewall ruleset set --ruleset-id snmp --enabled true
# /etc/init.d/snmpd restart

domingo, 12 de março de 2017

HOW TO REMOVE A SOFTWARE FROM DEPPIN OS WITHOUT TERMINAL

So, this procedure is simple, you must just click on right botton of your mouse about your program and select the option uninstall that must appear for your.

following the image bellow:


segunda-feira, 27 de fevereiro de 2017

HOW TO ENABLE WINDOWS POWERSHELL ISE ON YOUR SERVER

So, microsoft sometimes is not cleary for this procedure,


for windows server 2012r2 you must do that:

open your powershell on administrator mode and add this command:


 Import-Module ServerManager
 Add-WindowsFeature PowerShell-ISE




for windows server 2012 or 2008 and 2008 r2 you must do that first:
install windows framework manager 5.0 or above :
https://www.microsoft.com/en-us/download/details.aspx?id=50395

before make a download of windows powershell ise and install :
https://www.microsoft.com/en-us/download/details.aspx?id=50395

sexta-feira, 24 de fevereiro de 2017

HOW TO CREATE A MAIL REPORT OF MICROSOFT WINDOWS BACKUP STATUS

Fist of all  install this application on your windows server:

1;Elevated PowerShell-session.
2;Windows Server Backup feature installed.
3; Feature common line tools of windows server backup feature must be enable too.
3;At least Windows Management Framework 3.0



After thtat, create a script folder on your server like : c:\scritpt\
move above script for this folder:

After that, custom the script for add email information:
email from,
email to,
smtp


and add  on your task manager with this detail.




Script program:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Aditional arguments:
-Command "C:\Scripts\WBJobReport.ps1" -ExecutionPolicy Bypass


download above: wbjobreport.ps1:

###############################START SCRIPT####################################


<#
.SYNOPSIS
Windows Backup Mail Report
Written by Joakim, http://jocha.se
.DESCRIPTION
Version 4.1 - Updated 2016-05-31
This script will mail a report from the latest Windows Backup job, can also fetch and generate reports from remote servers. The script requires at least PowerShell v3.
.EXAMPLE
To automate this script, setup a scheduled task.
    Name: Backup Email Task
    Description: Notifies backup admin of scheduled backup status
    Run whether user is logged on or not
    Trigger > On event > Log=Microsoft-Windows-Backup/Operational > Source=Backup > Event ID(s)= 4,5,8,9,17,22,49,50,52,100,517,518,521,527,528,544,545,546,561,564,612
    Action: Start a Program
        Program: Powershell
        Arguments: -Command "C:\Scripts\WBJobReport.ps1" -ExecutionPolicy Bypass
#>

#Add-PSSnapin Windows.ServerBackup -ErrorAction Silently
#######################################
#-------- Variables to change --------#

# Uncomment the two rows below and row 207 to enable "Remote Report" generation.
#$Servers = New-PSSession -Computername Server01, Server02, Server03
#Invoke-Command -Session $Servers {

# Set your Company name
$Company = "Cordeiro Advogados - Backup Local"

# Set the recipient/sender email-address
$MailTo = "youremail"
$MailFrom = "$Company "

# SMTP user account password
$MailUser = "youremail"
$MailPassword = "pass" 

# SMTP Server
$MailServer = "yoursmtpserver"

# SMTP Port
$MailPort = 25 
# If your server uses SSL, otherwise set to $false
$UseSSL = $false

#---- Don't change anything below ----#
#######################################

Try {
$CurrentTime = (Get-Date).ToString("yyyy-MM-dd HH:mm")
$Computer = Get-Content env:computername
$WBJob = Get-WBJob -Previous 1
$WBSummary = Get-WBSummary
$WBLastSuccess = ($WBSummary.LastSuccessfulBackupTime).ToString("yyyy-MM-dd HH:mm")
$WBResult = $WBSummary.LastBackupResultHR
$WBErrorMsg = $WBJob.ErrorDescription + "`n" + $WBSummary.DetailedMessage
$WBStartTime = $WBJob.StartTime
$WBEndTime = $WBJob.EndTime
$WBDuration = (New-TimeSpan -Start $WBStartTime -End $WBEndTime)

$Password = ConvertTo-SecureString $MailPassword -AsPlainText -Force
$Credentials = New-Object System.Management.Automation.PSCredential ($MailUser, $Password)

Function FormatBytes
{
Param
(
[System.Int64]$Bytes
)
[string]$BigBytes = ""
#Convert to TB
If ($Bytes -ge 1TB) {$BigBytes = [math]::round($Bytes / 1TB, 2); $BigBytes += " TB"}
#Convert to GB
ElseIf ($Bytes -ge 1GB) {$BigBytes = [math]::round($Bytes / 1GB, 2); $BigBytes += " GB"}
#Convert to MB
ElseIf ($Bytes -ge 1MB) {$BigBytes = [math]::round($Bytes / 1MB, 2); $BigBytes += " MB"}
#Convert to KB
ElseIf ($Bytes -ge 1KB) {$BigBytes = [math]::round($Bytes / 1KB, 2); $BigBytes += " KB"}
#If smaller than 1KB, leave at bytes.
Else {$BigBytes = $Bytes; $BigBytes += " Bytes"}
Return $BigBytes
}

Function Log-BackupItems
{
    Param
    (
        [System.String]$Name,
        [System.String]$Status,
        [System.Int64]$Bytes
    )
    $Item = New-Object System.Object;
    $Item | Add-Member -Type NoteProperty -Name "Name" -Value $Name;
    $Item | Add-Member -Type NoteProperty -Name "Status" -Value $Status;
    $Item | Add-Member -Type NoteProperty -Name "Size" -Value (FormatBytes -Bytes $Bytes);
    Return $Item;
}

$results=@()
$WBJob | % {
$_.JobItems | % {
$BackupItem = $null
If ($_.Name -eq 'VolumeList') {
$_ | % {$_.SubItemList | % {
$BackupItem = Log-BackupItems -Name $_.Name -Status $_.State -Bytes $_.TotalBytes
$results += $BackupItem
}}
Else {
$_ | % {
$BackupItem = Log-BackupItems -Name $_.Name -Status $_.State -Bytes $_.TotalBytes
$results += $BackupItem
}
}
}
}

# Change Result of 0 to Success in green text and any other result as Failure in red text
If ($WBResult -eq 0) { $WBResult = "Successful"}
Else {$WBResult = "Failed"}

# Assemble the HTML Report
$HTMLMessage = @"
    <!DOCTYPE html>
    <html>
    <head>
    <title>$Company Microsoft Backup Local Report for $Computer</title>
    <style>
    body { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 12px }
    h3{ clear: both; font-size: 150%; margin-left: 20px;margin-top: 30px; }
    table { padding: 15px 0 20px; width: 500px; text-align: left; }
    td, th { padding: 0 20px 0 0; margin 0; text-align: left; }
    th { margin-top: 15px }
    a, a:visited { color: #2ea3f2; text-decoration: none; }
    #Report { width: 600px; }
    #Successful { color: green }
    #Failed { color: red }
    </style>
    </head>
    <body>
    <div id="Report">
    <p><h3><a href="http://jocha.se">$Company Backup Report for $Computer</a></p></h3>
    <table id="summary"><tbody>
    <tr><td>Todays date:</td>
    <td>$CurrentTime</td></tr>
    <tr><td>Last Successful Backup:</td>
    <td>$WBLastSuccess</td></tr>
    <tr><td>Start time last backup:</td>
    <td>$WBStartTime</td></tr>
    <tr><td>End time last backup:</td>
    <td>$WBEndTime</td></tr>
    <tr><td>Duration last backup:</td>
    <td>$WBDuration</td></tr>
    <tr><td>Backup Result:</td>
    <td><b id="$WBResult">$WBResult</b></td></tr>
    <tr><td>Error Message (if applicable):</td>
    <td>$WBErrorMsg</td></tr></tbody></table>

    $(
   $html = $results | ConvertTo-HTML -Fragment
   $xml=[xml]$html
   $attr=$xml.CreateAttribute('id')
   $attr.Value='items'
   $xml.table.Attributes.Append($attr) | out-null
   $html=$xml.OuterXml | out-string
   $html
    )
    </div>
    </body>
    </html>
"@

$email = @{
    SMTPServer = $MailServer
    UseSSL = $UseSSL
    BodyAsHtml = $true
    Port = $MailPort
    Credential = $Credentials
    Encoding = ([System.Text.Encoding]::UTF8)
    To = $MailTo
    From = $MailFrom
    Subject = "$WBResult Backup on $Computer"
    Body = $HTMLMessage
    }
    Send-MailMessage @email
}

Catch {
#    $email = @{
#    SMTPServer = $MailServer
#    BodyAsHtml = $true
#    UseSSL = $UseSSL
    #Port is a PowerShell v3 variable
#    Port = $MailPort
#    Credential = $Credentials
#    Encoding = ([System.Text.Encoding]::UTF8)
#    To = $MailTo
#    From = $MailFrom
#    Subject = "Failed Backup on $Computer"
#    Body = "The backup script failed to run!"
#}
#Send-MailMessage @email
#}
# Uncomment below to enable "Remote Report".
}



#####################################END SCRIPT################################


source detail from: http://blog.jocha.se/tech/wbadmin-backup-mail-report

emprovements for your management: https://gallery.technet.microsoft.com/scriptcenter/Windows-Server-Backup-d5ae1172 

terça-feira, 14 de fevereiro de 2017

RASPIBERRY PI 3 B REVIEW

If you doesn't choose the Sd card right you will have a slow system. however, after that i change for a sd 10 class extreme scan disk that record on 4k videos the performance work fine.

problems that i take when set a slow sd card:
brand tested: scan disk 32gb class 4
brand tested2: multilazer 32gb class10

both brand don't get a good performance.

issue detected:
slow web pages
multi task work with slow
hight I/O write and read.

After change for sd card scan disk 32 gb 4k channel 10 my issue was solved.

follow the tested systems:

android, ok http://www.mediafire.com/file/cabo6z8ky1adgsj/marshrpi3wifibt19042016.img.bz2
raspbian, ok https://www.raspberrypi.org/downloads/
ubuntu core , not yet
windows core, not yet
rtandroid, ok https://rtandroid.embedded.rwth-aachen.de/downloads/raspberry-pi/
kali linux, no yet https://www.offensive-security.com/kali-linux-arm-images/


quarta-feira, 1 de fevereiro de 2017

HOW TO SET A INDIVIDUAL USER PASSWORD TO NEVER EXPIRE ON OFFICE 365

Open power shell module power shell "Azure active directory" start with the command:
Connect-MsolService
put your data for connect.
After that:
Set-MsolUser -UserPrincipalName <youemail@yourdomain.com.br> -PasswordNeverExpires $true

Find out whether a user's password is set to never expire

For find the true information put:
Get-MSOLUser -UserPrincipalName <youemail@yourdomain.com.br> | Select PasswordNeverExpires

quarta-feira, 25 de janeiro de 2017

HOW TO SOLVED MESSAGE ERRO "COULDN'T RUN /USR/BIN/DUMPCAP IN CHILD PROCESS PERMISSION DENIED" WIRESHARK ON DEBIAN

First:
usermod -a -G wireshark your_username

After:
sudo dpkg-reconfigure wireshark-common
sudo chmod +x /usr/bin/dumpcap

after that the wireshark message must desappear and you must have the interface statistcs on wireshardk dashboard.

sexta-feira, 16 de dezembro de 2016

MIB KASPERSKY SECURITY CENTER

So today i'll share the MIB kaspersky security center and the procedure to how you can configure for the ksc server (console) to stay on according for you start the monitoring by NOC (zabbix, nagios, or any way) your product just have support for SNMP protocol.


following the procedures:

file mib: https://mega.nz/#!3VMQALqa!DtNWxaNkynN3e9IjY1h5oVkYP5iPpfURMiM8sdTsDow


URL to make a server configuration:

SNMP configuration #https://support.kaspersky.com/2811
SNMP with SCOM #https://support.kaspersky.com/12603
SNMP overview http://support.kaspersky.com/learning/courses/kl_102.98/chapter1.2/section3

for import those mibs you must downlaod of this files and put on your MONITOR server like (ZABBIX, NAGIOS) or someting like that.



normally for zabbix for example, i need move this files for /usr/share/mibs folder and restart the service snmpd daemon. but depends for your monitoring software.

sexta-feira, 9 de dezembro de 2016

HOW TO RUN NMAP FOR WINDOWS TARGETS

MICROSOFT ENUMERATION PORT:

nmap -v -O -sV -T4 --osscan-guess -oA ms-smbscan --script=smb-enum-domains,smb-enum-processes,smb-enum-sessions,smb-enum-shares,smb-enum-users,smb-os-discovery,smb-security-mode,smb-system-info <target ip>

nmap -T4 --top-ports 50 -sV -O --osscan-limit --osscan-guess --min-hostgroup 128
--host-timeout 10m -oA ms-vscan -iL ms.ips.lst