IT Solutions and automation......day by day
Powershell, automation, IT problem solving, Windows, Linux and more.......
Monday, June 19, 2023
Wednesday, December 27, 2017
Powershell/Encryption : simple encryption with symmetric algorithm
Hi Mates,
I was just curious on how to create my personal encryption algorithm. I've read various books but I've never tried to build my own one.
Using Powershell I tried to create something simple, easy to understand and to manipulate in order to re-user, disrupt, change and so on.
There are some comments inside it that explain better what is the logic behind it and what are the "keys" that are part of the entire "process".
I don't want to waste my time creating Synopsis, Description and so on......at least in this moment, maybe in the future I'll do it (....I know it's better.... :-) )
Anyway try to understand the script referring to the comments inside it.
ah.....it works fine with Powershell 5.0 ($psversiontable.psversion.......everytime I've to review how to check the version via command line ......ahahahahgrsh)
Here you have to code.....
I was just curious on how to create my personal encryption algorithm. I've read various books but I've never tried to build my own one.
Using Powershell I tried to create something simple, easy to understand and to manipulate in order to re-user, disrupt, change and so on.
There are some comments inside it that explain better what is the logic behind it and what are the "keys" that are part of the entire "process".
I don't want to waste my time creating Synopsis, Description and so on......at least in this moment, maybe in the future I'll do it (....I know it's better.... :-) )
Anyway try to understand the script referring to the comments inside it.
ah.....it works fine with Powershell 5.0 ($psversiontable.psversion.......everytime I've to review how to check the version via command line ......ahahahahgrsh)
Here you have to code.....
Friday, October 6, 2017
Powershell : migrate Exchange 2010 on-prem mailbox to Office 365 and more.....
Hi Mates,
here below a script that I've used to migrate some users to Office 365.
The script contains a lot of comments that should explain sufficiently what it does during the several steps.
Consider that I had a bunch of needs : change some group membership , change the quota, apply email address policy and so on.
For sure it is amendable but at least it's a decent starting point.
here below a script that I've used to migrate some users to Office 365.
The script contains a lot of comments that should explain sufficiently what it does during the several steps.
Consider that I had a bunch of needs : change some group membership , change the quota, apply email address policy and so on.
For sure it is amendable but at least it's a decent starting point.
Tuesday, October 3, 2017
Obfuscating Powershell script with Powershell
Hi Mates,
I was intrigued by a book
that I was reading about Pen Testing. The author wrote a Python script used,
together with other functions, to obfuscate a Powershell script.
Since I love Powershell
and I’m trying to learn Python I was just curious to see if I was able to
re-create the Python script in Powershell.
On the web there are many
example but most of them didn’t work (for me). In fact most of them don’t clean
the script from some useless chars (CR, BOM, Comments and so on).
I decided to try….. I’ve
learned what is BOM and how to get a raw file at the end of some steps.
If the original file
respect some specifications (I’ll illustrate later) the obfuscation should happen
without any issue.
Monday, September 18, 2017
Today-challenge n.3 : offending patches and SCCM 2012
Hi mates,
I had a big issue during the previous days with a specific Microsoft Patch. The 12 of September MS released an update for Office (KB4011089).
One of my clients had in production SCCM 2012 R2 to install automatically this kind of patches.
The day after a lot of users started calling the helpdesk telling that the cannot open attachments on archived emails . They use a product that is not famous on the market, as we say a "niche" product.
Anyway after investigating a lot we identified the "offending" patch (yes I know that usually patches must be distributed in a test environment before anything). I wrote "a lot" because this is a very dinamyc environment : they apply GPO, update and so on everyday, so you have to understand which single change may have had a specific impact.
So at this point two tasks were assigned to me :
I had a big issue during the previous days with a specific Microsoft Patch. The 12 of September MS released an update for Office (KB4011089).
One of my clients had in production SCCM 2012 R2 to install automatically this kind of patches.
The day after a lot of users started calling the helpdesk telling that the cannot open attachments on archived emails . They use a product that is not famous on the market, as we say a "niche" product.
Anyway after investigating a lot we identified the "offending" patch (yes I know that usually patches must be distributed in a test environment before anything). I wrote "a lot" because this is a very dinamyc environment : they apply GPO, update and so on everyday, so you have to understand which single change may have had a specific impact.
So at this point two tasks were assigned to me :
Wednesday, September 13, 2017
Powershell --> Powerquick : retrieve event viewer settings and/or search for locked user account
Hi mates,
quick and useful : check event viewer settings as record count, state (full or....) file size and so on.
Additionally below you can find a separate script that allows you to query Event Viewer searching for locked out users.
Nothing more, it's easy to understand and adapt to your needs.
Here you are :
Hope this help.
Bye
quick and useful : check event viewer settings as record count, state (full or....) file size and so on.
Additionally below you can find a separate script that allows you to query Event Viewer searching for locked out users.
Nothing more, it's easy to understand and adapt to your needs.
Here you are :
Hope this help.
Bye
Wednesday, March 15, 2017
Brute Force/Random password for an Excel protected file : embryonic Powershell exercise
Hi Mates,
only a brief exercise in Powershell.
I would like to know if it is possible to crack Excel password with this scripting language.
Theoretically YES. Practically this is only another opportunity to learn it better.
You can improve it for sure but it's only a good point from which to start and , maybe, go deeper.....
With more diligence you could be able to convert this script to compare some hash.
This is a random password generator ...it's up to you to decide what is the best approach : if you know some information about the secret you can sight better your target and modify the script to exclude some useless calculation. Otherwise you will have to check N passwords /2.....at least (consider it the average).
only a brief exercise in Powershell.
I would like to know if it is possible to crack Excel password with this scripting language.
Theoretically YES. Practically this is only another opportunity to learn it better.
You can improve it for sure but it's only a good point from which to start and , maybe, go deeper.....
With more diligence you could be able to convert this script to compare some hash.
This is a random password generator ...it's up to you to decide what is the best approach : if you know some information about the secret you can sight better your target and modify the script to exclude some useless calculation. Otherwise you will have to check N passwords /2.....at least (consider it the average).
Subscribe to:
Posts (Atom)