Skip to content

Commit

Permalink
Basic renderer working
Browse files Browse the repository at this point in the history
  • Loading branch information
moloch-- committed Dec 15, 2023
1 parent 1a280c3 commit 84c4832
Show file tree
Hide file tree
Showing 5 changed files with 165 additions and 39 deletions.
41 changes: 41 additions & 0 deletions docs/sliver-docs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/sliver-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"remark-gfm": "^4.0.0"
},
"devDependencies": {
"@tailwindcss/typography": "^0.5.10",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
Expand Down
65 changes: 48 additions & 17 deletions docs/sliver-docs/pages/docs/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
import CodeViewer, { CodeSchema } from "@/components/code";
import {
Card,
CardBody,
CardHeader,
Divider,
Listbox,
ListboxItem,
} from "@nextui-org/react";
import { useQuery } from "@tanstack/react-query";
import { NextPage } from "next";
import React from "react";
import Markdown from "react-markdown";
import remarkGfm from "remark-gfm";

type Doc = {
name: string;
Expand All @@ -21,10 +30,12 @@ const DocsIndexPage: NextPage = () => {
},
});

const [name, setName] = React.useState(docs?.docs[0].name || "");
const [markdown, setMarkdown] = React.useState(docs?.docs[0].content || "");

React.useEffect(() => {
if (docs) {
setName(docs.docs[0].name);
setMarkdown(docs.docs[0].content);
}
}, [docs]);
Expand All @@ -35,24 +46,44 @@ const DocsIndexPage: NextPage = () => {

return (
<div className="grid grid-cols-12">
<div className="col-span-1"></div>
<div className="col-span-10">
<h1>Docs Index</h1>
<div>
<CodeViewer
className="min-h-[150px]"
script={
{
name: "",
script_type: "plaintext",
source_code: "asf",
} as CodeSchema
}
/>
<div className="col-span-2 mt-6 ml-4">
<div className="flex flex-row justify-center text-lg mb-2 gap-2">
Sliver Docs
</div>
<div className="mt-2">
<Listbox
aria-label="Toolbox Menu"
className="p-0 gap-0 divide-y divide-default-300/50 dark:divide-default-100/80 bg-content1 overflow-visible shadow-small rounded-medium"
itemClasses={{
base: "px-3 first:rounded-t-medium last:rounded-b-medium rounded-none gap-3 h-12 data-[hover=true]:bg-default-100/80",
}}
>
{docs.docs.map((doc) => (
<ListboxItem
key={doc.name}
value={doc.name}
onClick={() => {
setName(doc.name);
setMarkdown(doc.content);
}}
>
{doc.name}
</ListboxItem>
))}
</Listbox>
</div>
<div></div>
</div>
<div className="col-span-1"></div>
<div className="col-span-10">
<Card className="mt-4 ml-4 mr-4 mb-4">
<CardHeader>
<span className="text-3xl">{name}</span>
</CardHeader>
<Divider />
<CardBody className="prose prose-slate">
<Markdown remarkPlugins={[remarkGfm]}>{markdown}</Markdown>
</CardBody>
</Card>
</div>
</div>
);
};
Expand Down
49 changes: 49 additions & 0 deletions docs/sliver-docs/pages/docs/md/Armory.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
The armory is the Sliver Alias and Extension package manager (introduced in Sliver v1.5), it allows you to automatically install various 3rd party tools such as BOFs and .NET tooling.

The armory downloads packages from `github.com` and `api.github.com` so you'll need an internet connection in order for the command to work. The command does support proxies (see `--help`) and after an alias or extension is installed an internet connection is not required to execute the alias/extension.

Aliases and extensions are installed on the "sliver client"-side, and thus are not shared among operators in [multiplayer mode](https://github.com/BishopFox/sliver/wiki/Multiplayer-Mode).

As of v1.5.14 you can also use `armory install all` to install _everything_ if you really want to.

## The Official Armory

The official armory ships with Sliver binaries and is included by default in the `Makefile` when compiling from source. You can interact with the Armory using the `armory` command. Packages installed from the official armory are compiled and cryptographically signed by the Sliver authors. While we make a best effort to review 3rd party code, you are responsible for reviewing and understanding any 3rd party code before using it. Source code for any alias or extension can be found under the [Sliver Armory GitHub](https://github.com/sliverarmory) organization.

#### Installing Packages

List available packages by running the `armory` command without arguments, packages are installed using the package's command name:

```
sliver > armory install rubeus
[*] Installing alias 'Rubeus' (v0.0.21) ... done!
sliver > rubeus -h
[Rubeus] Rubeus is a C# tool set for raw Kerberos interaction and abuses.
...
```

#### Updating Packages

You can update all installed aliases and extensions by running `armory update` command.

```
sliver > armory update
[*] All aliases up to date!
[*] 1 extension(s) out of date: coff-loader
[*] Installing extension 'coff-loader' (v1.0.10) ... done!
```

#### Removing Packages

You remove packages installed from the `armory` using the `aliases rm` and `extensions rm` commands depending on if the package is an alias or an extension. You can list installed aliases and extensions by running `aliases` and `extensions` respectfully.

Installed alias and extension files are stored in `~/.sliver-client/` by default if you want to manually remove a package simply delete its corresponding directory and restart the client.

## Private Armories

Sliver has experimental support for self-hosted private armories, but I've not gotten around to testing & writing the documentation for these, so you'll have to read thru the source code to figure out how they work for now. I'll eventually update this documentation and release a reference implementation. If you do play around with this, just know the design is subject to change before becoming a real feature.
48 changes: 26 additions & 22 deletions docs/sliver-docs/tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,35 @@ const config: Config = {
],
theme: {
extend: {
backgroundImage: {
'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))',
'gradient-conic':
'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))',
},
typography: {
DEFAULT: {
css: {
maxWidth: '100ch', // add required value here
}
}
}
},
},
darkMode: "class",
plugins: [nextui({
prefix: "nextui", // prefix for themes variables
addCommonColors: false, // override common colors (e.g. "blue", "green", "pink").
defaultTheme: "light", // default theme from the themes object
defaultExtendTheme: "light", // default theme to extend on custom themes
layout: {}, // common layout tokens (applied to all themes)
themes: {
light: {
layout: {}, // light theme layout tokens
colors: {}, // light theme colors
},
dark: {
layout: {}, // dark theme layout tokens
colors: {}, // dark theme colors
plugins: [
require('@tailwindcss/typography'),
nextui({
prefix: "nextui", // prefix for themes variables
addCommonColors: false, // override common colors (e.g. "blue", "green", "pink").
defaultTheme: "light", // default theme from the themes object
defaultExtendTheme: "light", // default theme to extend on custom themes
layout: {}, // common layout tokens (applied to all themes)
themes: {
light: {
layout: {}, // light theme layout tokens
colors: {}, // light theme colors
},
dark: {
layout: {}, // dark theme layout tokens
colors: {}, // dark theme colors
},
// ... custom themes
},
// ... custom themes
},
}),],
}),],
}
export default config

0 comments on commit 84c4832

Please sign in to comment.