Tag: windows

  • Easily get NS, MX, SPF, DMARC and DKIM records. PowerShell to the rescue…

    Easily get NS, MX, SPF, DMARC and DKIM records. PowerShell to the rescue…

    In the world of IT, we’re constantly striving to enhance an organization’s security posture, resolve email deliverability woes, or simply bring their infrastructure up to par. A common task in this realm is the need to swiftly assess DNS configurations, especially during events like an acquisition where dozens—or even hundreds—of domains need to be scrutinized for their current settings.

    While tools for this purpose undoubtedly exist, the unique challenges of each audit often necessitate a more tailored approach. Recently, during an acquisition involving over 50 domains, I found myself needing a more efficient way to gather critical DNS record information. This led to the development of two PowerShell scripts, designed to automate and simplify this often-tedious process. Full disclosure: These scripts were developed with significant assistance from Gemini, an AI.


    Script 1: Comprehensive DNS Record Retrieval

    This primary script is designed to handle the bulk of your DNS record discovery. It comes pre-loaded with a comprehensive list of common DKIM selectors, which should cover a wide range of scenarios. Should you encounter a less common selector, the script is easily modifiable to incorporate new findings.

    Usage Examples:

    For multiple domains from a file:

    ./Get-DNSRecords.ps1 -File "domains.txt"

    For a single domain:

    ./Get-DNSRecords.ps1 -Domain "curtislamasters.com"

    Detailed documentation and additional usage instructions are embedded directly within the script.


    Script 2: Targeted DKIM Selector Discovery

    Occasionally, you’ll encounter domains using unconventional or obscure DKIM selector names. This secondary script is specifically designed to help identify these “needle in a haystack” selectors that might be missed by a more general scan.

    Usage Examples (identical to the first script for consistency):

    For multiple domains from a file:

    ./Get-DNSSelector.ps1 -File "domains.txt"

    For a single domain:

    ./Get-DNSSelector.ps1 -Domain "curtislamasters.com"

    Similar to the first script, comprehensive documentation is included within the script itself.


    A Practical Workflow

    My current workflow involves running Get-DNSRecords.ps1 first. If a DKIM selector isn’t found, I then use Get-DNSSelector.ps1 to identify the elusive selector. Once found, I integrate that new selector into the Get-DNSRecords.ps1 script for future, more comprehensive scans. This iterative process has proven effective across hundreds of domain checks.

    Technical Note: These scripts have been tested on PowerShell 7.5 running on both Windows 10 and Windows 11 with consistent results.


    Future Enhancements

    Looking ahead, I plan to explore transforming these scripts into a web application, making DNS record auditing even more accessible and user-friendly.

    I welcome any feedback or suggestions on these scripts and the workflow. Your insights help refine and improve these tools for the benefit of the community.

  • Windows / Linux Software Equivalents

    Windows is definitely the big player in the game still, however Linux usage is gaining some steam. This post is going to concentrate on what programs you can use to make the switch to Linux. This process is not going to be entirely pain free if you are an avid user of all things computer related, however, if you are just a basic office user/worker or only need to check your email and play a few basic online games, Linux might be for you. There are literally thousands of choices for most applications out there so I’m only going to name the ones that I like or use and also only ones that work on Ubuntu. If you have any additions, please let me know.

    Windows vs. Linux (Ubuntu)

    Internet Browsing
    W – Internet Explorer
    U – Firefox

    Email Clients
    W – Outlook, Outlook Express
    U – Thunderbird, Evolution

    Chat Clients
    W – MSN, Yahoo, Google Talk, AIM, mIRC
    U- Gaim / Pigdin, xChat, BitchX

    Com Port Communications
    W – Hyperterminal
    U – MiniCom

    FTP Client
    W – Filezilla FTP Client
    U – Filezilla FTP Client

    Remote Access Servers
    W – Terminal Server, RealVNC, TightVNC, WinVNC
    U – FreeNX, RealVNC, TightVNC

    P2P Filesharing
    W – Limewire, Bearshare, Bittorrent
    U – Limewire, Azureus

    VoIP Clients
    W – Skype, X-Lite
    U – Skype, Linphone, Twinkle

    Drawing / Photo Editing
    W – Paint.net, Photoshop, MSPaint
    U – GIMP
    3D Annimation / Rendering
    W – 3D Studio MAX, Blender
    U – Blender, Maya

    DVD Players
    W – Windows Media Player, PowerDVD
    U – MPlayer, Kaffine, VLC

    MP3 / Music Players
    W – Winamp, iTunes
    U – RhymeBox, K3b

    Office Productivity
    W – Microsoft Office
    U – OpenOffice.org

    Network / Relation Mapping
    W – Microsoft Visio
    U – Dia

    Accounting / Financial
    W – Quicken, Microsoft Money
    U – GnuCash

    Desktop Publishing
    W – Microsoft Publisher, Quark
    U – Scribus

    PDF Editing
    W – Adobe Acrobat Professional
    U – PDFEdit, pdftk

    Imaging
    W – Norton Ghost
    U – G4u, dd

    Partition Resizing
    W – Norton Partition Magic
    U – GParted

    Backup Software
    W – Symantec Backup Exec
    U – BackupPC, Amanda

    Web Servers
    W – Microsoft IIS
    U – Apache

    File Servers
    W – Microsoft File Services
    U – Samba

    Email Servers
    W – Microsoft Exchange
    U – Postfix, Sendmail

    AntiVirus Software
    W – Symantec AV, Mcafee
    U – ClamAV, AVG

    For more of these “like” software lists, please visit what I believe to be the most complete list on the internet, Table of Equivalents.

  • Easy Windows Profile Migration

    Tonight I was at a client site working on an Server 2003 / Exchange 2007 Deployment for a client which required us to disjoin computers from the old domain and add them to the new domain. Well, the trick to a successful deployment of any product is ease of use, for the IT guy’s and the end user. The end user is ultimately affected by what we do so we try to minimize the changes that are actually made to their experience. For the IT guy’s, how can me make this easy, simple, and yet functional. When it comes to profile migration, there are a few tools out there that will do it for you, some cost money, some don’t. For me, those are too complicated to learn and master. Secondly we have the profile copy utilities like xcopy and robocopy which I honestly still use quite often, they work and work well in my opinion, however, the third option is the best and easiest to do. A simple registry hack to change the GUID that you are logged on with as the user, to point to a different profile path. Here are the steps to execute such a plan.

    • Change the local administrator password
    • Disjoin the system from the old domain
    • Use the set command to determine what profile path the user is currently using
    • Reboot the system
    • Login as the local administrator
    • Join the system to the new domain
    • Reboot the system
    • Login as the user on the new domain
    • Logoff and logon as the domain administrator
    • Open regedit and modify ProfileImagePath within “[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionProfileList]”
    • Change the permissions on that profile path within explorer, give the user full control and propagate to the child directories and file.
    • Reboot (Last Time)
    • Login with the user on the domain and you should have the “old” working profile with the new domain user account.

    This process took two fairly skilled individuals about 5 hours to complete on 18 systems and that included doing the first “test” machine and troubleshooting any problems that might have come up (missing mapped network drives, incorrect shortcut paths, etc.). Hope this helps you along the way as it did me when I learned it. If you have any suggestions, options, better methods, please let me know. I’m all ears.