• XSS.stack #1 – первый литературный журнал от юзеров форума

вопрос по opencart

jimbooo2000

(L3) cache
Пользователь
Регистрация
29.10.2022
Сообщения
166
Реакции
10
Подскажите, можно ли залить шелл в opencart админку? Все права есть. Версия 3.0.3.7
Если можно - поделитесь своими знаниями. Заранее спасибо
В случае успеха готов отблагодарить.
 
Последнее редактирование:
Пожалуйста, обратите внимание, что пользователь заблокирован
Последнее редактирование:
Tell me, is it possible to upload a shell to the opencart admin panel? All rights are there. Version 3.0.3.7
If possible, please share your knowledge. Thanks in advance.
In case of success, I am ready to thank you.
There are multiple ways in uploading shells to opencart, best one is thru extensions. If nothing that you find works, use gpt 4 and make yourself an extension that will allow you file upload, or inject the shell directly into the extension itself. It is pretty simple to have your own extension done, give it a try.

I have created a quick extension it, did not test it tough, here is how it goes :

Controller File (file_upload.php):
PHP:
<?php
class ControllerExtensionModuleFileUpload extends Controller {
    private $error = array();

    public function index() {
        $this->load->language('extension/module/file_upload');
        $this->document->setTitle($this->language->get('heading_title'));
        $this->load->model('setting/setting');

        if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
            $this->model_setting_setting->editSetting('file_upload', $this->request->post);
            $this->session->data['success'] = $this->language->get('text_success');
            $this->response->redirect($this->url->link('marketplace/extension', 'user_token=' . $this->session->data['user_token'], true));
        }

        $data['heading_title'] = $this->language->get('heading_title');
        $data['text_edit'] = $this->language->get('text_edit');
        $data['entry_status'] = $this->language->get('entry_status');
        $data['button_save'] = $this->language->get('button_save');
        $data['button_cancel'] = $this->language->get('button_cancel');

        if (isset($this->error['warning'])) {
            $data['error_warning'] = $this->error['warning'];
        } else {
            $data['error_warning'] = '';
        }

        $data['breadcrumbs'] = array();
        $data['breadcrumbs'][] = array(
            'text' => $this->language->get('text_home'),
            'href' => $this->url->link('common/dashboard', 'user_token=' . $this->session->data['user_token'], true)
        );
        $data['breadcrumbs'][] = array(
            'text' => $this->language->get('text_extension'),
            'href' => $this->url->link('marketplace/extension', 'user_token=' . $this->session->data['user_token'], true)
        );
        $data['breadcrumbs'][] = array(
            'text' => $this->language->get('heading_title'),
            'href' => $this->url->link('extension/module/file_upload', 'user_token=' . $this->session->data['user_token'], true)
        );

        $data['action'] = $this->url->link('extension/module/file_upload', 'user_token=' . $this->session->data['user_token'], true);
        $data['cancel'] = $this->url->link('marketplace/extension', 'user_token=' . $this->session->data['user_token'], true);

        if (isset($this->request->post['file_upload_status'])) {
            $data['file_upload_status'] = $this->request->post['file_upload_status'];
        } else {
            $data['file_upload_status'] = $this->config->get('file_upload_status');
        }

        $data['header'] = $this->load->controller('common/header');
        $data['column_left'] = $this->load->controller('common/column_left');
        $data['footer'] = $this->load->controller('common/footer');

        $this->response->setOutput($this->load->view('extension/module/file_upload', $data));
    }

    protected function validate() {
        if (!$this->user->hasPermission('modify', 'extension/module/file_upload')) {
            $this->error['warning'] = $this->language->get('error_permission');
        }

        return !$this->error;
    }
}



Language File (file_upload.php):
PHP:
<?php
// Heading
$_['heading_title']    = 'File Upload';

// Text
$_['text_extension']   = 'Extensions';
$_['text_success']     = 'Success: You have modified the file upload module!';
$_['text_edit']        = 'Edit File Upload Module';

// Entry
$_['entry_status']     = 'Status';

// Error
$_['error_permission'] = 'Warning: You do not have permission to modify the file upload module!';

Template File (file_upload.twig):
PHP:
{{ header }}
{{ column_left }}
<div id="content">
    <div class="page-header">
        <div class="container-fluid">
            <div class="pull-right">
                <button type="submit" form="form-file-upload" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-save"></i></button>
                <a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a>
            </div>
            <h1>{{ heading_title }}</h1>
            <ul class="breadcrumb">
                {% for breadcrumb in breadcrumbs %}
                <li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
                {% endfor %}
            </ul>
        </div>
    </div>
    <div class="container-fluid">
        {% if error_warning %}
        <div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
            <button type="button" class="close" data-dismiss="alert">&times;</button>
        </div>
        {% endif %}
        {% if success %}
        <div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> {{ success }}
            <button type="button" class="close" data-dismiss="alert">&times;</button>
        </div>
        {% endif %}
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_edit }}</h3>
            </div>
            <div class="panel-body">
                <form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-file-upload" class="form-horizontal">
                    <div class="form-group">
                        <label class="col-sm-2 control-label" for="input-status">{{ entry_status }}</label>
                        <div class="col-sm-10">
                            <select name="file_upload_status" id="input-status" class="form-control">
                                {% if file_upload_status %}
                                <option value="1" selected="selected">{{ text_enabled }}</option>
                                <option value="0">{{ text_disabled }}</option>
                                {% else %}
                                <option value="1">{{ text_enabled }}</option>
                                <option value="0" selected="selected">{{ text_disabled }}</option>
                                {% endif %}
                            </select>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{{ footer }}

install.xml:
XML:
<?xml version="1.0" encoding="utf-8"?>
<modification>
    <name>File Upload Module</name>
    <code>file_upload</code>
    <version>1.0</version>
    <author>Your Name</author>
    <link>http://yourwebsite.com</link>
    <file path="catalog/controller/common/header.php">
        <!-- Add your modifications here if any -->
    </file>
</modification>

Directory Structure:
SQL:
upload/
└── admin/
    ├── controller/
    │   └── extension/
    │       └── module/
    │           └── file_upload.php
    ├── language/
    │   └── en-gb/
    │       └── extension/
    │           └── module/
    │               └── file_upload.php
    └── view/
        └── template/
            └── extension/
                └── module/
                    └── file_upload.twig
install.xml
 

Вложения

  • file_upload_extension.zip
    7 КБ · Просмотры: 20
Последнее редактирование:
Да просто скачай любой плагин для opencart, добавь в него свой файл с шеллом и и установи из админки, всё
да, с WP так и работает обычно.
 
да, с WP так и работает обычно.
С вп проще код шела в страницу 404 засунуть, а потом перезалиться куда надо , а страницу 404 вернуть в исходное состояние
 
подскажите какой шелл из паблик вариантов сейчас актуальнее? на wso уже любая система ругается ..
на wso накрытое паблик обфсукатором без слез не взглянешь
 
подскажите кто не посредственно заливался в Opencart Version 1.5.x ? Если с 2.x 3.х примерно все понятно, но с 1.5 такие старые видео не по одному ниче не вышло то эррор лог не меняется в пхп, да и не понятно что туда потом импортировать, поскажите или сюда или в личку, кто какой проверенный способ испольсует. Спасибо !
 


Напишите ответ...
  • Вставить:
Прикрепить файлы
Верх