GithubHelp home page GithubHelp logo

windows's Introduction

windows

Git through Proxy

$ git config --global http.proxy http://<username>@<proxyserver>:<port>
$ git config --global credential.helper wincred

Base64 encode in PS

[Convert]::ToBase64String([System.Text.Encoding]::Unicode.GetBytes("test"))

Check current PS Session Architecture

write-host 'Current PS console architecture is: '(([IntPtr]::size)*8) 'bit'

To run a 64-bit PS command from a 32-bit CMD.exe, you can use following command:
C:\Windows\sysnative\WindowsPowerShell\v1.0\powershell.exe "write-host 'Current PS console architecture is: '(([IntPtr]::size)*8) 'bit'"

NT hash

Calculate NT hash from plaintext using Python script:

import sys,hashlib,binascii
input = sys.argv[1]
hash = hashlib.new('md4', input.encode('utf-16le')).digest()
print ("Plaintext password provided: ",input)
print ("NT hash: ",binascii.hexlify(hash))

Use the script with: python scriptname.py <plaintext pw>

WinGet

Install Firefox

winget install mozilla.firefox

Proxy with PowerShell

# Check proxy
[System.Net.WebProxy]::GetDefaultProxy()
Get-ItemProperty -Path "Registry::HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
netsh winhttp show proxy

# Set proxy credentials
[System.Net.Http.HttpClient]::DefaultProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials

# Set NULL proxy (bypass proxy)
[System.Net.Http.HttpClient]::DefaultProxy = New-Object System.Net.WebProxy($null)
[System.Net.HttpWebRequest]::DefaultWebProxy = New-Object System.Net.WebProxy($null)
# Specific proxy
[System.Net.Http.HttpClient]::DefaultProxy = New-Object System.Net.WebProxy('http://proxy', $true)

# Test if proxy is used or bypassed for specific URL 
([System.Net.WebRequest]::GetSystemWebproxy()).IsBypassed("https://google.com")

Test AV

To quickly verify if AV is running and catching malicious files, the EICAR test file can be downloaded using powershell:

Invoke-WebRequest -Uri https://secure.eicar.org/eicar.com.txt -OutFile C:\temp\eicar.com.txt

DFIR Stuff

# amcache:
C:\Windows\AppCompat\Programs\Amcache.hve
# shimcache:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\AppCompatCache
# prefetch: 
C:\Windows\Prefetch

windows's People

Contributors

ville87 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.