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.....
Powershell, automation, IT problem solving, Windows, Linux and more.......
Wednesday, December 27, 2017
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).
Monday, March 6, 2017
Powershell --> Powerquick : force active directory replication from a specific domain controller to the remaining others
Hi Mates,
quick and useful : how many times you needed to replicate an Active Directory change to the entire domain ?.....quickly, without waiting the system times.
The GUI is pretty clear but open the administration tool, expand, right click......and so on.....too long sometime....clearly too long
It happens me every day : someone call me from another site/plant and ask me to make some changes. YES I know that we have some replication priority inside AD, it depends on the value that you are going to change.
quick and useful : how many times you needed to replicate an Active Directory change to the entire domain ?.....quickly, without waiting the system times.
The GUI is pretty clear but open the administration tool, expand, right click......and so on.....too long sometime....clearly too long
It happens me every day : someone call me from another site/plant and ask me to make some changes. YES I know that we have some replication priority inside AD, it depends on the value that you are going to change.
Wednesday, March 1, 2017
Powershell --> Powerquick : move disabled users from a group to another
Hi Mates,
quick and useful : how many times you needed to have a clean group because to this specific group there was associated a software usage/number of licenses ?
It happened to me but my need was also to have a trace of the users that were members of this group.
So I started creating a group that hosts all disabled user account that TODAY are not using the software "attached" to the main group, but tomorrow I could need to know if a "returning" user had right to be a part of it......a sort of history.
Wednesday, February 22, 2017
Today challenge n.2 : Windows 7 issue with profile
Hi Mates,
this is the second appointment with this new section that wants to describe, briefly, what happens every day in my technical-sysadmin life.
Sometimes what happens is really interesting, other time is not......I would try to give you the most interesting things.
In this article I'll give you an alternative solution, not easy to find on the web, related to Windows 7. An early formatted computer, joined to an active directory domain, was not able to build the user profile. An administrator, instead, could login without any kind of issue.
Most of the articles that you find surfing the web are inherent to a corrupted profile that must be deleted from the GUI interface and from the registry too.
In my case the end user was not able to login THE FIRST TIME......so no profile was created, no registry keys and so on.
The error was similar to the screenshot posted below :
this is the second appointment with this new section that wants to describe, briefly, what happens every day in my technical-sysadmin life.
Sometimes what happens is really interesting, other time is not......I would try to give you the most interesting things.
In this article I'll give you an alternative solution, not easy to find on the web, related to Windows 7. An early formatted computer, joined to an active directory domain, was not able to build the user profile. An administrator, instead, could login without any kind of issue.
Most of the articles that you find surfing the web are inherent to a corrupted profile that must be deleted from the GUI interface and from the registry too.
In my case the end user was not able to login THE FIRST TIME......so no profile was created, no registry keys and so on.
The error was similar to the screenshot posted below :
Tuesday, January 31, 2017
Today challenge : Domain Password policies and Fine-Grained P.P.
Hi Mates,
this is a new section that wants to describe, briefly, what happens every day in my technical-sysadmin life.
I don't want to bore you with complicate concepts but only to focus on a simple "adventure" that every day "stole" me sometime (leaving also on me something that I had forgotten or that I didn't know).
Today I had to face up with a GPO in a customer Active Directory domain (Windows 2008 R2). Practically the customer told me that even if the value of the parameter "Minimum password age" was set to 0 she was not able to change repeatedly her password.
The core of the issue was that being her a SysAdmin she was added in a group (Shadow) part of the Fine-Grained Password Policy.
this is a new section that wants to describe, briefly, what happens every day in my technical-sysadmin life.
I don't want to bore you with complicate concepts but only to focus on a simple "adventure" that every day "stole" me sometime (leaving also on me something that I had forgotten or that I didn't know).
Today I had to face up with a GPO in a customer Active Directory domain (Windows 2008 R2). Practically the customer told me that even if the value of the parameter "Minimum password age" was set to 0 she was not able to change repeatedly her password.
The core of the issue was that being her a SysAdmin she was added in a group (Shadow) part of the Fine-Grained Password Policy.
Subscribe to:
Posts (Atom)