Skip to content

Instantly share code, notes, and snippets.

View cdimascio's full-sized avatar
👋
🤔👨‍💻🚀

Carmine DiMascio cdimascio

👋
🤔👨‍💻🚀
View GitHub Profile
@eladchen
eladchen / CustomApolloServer.ts
Created July 10, 2020 07:06
An example of how to access apollo context in formatError() method.
import { Request, Response } from "express";
import { GraphQLError, GraphQLFormattedError } from "graphql";
import { GraphQLServerOptions } from "apollo-server-core/src/graphqlOptions";
import { ApolloServer, ApolloServerExpressConfig as C } from "apollo-server-express";
export type FormatError = (graphQLError: GraphQLError, context: unknown) => GraphQLFormattedError;
export type ApolloServerExpressConfig = Omit<C, "formatError"> & {
formatError?: FormatError;
};
# Execute onto container
aws ecs execute-command \
--region us-west-2 \
--cluster PeprServiceStackDev-EcsDefaultClusterMnL3mNNYNVpc18E0451A-dn35gqXUjrhi \
--task e575d819e2e04dac99387d22a5219576 \
--command /bin/bash --interactive
# Run task with execute enable
aws ecs run-task \
--cluster PeprServiceStackDev-EcsDefaultClusterMnL3mNNYNVpc18E0451A-dn35gqXUjrhi \
@Neo23x0
Neo23x0 / log4j_rce_detection.md
Last active January 28, 2024 08:19
Log4j RCE CVE-2021-44228 Exploitation Detection

log4j RCE Exploitation Detection

You can use these commands and rules to search for exploitation attempts against log4j RCE vulnerability CVE-2021-44228

Grep / Zgrep

This command searches for exploitation attempts in uncompressed files in folder /var/log and all sub folders

sudo egrep -I -i -r '\$(\{|%7B)jndi:(ldap[s]?|rmi|dns|nis|iiop|corba|nds|http):/[^\n]+' /var/log