kensh1ro / dart-shellcode Goto Github PK
View Code? Open in Web Editor NEWA PoC executing shellcode in Dart
A PoC executing shellcode in Dart
I'm trying to compile this with dart compile exe code2.dart
and got the following error.
code2.dart:40:32: Error: Can't create typedef from non-function type.
typedef LPTHREAD_START_ROUTINE = Pointer<NativeFunction<PTHREAD_START_ROUTINE>>;
^
code2.dart:44:3: Error: Fields can't be declared to be 'external'.
Try removing the keyword 'external', or replacing the field by an external getter and/or setter.
external int nLength;
^^^^^^^^
code2.dart:45:3: Error: Fields can't be declared to be 'external'.
Try removing the keyword 'external', or replacing the field by an external getter and/or setter.
external Pointer lpSecurityDescriptor;
^^^^^^^^
code2.dart:47:3: Error: Fields can't be declared to be 'external'.
Try removing the keyword 'external', or replacing the field by an external getter and/or setter.
external int bInheritHandle;
^^^^^^^^
code2.dart:77:35: Error: Expected type 'NativeFunction<IntPtr Function(Pointer<SECURITY_ATTRIBUTES>, IntPtr, invalid-type, Pointer<NativeType>, Uint32, Pointer<Uint32>)>' to be a valid and instantiated subtype of 'NativeType'.
- 'NativeFunction' is from 'dart:ffi'.
- 'IntPtr' is from 'dart:ffi'.
- 'Pointer' is from 'dart:ffi'.
- 'SECURITY_ATTRIBUTES' is from 'code2.dart'.
- 'NativeType' is from 'dart:ffi'.
- 'Uint32' is from 'dart:ffi'.
final _CreateThread = _kernel32.lookupFunction<
I'm using Dart SDK v2.13.0 and ffi v1.2.1
I tried to run it on Windows 2008 R2, but it failed. After installing VC++ runtime, it can run successfully.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.