#hack100days: day 30d : Pretty busy day, putting pressure on hacking for myself. Looked into "coding"--Red Teamer have to code(?). I'm down with bash and fairly comfortable with python and PowerShell. After looking at CobaltStrike, I can kind of connect the dots. So, nim, .Net/C#, go, rust? I'm not diving into c/c++, looked at K&R ages ago and it didn't take. Got a nudge to the .Net/C# direction, it *is* the "guts" of PowerShell and Windows. #redteam #coding
#hack100days : day 31 : Forgot to post yesterday. Pretty busy day. Got caught up on @thegrugq newsletters--I was a couple of days behind. Also read a recent Bellingcat newsletter and article. Octosuite looks interesting: https://www.bellingcat.com/resources/2023/01/20/octosuite-a-new-tool-to-conduct-open-source-investigations-on-github/ Might be useful for internal appsec and dfir teams, as well. #infosec
Octosuite: A New Tool to Conduct Open Source Investigations on GitHub - bellingcat

Octosuite is an open source tool that can help researchers quickly gather data on users, organisations and repositories on GitHub

bellingcat
#hack100days : day 32 : Moved C2 server vm from old hacktop to new hacktop. Updated the vm. Went looking for resources for aggressor scripts and C2 profiles. Near and intermediate planned exercises will use https, but the use of DNS is still looking too much like a dark art. I've got the pieces I can put together to do it, but I'm still fuzzy on how to put them together. It isn't urgent, so I'll block a couple of days down the road to lab it up. #lab #redteam #infosec
#hack100days : day 33 : Took it easy today. Looked at some open-source projects from fortynorthsecurity.com Came across them looking for CobaltStrike info. PersistAssist (https://github.com/FortyNorthSecurity/PersistAssist) looks interesting. It's written in C#, so I took some time to look through the code to see if it makes any kind of sense to me. Maybe tinkering with that would be a good way to start getting acquainted. I think I want to play around with Egress-Assess (https://github.com/FortyNorthSecurity/Egress-Assess) a bit, as well. #redteam #infosec
GitHub - FortyNorthSecurity/PersistAssist: Fully modular persistence framework

Fully modular persistence framework. Contribute to FortyNorthSecurity/PersistAssist development by creating an account on GitHub.

GitHub
GitHub - initstring/cloud_enum: Multi-cloud OSINT tool. Enumerate public resources in AWS, Azure, and Google Cloud.

Multi-cloud OSINT tool. Enumerate public resources in AWS, Azure, and Google Cloud. - GitHub - initstring/cloud_enum: Multi-cloud OSINT tool. Enumerate public resources in AWS, Azure, and Google Cl...

GitHub
#hack100days : day 35 : Worked on the hacktop lab. Created a "Private" network for the targets to reside in. Build an OPNSense virtual firewall to govern access between the "External" network--where the attacking hosts are going to reside--and the target network. ...maybe I should rename them. Skimmed the DNS section of the OPNSense manual. Maybe DNSmask let's me try out DNS C2? Next step is to move my target vm from the old hacktop to the new and test fw config. #labitup #redteam #infosec
#hack100days : day 36 : More work on lab infra. Followed this cookbook on dockerizing CobaltStrike: https://ezrabuckingham.com/blog/containerizing-red-team-infra/ Worked! Docker networking is still a little weird for me, so I need to figure out how the beacons are going to get there. The client piece worked, so halfway there. Still need to test the fw--it seems to be grabbing my laptop's IP, which creates network weirdness. May bail and use something I'm more familiar with. #redteam #labitup #infosec
DevAttackOps: Containerizing Red Team Infrastructure (Part 1)

Containerizing Attack and C2 infrastructure

Ezra Buckingham
#hack100days : day 37 (delayed report) : More work on the lab. Migrated target vm from old hacktop to new. Poked at virtual firewall some more to get the lab network sorted. #labitup #infosec
#hack100days : day 38 : Not much direct hacking today. Read a couple of articles on Azure/M365 hacking. A family friend is making a career transition to software development. Their code made it into GitHub, so I looked through it to practice code-review skills-ish. #infosec
#hack100days : day 39 : *Now* I have a working virtual gateway in my virtual lab. Ubuntu w/iptables rules, ftw. Next, write a "shields up/shields down" script governing rules for the inside LANs. Time to grind on payloads! Ah, and it's beer o'clock. #redteam #labitup #infosec
#hack100days : day 40 : Took a crack at today #HtB new release, interface. Web app, natch. Started my process and used the usual tools. Didn't get very far at all. Based on tech found, did some research and found an article about one of the components. Calling it a day though and will take a look tomorrow. #ctf #infosec
#hack100days : day 41 : Tinkered around with Docker some more. Experimenting with building an image w/enumeration tools. Getting rust onto the system for feroxbuster has me a bit stymied. #infosec #enumeration
#hack100days : day 42 : Listened in on N00bie Tuesday by Alh4zr3d@twitter. Someone mentioned Zero Point Security has a "Rust for n00bs" [[https://training.zeropointsecurity.co.uk/courses/rust-for-n00bs]] class. I'm a n00b, so ran full-tilt into that rabbit hole. An inexpensive introduction. Rust has some interesting quirks. Tried it out on MacOS. Next up, Windows. #InfoSec #LearnToCode #Rust
Rust for n00bs

An introduction to Rust fundamentals.

Zero-Point Security
#hack100days : days 43 & 44 : Forgot to post yesterday. Modified a BadUSB/Rubber Ducky script to run PowerShell and feed a file. Helping out a #BlueTeam analyst w/that one. Helped myself for a future #RedTeam exercise. Also spend some time w/'hello, world', Rust, and Windows OS. Baby steps, time will tell w/that one. Tried out a different format for attack trees, but haven't tried it out on anyone yet. #InfoSec #LabItUp #CamelCaseTags4OnScreenReaders
#hack100days : day 45 : Read about #rust in _Rust Programming Language, 2nd Ed._
#hack100days : day 46 : Read more rust. (Today was a travel day, so not so much hands on keyboard today)
#hack100days : day 47 : Read a bit more about rust. Started in on Chapter 4 of The Rust Programming Language. Still not grokking why there is a mutable/immutable setting for variables. Seems there's no difference between an immutable variable and a constant.
#hack100days : day 48 : even more #rust. Read some on chapter 5. Watched a couple of videos by @0atman on his No Boilerplate YouTube channel. Poked around on crates.io a bit and looked at some code.
#hack100days: day 50 : Grrr. Yesterday was actually day 49. Anyways. Signed up for zeropointsecurity.co.uk Certified Red Team Operator course. LFG! #RedTeam #infosec #PrimumNonNocere
#hack100days: day 51 : Spent some time going through CRTO. First two sections down. Spun up a new kali box to play around with some of the tooling covered in recon section. Reckon I'll do a once through the material before getting lab time and going after the lab exercises. #RedTeam #infosec
#hack100days: day 52 : Spent more time on CRTO, got through several sections. Looked at some of the tooling called out. If something tried to talk to lsass, there's a Windows Event 4656 generated. These events don't make it into Windows Defender Advanced Threat Hunting. Some KQL that *might* help a little bit: 'DeviceProcessEvents | where (FileName != "lsass.exe" and ProcessCommandLine has "lsass")' This could find where someone's trying to tinker with it from the command line. (Since lsass does get started in the normal day-to-day of things, filter out it itself being the running process, look for things trying to operate on it.) #redteam #blueteam #GetSmart
#hack100days : day 53 : Thin on the hacking today. Listened to risky.biz and got caught up on @thegrugq newsletters.
#hack100days : day 54 : Completed credential theft section for #CRTO, got some good ideas for #ThreatHuntThursday for log events and access patterns I hadn't though of before. #redteam #GetSmart
#hack100days : day 55 : Completed three more #CRTO sections, maybe about a 1/3 of the way through--so far, mostly review. Added another item to the #ThreatHuntThursday list. #redteam #GetSmart
#hack100days : day 57 : Finished the next section of CRTO. Juuust shy of half-way. Checked out a couple of presos at the Antisyphon "Most Offensive Con That Ever Offensived" on-line conference. I like the personalities and some of the dialogue in the #RedTeam panel discussion at the beginning. However, it was a little too "let's be controversial for the sake of controversy" for my taste. (I hope to get a pizza delivered to me, one day.)
#hack100days : day 58 : Spent some time poking around log sources. Checked for logging and events matching oppsec warnings from CRTO. Created and tuned some queries for Defender ATH. There's signal in there about Registry run key creation and scheduled task creation. Good to know for #redteam and #blueteam!
#hack100days : day 59 : Two more sections of CRTO down. Tuned the registry run key search in Defender ATH. Noisy bugger, going to take some work to sort out "normal". Seems like a good place to hide for long-haul persistence. #RedTeam #BlueTeam
#hack100days : day 60 : Another section of CRTO done. Learned more about MSFT's Data Protection API, which was new to me. Otherwise, it was light today. #GetSmart
#hack100days : day 61 : Another light day. Read articles and another chapter in _Rust Programming Language_--was reminded to keep up on that via link from a @thegrugq newsletter to @buttplug.io (@twitter) thread, leading to @m_ou_se@twitter presence talking about her book _Rust Atomics and Locks_ (which is available at https://marabos.nl/atomics/, so I have some more reading and coding to do... #GetSmart #Rust
Rust Atomics and Locks by Mara Bos

Low-level Concurrency in Practice. This practical book helps Rust programmers of all levels gain a clear understanding of low-level concurrency. You'll learn everything about atomics and …

#hack100days : day 62 : Wasn't up for it yesterday, took a sick day. Did some poking around at a recent CVE. Not going to share which one at this time. Led to another thread, though. Something that could lead to finding weird... Look for instances of the Windows process WerFault.exe starting. What was the parent process? What was the user id for the process? You may find something that is well broken and needs fixing--that cleans up log files--or something that needs further research. #ThreatHunting #BlueTeam
#hack100days : day 63 : Lots of context switching today, articles, newsletters, and such. Going to unplug and finish another chapter of _Rust_Programming_Language_. #GetSmart
#hack100days : day 64 : read another chapter of _Rust_Programming_… Site visit today, learning and relearning about processes and tech used to make the firm money. Thinking hard about attack paths and drafting possibles exercises. #redteam #getsmart
#hack100days : day 65 : Kept chipping away at _Rust_Programming. Took at look at Defender and Advanced Threat. Created a query for finding admin users modifying registry run keys. I'm a fan of the 'project' command to grab only the columns I care about. #GetSmart
#hack100days : day 66 : Took a crack at #HackTheBox new release, Inject. I've gotten rusty.
#hack100days : day 67 : Read another chapter #rust. This one hurt my brain and will need to be revisited. #getsmart
#hack100days : day 68 : Watched some #rust videos by @valhalla_dev Watched him go over some chapters out of the Rust Book and a couple of videos on malware dev. #redteam #GetSmart
#hack100days : day 69 : Forgot to post last night. Watched @alh4zr3d @[email protected] "Newbie Tuesday" stream. Biggest take-away was older Logitech wireless devices speak wifi. So, "BadUSB"/RubberDucky is in-play during physical tests: https://github.com/insecurityofthings/jackit/tree/master/jackit #redteam
jackit/jackit at master · insecurityofthings/jackit

JackIt - Exploit Code for Mousejack. Contribute to insecurityofthings/jackit development by creating an account on GitHub.

GitHub
#hack100days : day 70 : Today was a day of json and powershell. Took a different approach than I usually do. Started with laying out a json schema for all the data elements I want. Then backed into into functions and code. I've coded in ksh and bash for so long, I'm more used to doing the functions first. This is more interesting, because now I hunt for LOLBAS to get the data. #redteam #LolBas
#hack100days: day 71 : Moar #powershell! Sorted a couple of functions. Figured out how to create an object to store the data in and to spit it out as a json "blob". Need to focus on getting the first MVP done and worry about edge-cases later.
#hack100days : day 72 : CRTO today. Eighty percent through first pass. Goal is to get through it over the weekend and start hitting the lab next week. #RedTeam #CRTO #PrimumNonNocere
#hack100days: day 72 : (yesterday I watched soccer.) Finished up the CRTO modules. Time to sign up for the lab and go through it again. #RedTeam #CRTO #PrimumNonNocere
#hack100days: day 74 : (D'oh. Yesterday was actually day 73.) Restarted the CRTO modules. Signed up for the lab. Working through the material and building out notes for the exam. #RedTeam #CRTO #GetSmart
#hack100days: day 75 : Yesterday and today were vacation days. Got a new MacBook yesterday, so part of yesterday and today was setting it up. Giving UTM a shot. Spun up a MacOS vm and a Kali vm. The MacOS locks up now and again, so that's no bueno. I'd like that to be be my ctf attacking host. Off to read another chapter on Rust before sleep and back to work tomorrow. Tomorrow shall be some hunting, PowerShell, and time on CRTO lab.
#hack100days: day 76 : In baseball, bat .333 and you're in the hall of fame. Got some #PowerShell done. My comfort with it is increasing. ChatGPT is working well as a "debug buddy". Hunting will wait until tomorrow, along w/CRTO. #AmCoding
#hack100days : day 77 : Pollen season, rainy day, and coding hang-over triple-whammy. Got caught up on @thegrugq newsletters, had a bourbon, and I'm off to read another chapter on #rust.
#hack100days : day 78 : Worked on CRTO. Spent some time in the lab. Got some results I expected. Got some I didn't. Fleshed out notes. #GetSmart #CRTO #PrimumNonNocere
#hack100days : day 79 : More CRTO. Read a bit about C2 profiles for v4 of CS: https://infosecwriteups.com/red-team-cobalt-strike-4-0-malleable-c2-profile-guideline-eb3eeb219a7c No time in the lab, which is lame. #GetSmart #CRTO #PimumNonNocere
[RedTeam] Cobalt Strike 4.0+ Malleable C2 Profile Guideline

We are now in Cobalt Strike 4.0+ era. As we are using Cobalt Strike as command and control (“C2”) server more and more, customizing your malleable C2 profile is becoming imperative to disguise your…

InfoSec Write-ups
#hack100days : day 80 : Fell off the wagon for a couple of days. Then a post (https://cyberplace.social/@GossiTheDog/110100144318003862) from @GossiTheDog crossed my feeds. #ThreatHuntThursday is on. Did some digging in Defender ATH and it looks like some linux commands get logged in Defender--I searched for sudo. The install will show up as a wsl.exe command with the image passed as a parameter. So, it looks like there are some detective controls available if you weren't expecting the user population to be utilizing WSL. Gonna poke at it some more tomorrow.
Kevin Beaumont (@[email protected])

Cool find by @[email protected] - if you isolate an asset in MDE (Microsoft Defender), Windows Subsystem for Linux still allows all network traffic (including internally!). So if you're a threat actor, just install WSL, setup SSH or some such and persist access post isolation. I suspect MS probably need to revisit this one as the attack surface looks rich and unconsidered. E.g. network connections in WSL aren't even logged by Defender. https://sec1.dk/blog.html

Cyberplace