Soluții

How to fix a Tombstoned Domain Controller

Step 1: Remove the DNS Server Role from the DC

This must be performed first. Otherwise, the DC demotion task (Step 2) fails.

#Open PowerShell as administrator

Uninstall-WindowsFeature -Name DNS

Restart the server to complete the removal of the DNS role.

Step 2: Remove the Global Catalog Role from the DC

If the server is badly broken, you must remove the Global Catalog role from the DC. Otherwise, the DC demotion will also fail.

  1. Open Active Directory Sites and Services via Server Manager (link opens in a new browser tab).
  2. Then, navigate to the DC’s site and expand it, then expand Servers and click the server name. On the details blade, right-click NTDS Settings, and select Properties.
  1. After that, clear the Global Catalog check box, select Yes to the warning message, and finally, select OK.
clear the Global Catalog check box, select Yes to the warning message, and choose OK

Step 3: Demote the Server as a Domain Controller

#1. Save the password to use as local Administrator password. At the cred prompt, enter Administrator as the username and then, the password you want to use as the server's local Administrator password post its demotion as a DC

$password = Get-Credential

#2. Demote the Server as a DC

Uninstall-ADDSDomainController -LocalAdministratorPassword $password.password -Confirm:$false -NoRebootOnCompletion -ForceRemoval -SkipPreChecks

See the results of the commands below:

Save the password to use as local Administrator password. At the cred prompt, enter Administrator as the username and then, the password you want to use as the server's local Administrator password post its demotion as a DC
Uninstall-ADDSDomainController -LocalAdministratorPassword $password.password -Confirm:$false -NoRebootOnCompletion -ForceRemoval -SkipPreChecks

Restart the server to complete the demotion.

Step 4: Perform Metadata Cleanup from the FSMO Role Holder

After demoting the DC, before re-proting it, you must perform a metadata cleanup of the DC using ntdsutil.

Follow the steps below to complete this task.

  1. Determine the FSMO role holder by running the command below from any Domain Controller.
netdom query fsmo
  1. Sign into the DC that holds the FSMO roles and open the command prompt as administrator. Then, run the following ntdsutil commands in the order provided.
#1. Type ntdsutil and press enter. Then, on the ntdsutil prompt, type metadata cleanup and press enter

ntdsutil: metadata cleanup

#2. On the metadata cleanup: prompt, execute the followin commands

metadata cleanup: connections
metadata cleanup: connect to server <domain_fsmo-role-holder>
metadata cleanup: q

#3. Then, on the metadata cleanup: prompt, type select operation target, then press enter key. 

metadata cleanup: select operation target

#4. On the select operation target: prompt, run the following commands in order:

select operation target: list domains
select operation target: select domain <enter number for the domain where the failed DC resides>
select operation target: list sites
select operation target: select site <enter the site number of the failed DC>
select operation target: list servers in site
select operation target: select server <enter number of the server>
select operation target: q

#5. On the metadata cleanup: prompt, execute remove selected server
metadata cleanup: remove selected server
Then, on the Server Remove Confirmation Dialog, confirm that the DC you want to remove is displayed, then select Yes. 
#6. Quit metadata cleanup and ntdsutil by executing the q command in both prompts
On the metadata cleanup: prompt, execute remove selected server
  1. Log on to the FSMO role DC and force replication by running the command below from a command prompt opened as administrator.
repadmin /syncall <domain_fsmo-role-holder> /Aped

Quit the repadmin command by pressing any key.

  1. Then, monitor the progress of the replication by running the command below. Replace the text in bold with the Distinguished Name of the server you’re cleaning its metadata.
repadmin /showobjmeta * "<enter the Distinguished Name of the server here>"

For the avoidance of doubt, the above command must only return parts of the result that says “Directory object not found.” If it rertuns a table, you must wait until the command no longer returns a table.

Step 5: Reinstall the DNS Server Role on the Server

In Step 1, we removed the DNS Server role. Before promoting it to a DC, you must reinstall this role with the following steps:

  1. Sign in to the server as local administrator – enter .\administrator in the username field – and use the password you specified in Step 3 when you demoted the server as a DC.
  2. Execute the command below to reinstall the DNS Server role, including all sub-features and management tools, and restart the server if required.
#Open PowerShell as administrator

Install-WindowsFeature -Name DNS -IncludeAllSubFeature -IncludeManagementTools -Restart
#see the screenshots below for the progress and result of the command
Reinstall the DNS Server Role on the Server 1
Reinstall the DNS Server Role on the Server 2
[mai mult...]

Cum resetezi setarile de retea pe windows folosind CMD

PC-ul manifesta probleme de conectivitate la internet, afiseaza erori Wi-Fi/Ethernet in conditiile in care cablul/cablurile si routerul/restul echipamentelor sunt functionale si configurate corect? Solutia ar putea consta in resetarea setarilor de retea ale PC-ului.

Trebuie mentionat ca aceasta operatiune este realizabila si din Settings > Network & Internet > Advanced network settings > Network reset , iar aceasta optiune, pusa la dispozitie de Microsoft prin intermediul unui buton, functioneaza pentru majoritatea problemelor. Totusi, pentru cine doreste sa faca singur aceasta operatiune, in pasi separati, este posibil prin intermediul Command Prompt-ului:

[mai mult...]

Exemplu de pentesting framework (BlacksmithAI) cu asistenta AI

BlacksmithAI este un framework open-source avansat pentru testarea penetrării, care utilizează mai mulți agenți de inteligență artificială pentru a automatiza evaluările de securitate. Sistemul coordonează agenții specializați pe parcursul întregului ciclu de viață al testării penetrării, de la recunoaștere până la etapa post-exploatare, folosind instrumente profesionale de securitate într-un mediu controlat.

Nota bene si Atenție: !Chiar și în scopuri educationale, NU utilizati în afara scopului confirmat și autorizat in scris de către detinător! Sunt admise fără confirmare sau autorizare doar: testphp.vulnweb.com si https://juice-shop.herokuapp.com/ sau orice presupune hostare locală fără acces în internet.

Caracteristici principale:

  • Arhitectură multi-agent prezintă agenți specializați pentru fiecare etapă a testării de penetrare;
  • Instrumente profesionale au la bază o imagine Docker preconfigurată cu instrumente de securitate standard în industrie;
  • Suport pentru OpenRouter, VLLM și furnizori personalizați;
  • Interfețe web și terminal permite alegerea între o interfață modernă sau interacțiune CLI;
  • Raportarea automatizată generează rapoarte de securitate, însoțite de dovezi;
  • Prezintă instrumente CLI neinteractive concepute pentru execuția agenților AI.

Cazuri de utilizare

  • Evaluări automate de securitate
  • Monitorizare continuă a securității
  • Teste de penetrare în scop educativ
  • Identificarea și validarea vulnerabilităților
  • Cercetare și dezvoltare în domeniul securității

Arhitectură

BlacksmithAI utilizează un sistem multi-agent ierarhic.

Ierarhia agenților:

  • Orchestrator
  • Centru de comandă și control(C2)
  • Gestionează planificarea misiunilor și delegarea sarcinilor
  • Coordonează subagenții și generează rapoarte finale

Subagenți specializați:

  • Agent de recunoaștere: Cartografierea suprafeței de atac și colectarea de informații
  • Agent de scanare/enumerare: Scanare profundă și enumerarea serviciilor
  • Agent de analiză a vulnerabilităților: Cartografierea vulnerabilităților și evaluarea riscurilor
  • Agent de exploatare: Exploatare de tip „proof-of-concept”
  • Agent post-exploatare: Evaluarea impactului și analiza pivot

Fiecare agent are acces la instrumente specifice, adaptate rolului său.

Cerințe preliminare

Cerințe de sistem

  • Sistem de operare: Linux(recomandat), macOS sau Windows cu WSL2
  • Memorie RAM: minimum 4 GB(recomandat 8 GB)
  • Spațiu pe disc: 2 GB+, inclusiv imaginile Docker
  • Docker: versiunea 20.10+ cu Docker Compose
  • Python: versiunea 3.12+ (gestionat prin uv)

Dependențe software

Sunt necesare următoarele instrumente:

Manager de pachete și mediu Python
uv

# Containerizare
Docker și Docker Compose

# Mediu de execuție și instrumente frontend
Node.js 18+ (se recomandă versiunea LTS)
pnpm (manager rapid de pachete JavaScript)

[mai mult...]

Exemplu de configurare agenti pe roluri cu CrewAI

CrewAI este un cadru open-source care permite mai multor agenți de inteligență artificială să colaboreze pentru a îndeplini sarcini complexe. Fiecare agent are un rol specific, iar aceștia colaborează pentru a duce la bun sfârșit sarcina în mod eficient.

Imaginați-vă un grup de oameni care organizează o petrecere: o persoană se ocupă de planificare, alta de mâncare și băuturi, iar o altă persoană de decorațiuni. CrewAI face același lucru, dar cu agenți AI. Poate fi utilizat în planificarea evenimentelor, crearea de conținut, dezvoltarea de software și asistența pentru clienți, pentru a spori eficiența sarcinilor.

CrewAI utilizează funcții precum retenția memoriei și conștientizarea contextului, ceea ce asigură executarea fără probleme a sarcinilor și luarea deciziilor în contextul potrivit. Poate fi utilizat în domenii precum planificarea evenimentelor, generarea de conținut, cercetarea și dezvoltarea de software.

Cerințe preliminare pentru CrewAI:

Python: versiunea >=3.10 și <3.14 (recomandat: 3.12.7 pentru macOS).
Ca si manager de pachete se recomandă uv(manager de pachete ultra-rapid); pip este o alternativă.
Sisteme de operare acceptate Windows, macOS și Linux.
Pentru integrarea LLM este necesară o cheie API OpenAI(sau o altă cheie de la un furnizor LLM).
Instrumente opționale: Pentru funcții avansate, instalați dependențe suplimentare precum tiktoken, chromadb sau pandas.
Compatibilitate cu Windows 11 și macOS:

  • Windows 11. Suport complet. Utilizați PowerShell cu uv sau pip. Asigurați-vă că Visual Studio Build Tools este instalat pentru dependențele de compilare C++.
  • macOS. Suport complet. Utilizați pyenv pentru a instala o versiune Python compatibilă(de ex., 3.12.7) cu suport pentru framework prin comanda env PYTHON_CONFIGURE_OPTS=”–enable-framework” pyenv install 3.12.7.
[mai mult...]