Skip to content

Instantly share code, notes, and snippets.

View mkarg's full-sized avatar
🤘
Heavy Metal!

Markus KARG mkarg

🤘
Heavy Metal!
View GitHub Profile
@mkarg
mkarg / 20211210-TLP-WHITE_LOG4J.md
Last active January 4, 2022 07:41 — forked from SwitHak/20211210-TLP-WHITE_LOG4J.md
BlueTeam CheatSheet * Log4Shell* | Last updated: 2021-12-20 2238 UTC

Security Advisories / Bulletins / vendors Responses linked to Log4Shell (CVE-2021-44228)

Errors, typos, something to say ?

  • If you want to add a link, comment or send it to me
  • Feel free to report any mistake directly below in the comment or in DM on Twitter @SwitHak

Other great resources

  • Royce Williams list sorted by vendors responses Royce List
  • Very detailed list NCSC-NL
  • The list maintained by U.S. Cybersecurity and Infrastructure Security Agency: CISA List
@mkarg
mkarg / Sandbox.java
Last active January 27, 2021 15:31
Foreign Linker API (JDK 16 Incubator)
/*
* Demonstration of the Foreign Linker API (JDK 16 Incubator)
*
* The following code shows a message box using Win32 API with caption and text taken from CLI arguments 0 and 1.
*
* Incubator Warning: To compile this code, write a module-info.java file containing `requires jdk.incubator.foreign`.
*
* Incubator Warning: To execute this code, use `--add-modules jdk.incubator.foreign -Dforeign.restricted=permit`.
*/
@mkarg
mkarg / SubcommandsPoC.java
Created October 29, 2019 06:09
JCommander subcommand PoC
public class CLI {
@Parameter(names = { "-h", "--help" }, help = true)
private boolean help;
public static void main(final String[] args) {
final Builder builder = JCommander.newBuilder().addObject(new CLI());
final Optional<Application> application = StreamSupport.stream(ServiceLoader.load(Application.class).spliterator(), false).findFirst();
application.map(Application::programName).ifPresent(builder::programName);
application.map(Application::environmentVariable).ifPresent(varName -> builder.defaultProvider(new EnvironmentVariableDefaultProvider(varName, "-")));
@mkarg
mkarg / MinimumSeBootstrapExample.java
Last active May 29, 2018 14:17
Minimal Example for JAX-RS Bootstrapping on Java SE 8
/*
* Copyright (c) 2018 Markus KARG. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the
* Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
@mkarg
mkarg / gist:0da7f7dce8d9025511bb
Last active August 29, 2015 14:23
proxy7test
import java.time.Duration;
import java.util.Optional;
import java.lang.reflect.*;
public class Jre7Test {
public static interface I7 {
public void say(String greeting);
}
public static interface I8 extends I7 {
@mkarg
mkarg / ant-ditaot-macro.xml
Created May 11, 2012 09:15
Applying multiple .ditaval filters on the same .ditamap (automatically, using ANT)
<?xml version="1.0" encoding="UTF-8" ?>
<!--
To be published under the same terms as DITA-OT.
This script allows to execute DITA-OT upon a set
of automatically found .ditaval files, e. g. to
build multiple editions of the same .ditamap
project.
To use this script in ANT, do the following: