News for hackers. Stuff that matters.
Re:The increased use of PowerShell in attacks [pdf] by c0wb0yc0d3r on Friday May 19, 2017 @04:58PM (#14379306)
If I could make a suggestion about debugging scripts.

It doesn't seem that I can currently debug scripts that are contained in a module folder, but not directly the script being called.

If I have a module file that looks like this:

Get-ChildItem -Path $PSScriptRoot\.ps1 | ForEach-Object{ .$_.FullName } # source the script files Export-ModuleMember -function -* # export those sourced scripts

I am not sure how it works exactly, but if I am writing a new cmdlet, Get-HackerNews.ps1, the breakpoints aren't hit in ISE. It would be super cool if it did.

------

Also is there guidance on module structure? Right now it looks like the docs indicate that all the cmdlets should be placed in the .psm1 file, but to me that sounds like it would get rather unmaintainable very quickly. Just looking at the one my dev team has created, we have nearly 50 exported functions. Maybe our our module could be broken up, but that would still leave us ~10 cmdlets per module.

Re:The increased use of PowerShell in attacks [pdf] by hobs on Friday May 19, 2017 @09:40PM (#14380587)
Here is an example of a real project that uses PowerShell to help DBA automation, you dont include them in your psm1, just dot source them, see https://github.com/sqlcollaborative/dbatools/blob/master/dba... for an example.
Re:The increased use of PowerShell in attacks [pdf] by c0wb0yc0d3r on Thursday May 25, 2017 @10:00AM (#14417328)
Awesome, that is similar to what I do right now.