Skip to content
This repository has been archived by the owner on Apr 25, 2019. It is now read-only.

Error while starting metasploit #1255

Open
GetRektBoy724 opened this issue Feb 11, 2019 · 2 comments
Open

Error while starting metasploit #1255

GetRektBoy724 opened this issue Feb 11, 2019 · 2 comments

Comments

@GetRektBoy724
Copy link

Device:

OS version (KitKat/Lollipop/Marshmallow/Nougat):

Lollipop

Built from repo (date and build command) or downloaded from website (links):

Output of cat /proc/version in adb shell or NetHunter Terminal:

Issue:

While i start msfconsole
Its comes up with this
Last login: Mon Feb 11 08:31:08 UTC 2019 on pts/2
Linux kali 3.10.49-4815461 #1 SMP PREEMPT Fri May 22 13:30:31 KST 2015 armv7l

The programs included with the Kali GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Kali GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@kali:~# nano

root@kali:# ls
root@kali:
# ls
persistance.sh persistance.sh.bak
root@kali:# nano persistance.sh
root@kali:
# ls
persistance.sh persistance.sh.bak
root@kali:# msfconsole
/usr/share/metasploit-framework/lib/msf/core/payload/dalvik.rb:72:in not_after=': bignum too big to convert into long' (RangeError)
from /usr/share/metasploit-framework/lib/msf/core/payload/dalvik.rb:72:in generate_cert' from /usr/share/metasploit-framework/modules/payloads/stagers/android/reverse_tcp.rb:54:in generate_jar'
from /usr/share/metasploit-framework/lib/msf/core/payload/dalvik.rb:27:in generate' from /usr/share/metasploit-framework/lib/msf/core/payload.rb:200:in size'
from /usr/share/metasploit-framework/lib/msf/core/payload_set.rb:158:in block (2 levels) in recalculate' from /usr/share/metasploit-framework/lib/msf/core/payload_set.rb:102:in each_pair'
from /usr/share/metasploit-framework/lib/msf/core/payload_set.rb:102:in block in recalculate' from /usr/share/metasploit-framework/lib/msf/core/payload_set.rb:98:in each_pair'
from /usr/share/metasploit-framework/lib/msf/core/payload_set.rb:98:in recalculate' from /usr/share/metasploit-framework/lib/msf/core/modules/loader/base.rb:276:in block in load_modules'
from /usr/share/metasploit-framework/lib/msf/core/modules/loader/base.rb:273:in each' from /usr/share/metasploit-framework/lib/msf/core/modules/loader/base.rb:273:in load_modules'
from /usr/share/metasploit-framework/lib/msf/core/module_manager/loading.rb:117:in block in load_modules' from /usr/share/metasploit-framework/lib/msf/core/module_manager/loading.rb:115:in each'
from /usr/share/metasploit-framework/lib/msf/core/module_manager/loading.rb:115:in load_modules' from /usr/share/metasploit-framework/lib/msf/core/module_manager/module_paths.rb:41:in block in add_module_path'
from /usr/share/metasploit-framework/lib/msf/core/module_manager/module_paths.rb:40:in each' from /usr/share/metasploit-framework/lib/msf/core/module_manager/module_paths.rb:40:in add_module_path'
from /usr/share/metasploit-framework/lib/msf/base/simple/framework/module_paths.rb:50:in block in init_module_paths' from /usr/share/metasploit-framework/lib/msf/base/simple/framework/module_paths.rb:49:in each'
from /usr/share/metasploit-framework/lib/msf/base/simple/framework/module_paths.rb:49:in init_module_paths' from /usr/share/metasploit-framework/lib/msf/ui/console/driver.rb:212:in initialize'
from /usr/share/metasploit-framework/lib/metasploit/framework/command/console.rb:62:in new' from /usr/share/metasploit-framework/lib/metasploit/framework/command/console.rb:62:in driver'
from /usr/share/metasploit-framework/lib/metasploit/framework/command/console.rb:48:in start' from /usr/share/metasploit-framework/lib/metasploit/framework/command/base.rb:82:in start'
from /usr/bin/msfconsole:48:in <main> root@kali:~# msfconsole /usr/share/metasploit-framework/lib/msf/core/payload/dalvik.rb:72:in not_after=': bignum too big to convert into long' (RangeError) from /usr/share/metasploit-framework/lib/msf/core/payload/dalvik.rb:72:in generate_cert'
from /usr/share/metasploit-framework/modules/payloads/stagers/android/reverse_https.rb:64:in generate_jar' from /usr/share/metasploit-framework/lib/msf/core/payload/dalvik.rb:27:in generate'
from /usr/share/metasploit-framework/lib/msf/core/payload.rb:200:in size' from /usr/share/metasploit-framework/lib/msf/core/payload_set.rb:158:in block (2 levels) in recalculate'
from /usr/share/metasploit-framework/lib/msf/core/payload_set.rb:102:in each_pair' from /usr/share/metasploit-framework/lib/msf/core/payload_set.rb:102:in block in recalculate'
from /usr/share/metasploit-framework/lib/msf/core/payload_set.rb:98:in each_pair' from /usr/share/metasploit-framework/lib/msf/core/payload_set.rb:98:in recalculate'
root@kali:
# msfconsole
/usr/share/metasploit-framework/lib/msf/core/payload/dalvik.rb:72:in not_after=': bignum too big to convert into long' (RangeError)
from /usr/share/metasploit-framework/lib/msf/core/payload/dalvik.rb:72:in generate_cert' from /usr/share/metasploit-framework/modules/payloads/stagers/android/reverse_https.rb:64:in generate_jar'
from /usr/share/metasploit-framework/lib/msf/core/payload/dalvik.rb:27:in generate' from /usr/share/metasploit-framework/lib/msf/core/payload.rb:200:in size'
from /usr/share/metasploit-framework/lib/msf/core/payload_set.rb:158:in block (2 levels) in recalculate' from /usr/share/metasploit-framework/lib/msf/core/payload_set.rb:102:in each_pair'
from /usr/share/metasploit-framework/lib/msf/core/payload_set.rb:102:in block in recalculate' from /usr/share/metasploit-framework/lib/msf/core/payload_set.rb:98:in each_pair'
from /usr/share/metasploit-framework/lib/msf/core/payload_set.rb:98:in recalculate' from /usr/share/metasploit-framework/lib/msf/core/modules/loader/base.rb:276:in block in load_modules'
from /usr/share/metasploit-framework/lib/msf/core/modules/loader/base.rb:273:in each' from /usr/share/metasploit-framework/lib/msf/core/modules/loader/base.rb:273:in load_modules'
from /usr/share/metasploit-framework/lib/msf/core/module_manager/loading.rb:117:in block in load_modules' from /usr/share/metasploit-framework/lib/msf/core/module_manager/loading.rb:115:in each'
from /usr/share/metasploit-framework/lib/msf/core/module_manager/loading.rb:115:in load_modules' from /usr/share/metasploit-framework/lib/msf/core/module_manager/module_paths.rb:41:in block in add_module_path'
from /usr/share/metasploit-framework/lib/msf/core/module_manager/module_paths.rb:40:in each' from /usr/share/metasploit-framework/lib/msf/core/module_manager/module_paths.rb:40:in add_module_path'
from /usr/share/metasploit-framework/lib/msf/base/simple/framework/module_paths.rb:50:in block in init_module_paths' from /usr/share/metasploit-framework/lib/msf/base/simple/framework/module_paths.rb:49:in each'
from /usr/share/metasploit-framework/lib/msf/base/simple/framework/module_paths.rb:49:in init_module_paths' from /usr/share/metasploit-framework/lib/msf/ui/console/driver.rb:212:in initialize'
from /usr/share/metasploit-framework/lib/metasploit/framework/command/console.rb:62:in new' from /usr/share/metasploit-framework/lib/metasploit/framework/command/console.rb:62:in driver'
from /usr/share/metasploit-framework/lib/metasploit/framework/command/console.rb:48:in start' from /usr/share/metasploit-framework/lib/metasploit/framework/command/base.rb:82:in start'
from /usr/bin/msfconsole:48:in `

'
root@kali:~#

@GetRektBoy724
Copy link
Author

My metasploit is latest version

@5trohm
Copy link

5trohm commented Mar 19, 2019

/usr/share/metasploit-framework/lib/msf/core/payload/dalvik.rb:72:in not_after=': bignum too big to convert into long' (RangeError)
After trying the install uninstall reinstall foolishness I finally edited the file:
/usr/share/metasploit-framework/lib/msf/core/payload/android.rb

I changed the following line:
#cert.not_after = cert.not_before + 36002436520 # 20 years (old)
cert.not_after = cert.not_before + 3600243652 # 2 years

i changed the 20 years to 15 and its just working fine

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

No branches or pull requests

2 participants