Skip to content

Commit

Permalink
convert remaining help texts to jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan-Kruse committed Jul 26, 2022
1 parent 85b0624 commit f1cbce3
Show file tree
Hide file tree
Showing 50 changed files with 476 additions and 485 deletions.
49 changes: 13 additions & 36 deletions src/components/Modals/HelpTexts/AZAddSecret/AZAddSecret.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,44 +6,21 @@ import Abuse from './Abuse';
import Opsec from './Opsec';
import References from './References';

const AZAddSecret = ({
sourceName,
sourceType,
targetName,
targetType,
}) => {
const AZAddSecret = ({ sourceName, sourceType, targetName, targetType }) => {
return (
<Tabs defaultActiveKey={1} id='help-tab-container' justified>
<Tab
eventKey={1}
title='Info'
dangerouslySetInnerHTML={General(
sourceName,
sourceType,
targetName,
targetType
)}
/>
<Tab
eventKey={2}
title='Abuse Info'
dangerouslySetInnerHTML={Abuse(
sourceName,
sourceType,
targetName,
targetType
)}
/>
<Tab
eventKey={3}
title='Opsec Considerations'
dangerouslySetInnerHTML={Opsec()}
/>
<Tab
eventKey={4}
title='References'
dangerouslySetInnerHTML={References()}
/>
<Tab eventKey={1} title='Info'>
<General />
</Tab>
<Tab eventKey={2} title='Abuse Info'>
<Abuse />
</Tab>
<Tab eventKey={3} title='Opsec Considerations'>
<Opsec />
</Tab>
<Tab eventKey={4} title='References'>
<References />
</Tab>
</Tabs>
);
};
Expand Down
7 changes: 4 additions & 3 deletions src/components/Modals/HelpTexts/AZAddSecret/Abuse.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const Abuse = (sourceName, sourceType, targetName, targetType) => {
let text = ``;
return { __html: text };
import React from 'react';

const Abuse = () => {
return <></>;
};

export default Abuse;
28 changes: 21 additions & 7 deletions src/components/Modals/HelpTexts/AZAddSecret/General.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
import { groupSpecialFormat} from '../Formatter';
import React from 'react';

const General = (sourceName, sourceType, targetName, targetType) => {
let text = `Azure provides several systems and mechanisms for granting control of securable objects within Azure Active Directory, including tenant-scoped admin roles, object-scoped admin roles, explicit object ownership, and API permissions.
When a principal has been granted "Cloud App Admin" or "App Admin" against the tenant, that principal gains the ability to add new secrets to all Service Principals and App Registrations. Additionally, a principal that has been granted "Cloud App Admin" or "App Admin" against, or explicit ownership of a Service Principal or App Registration gains the ability to add secrets to that particular object.
`;
return { __html: text };
const General = () => {
return (
<>
<p>
Azure provides several systems and mechanisms for granting
control of securable objects within Azure Active Directory,
including tenant-scoped admin roles, object-scoped admin roles,
explicit object ownership, and API permissions.
</p>
<p>
When a principal has been granted "Cloud App Admin" or "App
Admin" against the tenant, that principal gains the ability to
add new secrets to all Service Principals and App Registrations.
Additionally, a principal that has been granted "Cloud App
Admin" or "App Admin" against, or explicit ownership of a
Service Principal or App Registration gains the ability to add
secrets to that particular object.
</p>
</>
);
};

export default General;
5 changes: 3 additions & 2 deletions src/components/Modals/HelpTexts/AZAddSecret/Opsec.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';

const Opsec = () => {
let text = ``;
return { __html: text };
return <></>
};

export default Opsec;
22 changes: 18 additions & 4 deletions src/components/Modals/HelpTexts/AZAddSecret/References.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
import React from 'react';

const References = () => {
let text = `<a href="https://attack.mitre.org/techniques/T1098/">ATT&CK T1098: Account Manipulation</a>
<a href="https://posts.specterops.io/azure-privilege-escalation-via-service-principal-abuse-210ae2be2a5">Andy Robbins - Azure Privilege Escalation via Service Principal Abuse</a>
<a href="https://docs.microsoft.com/en-us/azure/active-directory/roles/assign-roles-different-scopes">Assign Azure AD roles at different scopes</a>`;
return { __html: text };
return (
<>
<a href='https://attack.mitre.org/techniques/T1098/'>
ATT&amp;CK T1098: Account Manipulation
</a>
<br />
<a href='https://posts.specterops.io/azure-privilege-escalation-via-service-principal-abuse-210ae2be2a5'>
Andy Robbins - Azure Privilege Escalation via Service Principal
Abuse
</a>
<br />
<a href='https://docs.microsoft.com/en-us/azure/active-directory/roles/assign-roles-different-scopes'>
Assign Azure AD roles at different scopes
</a>
</>
);
};

export default References;
Original file line number Diff line number Diff line change
Expand Up @@ -14,36 +14,18 @@ const AZAvereContributor = ({
}) => {
return (
<Tabs defaultActiveKey={1} id='help-tab-container' justified>
<Tab
eventKey={1}
title='Info'
dangerouslySetInnerHTML={General(
sourceName,
sourceType,
targetName,
targetType
)}
/>
<Tab
eventKey={2}
title='Abuse Info'
dangerouslySetInnerHTML={Abuse(
sourceName,
sourceType,
targetName,
targetType
)}
/>
<Tab
eventKey={3}
title='Opsec Considerations'
dangerouslySetInnerHTML={Opsec()}
/>
<Tab
eventKey={4}
title='References'
dangerouslySetInnerHTML={References()}
/>
<Tab eventKey={1} title='Info'>
<General />
</Tab>
<Tab eventKey={2} title='Abuse Info'>
<Abuse />
</Tab>
<Tab eventKey={3} title='Opsec Considerations'>
<Opsec />
</Tab>
<Tab eventKey={4} title='References'>
<References />
</Tab>
</Tabs>
);
};
Expand Down
7 changes: 4 additions & 3 deletions src/components/Modals/HelpTexts/AZAvereContributor/Abuse.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const Abuse = (sourceName, sourceType, targetName, targetType) => {
let text = ``;
return { __html: text };
import React from 'react';

const Abuse = () => {
return <></>
};

export default Abuse;
13 changes: 10 additions & 3 deletions src/components/Modals/HelpTexts/AZAvereContributor/General.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
const General = (sourceName, sourceType, targetName, targetType) => {
let text = `Any principal granted the Avere Contributor role, scoped to the affected VM, can reset the built-in administrator password on the VM.`;
return { __html: text };
import React from 'react';

const General = () => {
return (
<p>
Any principal granted the Avere Contributor role, scoped to the
affected VM, can reset the built-in administrator password on the
VM.
</p>
);
};

export default General;
10 changes: 8 additions & 2 deletions src/components/Modals/HelpTexts/AZAvereContributor/Opsec.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import React from 'react';

const Opsec = () => {
let text = `Azure will log each password reset event, including who performed the reset, against which account, and at what date and time.`;
return { __html: text };
return (
<p>
Azure will log each password reset event, including who performed
the reset, against which account, and at what date and time.
</p>
);
};

export default Opsec;
21 changes: 17 additions & 4 deletions src/components/Modals/HelpTexts/AZAvereContributor/References.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
import React from 'react';

const References = () => {
let text = `<a href="https://attack.mitre.org/tactics/TA0008/">ATT&CK T0008: Lateral Movement</a>
<a href="https://attack.mitre.org/techniques/T1021/">ATT&CK T1021: Remote Services</a>
<a href="https://docs.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#avere-contributor">Microsoft Docs - Avere Contributor</a>`;
return { __html: text };
return (
<>
<a href='https://attack.mitre.org/tactics/TA0008/'>
ATT&amp;CK T0008: Lateral Movement
</a>
<br />
<a href='https://attack.mitre.org/techniques/T1021/'>
ATT&amp;CK T1021: Remote Services
</a>
<br />
<a href='https://docs.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#avere-contributor'>
Microsoft Docs - Avere Contributor
</a>
</>
);
};

export default References;
Original file line number Diff line number Diff line change
Expand Up @@ -14,36 +14,18 @@ const AZExecuteCommand = ({
}) => {
return (
<Tabs defaultActiveKey={1} id='help-tab-container' justified>
<Tab
eventKey={1}
title='Info'
dangerouslySetInnerHTML={General(
sourceName,
sourceType,
targetName,
targetType
)}
/>
<Tab
eventKey={2}
title='Abuse Info'
dangerouslySetInnerHTML={Abuse(
sourceName,
sourceType,
targetName,
targetType
)}
/>
<Tab
eventKey={3}
title='Opsec Considerations'
dangerouslySetInnerHTML={Opsec()}
/>
<Tab
eventKey={4}
title='References'
dangerouslySetInnerHTML={References()}
/>
<Tab eventKey={1} title='Info'>
<General />
</Tab>
<Tab eventKey={2} title='Abuse Info'>
<Abuse />
</Tab>
<Tab eventKey={3} title='Opsec Considerations'>
<Opsec />
</Tab>
<Tab eventKey={4} title='References'>
<References />
</Tab>
</Tabs>
);
};
Expand Down
7 changes: 4 additions & 3 deletions src/components/Modals/HelpTexts/AZExecuteCommand/Abuse.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const Abuse = (sourceName, sourceType, targetName, targetType) => {
let text = ``;
return { __html: text };
import React from 'react';

const Abuse = () => {
return <></>;
};

export default Abuse;
7 changes: 3 additions & 4 deletions src/components/Modals/HelpTexts/AZExecuteCommand/General.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { groupSpecialFormat} from '../Formatter';
import React from 'react';

const General = (sourceName, sourceType, targetName, targetType) => {
let text = ``;
return { __html: text };
const General = () => {
return <></>;
};

export default General;
5 changes: 3 additions & 2 deletions src/components/Modals/HelpTexts/AZExecuteCommand/Opsec.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';

const Opsec = () => {
let text = ``;
return { __html: text };
return <></>;
};

export default Opsec;
19 changes: 14 additions & 5 deletions src/components/Modals/HelpTexts/AZExecuteCommand/References.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
import React from 'react';

const References = () => {
let text = `
<a href="https://attack.mitre.org/tactics/TA0002/">MITRE: Execution</a>
<a href="https://blog.netspi.com/attacking-azure-with-custom-script-extensions/">Attacking Azure with custom script extensions</a>`;
return { __html: text };
return (
<>
<a href='https://attack.mitre.org/tactics/TA0002/'>
MITRE: Execution
</a>
<br />
<a href='https://blog.netspi.com/attacking-azure-with-custom-script-extensions/'>
Attacking Azure with custom script extensions
</a>
</>
);
};

export default References;
export default References;
Loading

0 comments on commit f1cbce3

Please sign in to comment.