Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
com.github.andrasbeni:giftwrap-parent
A Dagger 2 inspired wrapper generator library
giftwrap generates decorator classes at compile-time
@Retention(RetentionPolicy.SOURCE)
@Target(ElementType.METHOD)
@InterceptedBy(LoggerInterceptor.class)
public @interface Logged {
LogLevel value() default LogLevel.DEBUG;
}
public class LoggerInterceptor implements Interceptor<Logged> {
private static final Logger logger = Logger.getLogger("entrylogger");
@Override
public Object intercept(Interception<Logged> interception) throws Exception {
Level level = interception.getAnnotation().value().julLevel();
logger.log(level, "Entering method " + interception.getMethodName());
return interception.proceed();
}
}
@GiftWrap
public class Whatever {
@Logged(LogLevel.DEBUG)
@Transactional
public String doWhatever(String result) throws IOException {
return result;
}
}
Whatever object = new WhateverIntercepted(
contructor, arguments, ofWhatever,
new LoggerInterceptor(),
new TransactionInterceptor());
c.g.a.g.example.Whatever.doWhatever(Whatever.java:20)
c.g.a.g.example.WhateverIntercepted.access$0(WhateverIntercepted.java:1)
c.g.a.g.example.WhateverIntercepted$1.call(WhateverIntercepted.java:21)
c.g.a.g.Interception.proceed(Interception.java:32)
c.g.a.g.example.LoggerInterceptor.intercept(LoggerInterceptor.java:18)
c.g.a.g.InterceptorCallable.call(InterceptorCallable.java:27)
c.g.a.g.Interception.proceed(Interception.java:32)
c.g.a.g.example.TransactionInterceptor.intercept(TransactionInterceptor.java:10)
c.g.a.g.InterceptorCallable.call(InterceptorCallable.java:27)
c.g.a.g.example.WhateverIntercepted.doWhatever(WhateverIntercepted.java:35)
FAQs
An annotation processor that creates decorators.
We found that com.github.andrasbeni:giftwrap-parent demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.