VOOZH about

URL: https://marcinbojko.wordpress.com/tag/chocolatey/

⇱ chocolatey | Blog Marcina Bojko


Blog Marcina Bojko

Linux,Windows,serwer, i tak dalej ;)

Posts Tagged ‘chocolatey

Petya(notPetya) ransomware attack and how to (quickly) vaccinate lot’s of machines

There was a lot of nice summary articles about latest „ransomware” attack caused by Petya. Soon, researchers started to claim almost permanent vaccine for this type of worm.

https://www.bleepingcomputer.com/news/security/vaccine-not-killswitch-found-for-petya-notpetya-ransomware-outbreak/

Even patched OS won’t save you from infection as one infected machine quickly spreads the infection using other protocols like WinRM.

So, how should one on its vast server farm vaccinate hundrets of machines?

For example, like this 🙂

win_manage:
 dsc_file: 
 petya_vaccine1:
 dsc_destinationpath: C:\Windows\perfc
 dsc_type: file
 dsc_attributes: readonly
 dsc_contents: ""
 petya_vaccine2:
 dsc_destinationpath: C:\Windows\perfc.dat
 dsc_type: file
 dsc_attributes: readonly
 dsc_contents: ""
 petya_vaccine3:
 dsc_destinationpath: C:\Windows\perfc.dll
 dsc_type: file
 dsc_attributes: readonly
 dsc_contents: ""

Written by marcinbojko

1 lipca, 2017 at 11:14

Hyper-V Integration Services en masse ;)

Yes, we all „love” the way Microsoft gives us new stuff (like forced updates in Windows 10). As we usually know better what and when should be applied, let’s say it is time to upgrade our guest integration services to the latest version.
I usually  express strong conviction that HV integration services should be kept up to date, the thing most sysadmins disregards. Those tools are responsible for keeping your VMs in shape, maintain communication between them and host services, so they SHOULD be always updates. Of course, as with almost everything TEST it before applying on any important environment.
As on 2016-12-31, the latest HV Integration Services version is 6.3.9600.18398

Let’s say – we would like to upgrade all our Windows machines (those BEFORE Windows 10 and Windows 2016) . We can do it manually (not cool, not cool at all), semi-automatic (no reboot) or almost … magical way – fully automatic 😉

Let’s start we have proper source added to Chocolatey:

choco source add -n=public -s"https://www.myget.org/F/public-choco" --priority=10
  • semi automatic (RDP, psexec, powershell)
    choco install hvintegrationservices -y
  • fully automatic (with reboot) using The Foreman and win_manage
    win_manage:
     chocolatey_packages:
     hvintegrationservices:
     ensure: 6.3.9600.18398
     dsc_reboot:
     dsc_reboot:
     message: Machine requested a reboot
     when: pending

Written by marcinbojko

31 grudnia, 2016 at 15:14

Change local Administrator passwords. Oh … and unlock them :) On 10k+ machines :)

Administrator:
  dsc_username: Administrator
  dsc_disabled: false
  dsc_password:
    user: NT AUTHORITY\\SYSTEM
    password: P@$$w0rd

Written by marcinbojko

26 listopada, 2016 at 13:52

Napisane w work

Tagged with chocolatey, dsc, foreman, powershell, puppet, windows, win_manage

Chocolatey i własne źródło pakietów.

Bez wątpienia – Chocolatey (https://chocolatey.org/) jest doskonałym zarządcą pakietów dla systemu WIndows – zwłaszcza w instalacjach DesiredStateConfiguration. Trochę przytłacza mnogość sposobów instalacji pakietów (w zasadzie, każdy pakiet potrafi być oddzielnym kawałkiem kodu), jednak rekompensuje to z nawiązką ich niskim skomplikowaniem.

Owszem, sporo pakietów jest w oryginalnym repozytorium, jednak nie wszystkie pakiety źródłowe posiadają publiczne linki, tak aby można je było umieścić w samym pakiecie.

Rozwiązaniem jest np. tworzenie pakietów w repozytorium https://www.myget.org/, a same binarki trzymać np. 2 miejscach – firmowy intranet oraz linki publiczne.

Ponieważ mnie zawsze brakuje wspomnianych pakietów przedstawiam wam własne źródło, gdzie postaram się uzupełniać przydatne i brakujące pakiety.

Kilka zasad:

  1. Wszystkie pakiety binarne trzymane są w moim Dropboxie – katalog /public/choco.
  2. Wszystkie pakiety binarne podpisane są SHA256
  3. Wszystkie pakiety są weryfikowane przez Virus Total a ich suma SHA256 MUSI zgadzać się z sumą z linka VirusTotal. W opisie pakietu widnieje ich suma kontrolna.
  4. Repozytorium jest publiczne – jeżeli chcesz umieścić swój pakiet – odpowiadasz za niego 🙂

Bez zbędnej zwłoki:

Samo źródło: https://www.myget.org/feed/Packages/public-choco

Nuget v2: https://www.myget.org/F/public-choco/api/v2

RSS źródła z pakietami: https://www.myget.org/RSS/public-choco

Jak dodać źródło do swojego Chocolatey’a?

choco source add -n=NAZWA -s"https://www.myget.org/F/public-choco" --priority=10

Jak zainstalować/aktualizować pakiet?

choco install nazwapakietu -y

choco upgrade nazwapakietu -y

Jak usunąć pakiet?

choco uninstall nazwapakietu -y

Jakie pakiety są w repo?

Na dzień dzisiejszy:

WPS-Office-Personal – https://www.myget.org/feed/public-choco/package/nuget/wps-office-personal

Zabbix-Agent3 – https://www.myget.org/feed/public-choco/package/nuget/zabbix-agent3

Pozostałe pakiety przerabiam z sum kontrolnych MD5 na SHA256 co zajmuje mi nieco czasu.

Written by marcinbojko

1 października, 2016 at 12:57

Jestem dostępny:

O autorze https://marcinbojko.wordpress.com/about/ github.com https://github.com/marcinbojko LinkedIn https://www.linkedin.com/in/marcinbojko Facebook https://www.facebook.com/marcin.bojko1

Chocolatey

Chocolatey

Najnowsze wpisy

Blog Stats

  • 127 594 hits

Najpopularniejsze wpisy

active directory amiga Android ansible ati backup ca centos chmura chocolatey chrome debian Dell disaster recovery dlink docker drbl dsc emulacja etch filesystem firefox food foreman foto Fujitsu-Siemens fun github google gsm HP htc hyper-v hypervisor IBM internet kubernetes linux media microsoft mint mozilla nexus 7 ntfs-3g nvidia office oldchool open open source opensource opensuse outlook packer pacman pocket powershell puppet radeon sci-fi scvmm servers star trek traefik Uncategorized vagrant virtualisation vmware windows windows defender winuae win_manage wirtualizacja work xbmc zabbix
Czerwiec 2026
Pon W Śr Czw Pt S N
1234567
891011121314
15161718192021
22232425262728
2930

Meta

Archiwum

Dołącz do 11 innych subskrybentów

Blog na WordPress.com.

%d
Zaprojektuj witrynę taką jak ta za pomocą WordPress.com
Rozpocznij