Created
April 15, 2025 18:26
-
-
Save RajChowdhury240/96287c3d5eb89d6294a3a8ff3e7ff62a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use client' | |
import React from "react" | |
import { Sparkles } from "lucide-react" | |
import { motion } from "framer-motion" | |
const Card = ({ children }: { children: React.ReactNode }) => ( | |
<div className="bg-white/5 backdrop-blur-xl border border-white/10 rounded-2xl shadow-2xl"> | |
{children} | |
</div> | |
) | |
const CardContent = ({ children }: { children: React.ReactNode }) => ( | |
<div className="p-6">{children}</div> | |
) | |
const Tabs = ({ children }: { children: React.ReactNode }) => <div>{children}</div> | |
const TabsList = ({ children }: { children: React.ReactNode }) => ( | |
<div className="flex flex-wrap justify-center gap-4 bg-zinc-800/40 backdrop-blur-md border border-zinc-700 p-4 rounded-2xl shadow-lg mb-8"> | |
{children} | |
</div> | |
) | |
const TabsTrigger = ({ | |
value, | |
selected, | |
onClick, | |
}: { | |
value: string | |
selected: boolean | |
onClick: () => void | |
}) => ( | |
<button | |
onClick={onClick} | |
className={`text-lg px-6 py-2 rounded-xl font-semibold transition-all ${ | |
selected | |
? "bg-gradient-to-r from-purple-500 to-pink-500 text-white" | |
: "hover:bg-zinc-700/40 text-gray-300" | |
}`} | |
> | |
{value} | |
</button> | |
) | |
const TabsContent = ({ | |
value, | |
selected, | |
children, | |
}: { | |
value: string | |
selected: boolean | |
children: React.ReactNode | |
}) => (selected ? <div>{children}</div> : null) | |
const labData: Record< | |
string, | |
{ name: string; description: string; vulns: string; tools: string }[] | |
> = { | |
HackTheBox: [ | |
{ | |
name: "Forest", | |
description: "Beginner-friendly AD machine covering Kerberoasting & LAPS enumeration.", | |
vulns: "Kerberoasting, LAPS, Misconfigured ACLs", | |
tools: "Impacket, PowerView, Rubeus", | |
}, | |
{ | |
name: "Active", | |
description: "Focuses on SMB enumeration and Kerberoasting techniques.", | |
vulns: "SMB, Kerberoasting", | |
tools: "crackmapexec, rpcclient, Rubeus", | |
}, | |
], | |
TryHackMe: [ | |
{ | |
name: "Attacktive Directory", | |
description: "Intro to AD attacks - covers AS-REP Roasting and BloodHound basics.", | |
vulns: "AS-REP Roasting, weak passwords", | |
tools: "BloodHound, hashcat, GetNPUsers.py", | |
}, | |
{ | |
name: "Blue", | |
description: "EternalBlue exploit in AD context.", | |
vulns: "MS17-010 (EternalBlue)", | |
tools: "nmap, metasploit", | |
}, | |
], | |
VulnLab: [ | |
{ | |
name: "Windows 1", | |
description: "Covers enumeration of LDAP and exploiting weak DACLs.", | |
vulns: "Weak DACLs, LDAP enumeration", | |
tools: "ldapsearch, PowerView", | |
}, | |
{ | |
name: "Domain Controller 2", | |
description: "Intermediate lab with unconstrained delegation and ADCS abuse.", | |
vulns: "Unconstrained Delegation, ADCS misconfig", | |
tools: "Rubeus, Certipy, mimikatz", | |
}, | |
], | |
} | |
const LabTable = ({ labs }: { labs: typeof labData.HackTheBox }) => ( | |
<motion.div | |
initial={{ x: -100, opacity: 0 }} | |
animate={{ x: 0, opacity: 1 }} | |
transition={{ type: "spring", stiffness: 60 }} | |
> | |
<div className="overflow-auto w-full"> | |
<table className="w-full text-sm text-left border-collapse"> | |
<thead className="bg-gradient-to-r from-sky-800 to-cyan-800 text-white"> | |
<tr> | |
<th className="p-3 text-cyan-300 text-lg">🖥️ Machine</th> | |
<th className="p-3 text-emerald-300 text-lg">📜 Description</th> | |
<th className="p-3 text-yellow-300 text-lg">🛠️ Vulnerabilities</th> | |
<th className="p-3 text-pink-300 text-lg">🧰 Tools Used</th> | |
</tr> | |
</thead> | |
<tbody> | |
{labs.map((lab, i) => ( | |
<motion.tr | |
key={i} | |
initial={{ opacity: 0, x: 50 }} | |
animate={{ opacity: 1, x: 0 }} | |
transition={{ delay: i * 0.1 }} | |
className="hover:bg-zinc-800/50 border-b border-zinc-700 transition" | |
> | |
<td className="p-3 font-semibold text-cyan-400">{lab.name}</td> | |
<td className="p-3 text-emerald-200 italic">{lab.description}</td> | |
<td className="p-3 text-yellow-300">{lab.vulns}</td> | |
<td className="p-3 text-pink-400">{lab.tools}</td> | |
</motion.tr> | |
))} | |
</tbody> | |
</table> | |
</div> | |
</motion.div> | |
) | |
export default function ADPentestingLabs() { | |
const [selectedTab, setSelectedTab] = React.useState("HackTheBox") | |
return ( | |
<main | |
className="min-h-screen bg-gradient-to-br from-black via-zinc-900 to-gray-900 text-white p-10 px-6 sm:px-16" | |
style={{ fontFamily: 'FiraCode Nerd Font, Fira Code, monospace' }} | |
> | |
<motion.h1 | |
initial={{ opacity: 0, y: -30 }} | |
animate={{ opacity: 1, y: 0 }} | |
transition={{ duration: 1 }} | |
className="text-6xl text-center font-bold tracking-wide bg-gradient-to-r from-emerald-400 to-blue-500 bg-clip-text text-transparent mb-10 animate-pulse" | |
> | |
<Sparkles className="inline-block text-yellow-400 mr-2 animate-pulse" /> AD Pentesting Labs | |
</motion.h1> | |
<Tabs> | |
<TabsList> | |
{Object.keys(labData).map((platform) => ( | |
<TabsTrigger | |
key={platform} | |
value={platform} | |
selected={selectedTab === platform} | |
onClick={() => setSelectedTab(platform)} | |
/> | |
))} | |
</TabsList> | |
{Object.entries(labData).map(([platform, labs]) => ( | |
<TabsContent key={platform} value={platform} selected={selectedTab === platform}> | |
<motion.div | |
initial={{ x: 100, opacity: 0 }} | |
animate={{ x: 0, opacity: 1 }} | |
transition={{ duration: 0.6 }} | |
> | |
<Card> | |
<CardContent> | |
<LabTable labs={labs} /> | |
</CardContent> | |
</Card> | |
</motion.div> | |
</TabsContent> | |
))} | |
</Tabs> | |
</main> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment