Commit Graph

102 Commits

Author SHA1 Message Date
imre.agent
4e4046f093 chore: remove developer backup cruft from the source tree
Stray .old/.orig/.new developer backups (com_showroom uploadgroup,
jckman restorers/toolbar, maintenance2 tips.php) do not belong in a
clean baseline source — they are not deployed code and would only add
noise to the baseline. Remove them at the source rather than filtering
them in build-baseline.sh (the source is the right place to fix this).

The cadline/backend/maintenance SUBMODULE (maintenance.git) also holds
a tips.php.orig — that must be removed in the submodule repo separately.

Ref: cadline/infra#180
2026-07-22 08:16:02 +02:00
974beee429 Merge pull request 'chore: normalize line endings to LF per .gitattributes + bump backend submodules' (#7) from chore/lf-normalization into main
Reviewed-on: #7
2026-07-21 19:30:00 +02:00
846a6cdb6a chore(submodules): bump backend submodules to 2026-07-17 state 2026-07-21 18:49:51 +02:00
a7dc9bcfab chore: renormalize stored line endings to LF per .gitattributes 2026-07-21 18:46:11 +02:00
8318cae110 chore(submodules): bump backend submodules to 2026-07-17 state 2026-07-21 18:38:59 +02:00
f8ed190894 Merge pull request 'Add .gitattributes: force LF line-endings for deterministic baseline' (#5) from add-gitattributes into main
Reviewed-on: #5
2026-07-19 18:59:57 +02:00
f0e578aa8a Add .gitattributes: force LF line-endings for deterministic baseline
Without .gitattributes the checkout line-endings depend on the build
host's core.autocrlf. On the tanis host this produced CRLF: build-baseline.sh
died with `bash\r`, and a CRLF build tree would break the baseline-diff
byte-match. Pin `* text=auto eol=lf` so the source-of-truth LF is
authoritative regardless of client config; binary assets stay byte-exact.

Assisted-by: claude-code@claude-opus-4-8
2026-07-19 18:37:41 +02:00
68c1e4555f Merge pull request 'fix(helix3): restore live customization to baseline, drop cloaking backdoor' (#4) from fix/helix3-customization into main
Reviewed-on: #4
Reviewed-by: Imre Lázár <imre@illusion.hu>
2026-07-19 13:34:32 +02:00
c7a22428e5 fix(helix3): restore live customization to baseline, drop cloaking backdoor
deployed/helix3 held only a minimal 227-line variant, missing the live
docroot customization (Google Analytics gtag, warehouse-menu logic,
HTTP_HOST domain branches) — so the malware-remediation restore stripped
these from the live site. Replace with the byte-exact live version (792
lines) with the seo-cloaking backdoor line (google-UA C2 exfil) removed.

Assisted-by: claude-code@claude-opus-4-8
2026-07-19 13:13:23 +02:00
9fef8645a5 Merge pull request 'docs: document the repo as a multi-site baseline generator (README + AGENTS.md)' (#3) from docs/readme-agents into main
Reviewed-on: #3
2026-07-18 17:26:21 +02:00
e60b81f085 docs: document the repo as a multi-site baseline generator
The repo now carries more than one site: main holds www.archline.hu and
site/archlinexp.eu holds the eu site, both driven by the same
site-agnostic generator. README.md still described a single-site repo.

Rewrite README.md around the actual model: one branch per site, the
baseline's dual role (known-good reference for the HIDS diff AND the
deployment source of truth), the verify-before-you-trust rule, and why a
customized core file must never be taken from live (the updater skips
customized files, so live silently keeps a stale base -- the eu site ran
a 3.9.2 version string over pre-3.8.13 com_users code).

Add AGENTS.md for automated agents: the cardinal never-build-from-an-
infected-tree rule, the mandatory post-build checklist (YARA, IOC paths,
disguise sweep, the structural core-namespace rule that caught what YARA
missed, core version assertion), the repository boundary, commit rules
and layer semantics.

Assisted-by: claude-code@claude-opus-4-8
2026-07-17 12:52:40 +02:00
5603690a72 security: purge planted malware from baseline + content-based IOC filter
The "clean" baseline unintentionally shipped ~34 planted webshells/backdoors
plus sbtrack (a third-party SEO-cloaking proxy) and inert scanner probes,
carried in from the vetted-live Helix3 template. They survived because the IOC
safety net keyed on extension ('*.php.json') while the attacker disguised one
webshell under ~20 fake extensions (.inc.json/.phar.json/.php[3-5].json/
.php.json.json) plus plain-.json defacements.

- History rewritten (git filter-repo) to remove all 48 files from every commit.
- build-baseline.sh step 6 is now CONTENT-based: any templates/**/*.json with a
  PHP open tag is dropped (legit Helix3 presets are pure JSON).
- malware-iocs.paths extended with plain-.json defacements, probe artifacts and
  non-.json droppers a content grep cannot key on.

Found by the imrcli HIDS YARA union layer during baseline integration (the
baseline-diff alone would have marked them baseline-match).

Assisted-by: claude-code@claude-opus-4-8
2026-07-16 15:21:49 +02:00
9a585c1439 Merge pull request 'www.archline.hu — clean post-compromise baseline' (#2) from baseline/47 into main
Reviewed-on: #2
2026-07-16 14:40:36 +02:00
8282cd9d9c chore(build): drop unused JMAP variable
jmap.py is an authoring-only tool and is not invoked at build time; remove the
dead variable so the script matches the README.

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 13:58:28 +02:00
800b4932d1 docs(readme): clear build guide for the HIDS/verifier side
Front-and-center, runnable steps to produce the baseline: clone
--recurse-submodules, run ./build-baseline.sh, use out/ as the vanilla_ref.
Documents prerequisites (no PHP/network; jmap.py is authoring-only), what out/
contains/excludes, the update workflow (submodule update --remote + rebuild),
and the current common_cadline_libraries/maintenance divergence.

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 13:57:47 +02:00
74b12145f2 fix(build): anchor data-dir excludes to root
--exclude='cache/' matched any nested dir named cache (e.g. core
com_cache/views/cache/); anchor cache/tmp/logs/images excludes to the docroot
root so only runtime-data top-level dirs are dropped. Non-malware code residual
now 0 (remaining residual is excluded malware + scan artifacts).

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 13:50:51 +02:00
62bb645679 build(baseline): use submodule content as-is (authoritative), no LF normalize
Live has mixed CRLF/LF and content drift vs the submodule HEADs, so normalizing
would break the currently-matching files. The baseline reflects the authoritative
developer repos; line-ending handling is a verifier concern.

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 13:49:14 +02:00
efefce3fd8 feat(cadline): convert common_cadline_libraries + maintenance to submodules
The developer-controlled Cadline repos (cadcommonlib, maintenance) become git
submodules so updates flow through: git submodule update --remote -> build ->
commit new pointers. Pinned to their authoritative HEADs. build-baseline.sh
inits the submodules and normalizes their CRLF to LF (the deploy transform) so
the assembled baseline byte-matches the deployed form. constants.php (live-only
config, not in the repo; carries a DB credential tracked in the credential
inventory) is kept as an overlay (overrides/) per instruction — removal happens
at source later.

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 13:47:32 +02:00
e17c6268c5 docs: remove operator-internal (git.illusion.hu) references
This repo lives on the customer Gitea (git.cadline.hu); drop references to the
operator's internal Gitea repos (audit/incident tracker, HIDS verifier) and
describe those generically instead.

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 12:14:05 +02:00
00f856ccbb docs(runbook): record final model and verification result
Note the byte-fidelity decisions (cadcommonlib/maintenance as live files not
submodules; public/ excluded as data) and the verification outcome (out/ =
23,578 files, non-malware code residual = 0).

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 11:42:09 +02:00
4fa771286f build(baseline): finalize generator (packages as deployed, overrides as files)
build-baseline.sh: packages/*/ placed as deployed-layout (reconciled to live
bytes at commit-authoring; jmap authors the pristine commit), overrides/ overlaid
as live files. Final out/ = 23578 clean code files; verified against live:
non-malware code residual = 0 (all residual is excluded malware + scan artifacts).

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 11:41:04 +02:00
4168b737cc feat(baseline): add remaining legit files (postupdate, isis js, windwalker cli, sbtrack)
Completeness: administrator/postupdate.php + isis/js/_template.js (clean core
files absent from the downloaded package), bin/windwalker (Windwalker CLI),
sbtrack.php (Cadline tracking docroot PHP). All vetted malware-free.

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 11:40:36 +02:00
2dd018c729 feat(cadline): add com_users Cadline additions (recaptcha, easyprofile)
Cadline/JSN additions to com_users: recaptchalib.php (anti-spam), easyprofile.php views (JSN EasyProfile) — only-in-live files not caught by the core-override diff.

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 11:39:03 +02:00
750e3a23e1 feat(deployed): add Advanced Modules site component (completeness)
components/com_advancedmodules (RegularLabs) frontend — completes the module.

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 11:39:02 +02:00
6be21235f1 feat(deployed): add Akeeba site component (completeness)
components/com_akeeba (frontend) — the admin side was added earlier; this completes the module.

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 11:39:02 +02:00
acc3c3df17 feat(overrides): add legit core template files missing from package
beez3 css/js/language + system modal.php/template.php present on live but absent from the downloaded package build; clean core template files.

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 11:39:02 +02:00
8067654629 feat(deployed): add shared language, vendor libs, manifests
Cross-extension shared code the baseline was missing: en-GB/hu-HU language (admin+site), libraries/vendor (Composer deps), administrator/manifests (installed-extension metadata). Malware-ext entries and scan artifacts excluded.

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 11:39:01 +02:00
82dd7d89d8 feat(cadline): add Cadline docroot apps + root PHPs
Docroot sub-apps beiratkozas/, iskolak/, phpext/; root PHPs crashadmin.php, crm_hardlock.class.php, login-external.php, tips.php, recaptchalib.php, configuration.php (74-byte MightySites multi-site stub, legit). public/ excluded (user data, ~219k files).

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 11:34:31 +02:00
edb18f07b5 feat(cadline): add common_cadline_libraries + maintenance backend
common_cadline_libraries (CRM hardlock/db/users classes; upstream cadline_web/cadcommonlib), maintenance/ (ARCHLine.XP license backend; upstream cadline_web/maintenance), maintenance2/. Vetted live files (byte-truth); upstream repos in PROVENANCE.md. NOTE: could be git submodules — kept as live files for byte-fidelity.

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 11:34:30 +02:00
6d8bae854b feat(cadline): add Cadline plugin + templates
plg content/workshopdates; templates blankframe, category. Dropped Tiny File Manager backdoor (templates/category/tiny.php) excluded.

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 11:34:30 +02:00
7012528980 feat(cadline): add Cadline-own modules
11 Cadline-only modules (mod_al_*, mod_alusers, mod_alworkshops, mod_course_list, mod_webinar*, mod_wsregister). Dropped webshells excluded (mod_al_upload/b8.php, mod_course_list/a1.php); legit module bases kept.

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 11:34:30 +02:00
72e39873c0 feat(cadline): add Cadline-own components
9 Cadline-only components (no public upstream): showroom, albanner, alworkshops, followedlinks, nonprofit, presentation, project, tcexam, versions. Vetted live files.

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 11:34:29 +02:00
9d7dbafbec feat(overrides): add Cadline core modifications (live versions)
The ~24 legit Cadline customizations on the Joomla core (audit sec.16.1):
reCAPTCHA anti-spam (registration/reset/remind/login flow, captcha rule),
content view tweaks, mod_login template, phpversioncheck. build-baseline.sh
overlays these live versions onto the official-package core so the baseline
matches live for the legit mods, while the 3 trojanized core files stay clean.
NOTE: com_users/controllers/registration.php carries a hardcoded reCAPTCHA
secret (redacted; rotate on cleanup) — see malware-iocs.md.

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 11:32:07 +02:00
47853a8fe6 feat(pkg): add Phoca Commander 3.0.2 (vetted live, stock)
Phoca Commander 3.0.2 (github.com/PhocaCz/PhocaCommander @3.0.2), vetted clean, stock admin file-manager; live deployed files.

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 11:30:03 +02:00
79ad04f644 feat(pkg): add RemoteImage 2.0.10 (vetted live, stock)
RemoteImage 2.0.10 (github.com/asikart/remoteimage @2.0.10), vetted clean, stock; live deployed files (upstream ships build-layout — deployed bytes used for verification).

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 11:30:02 +02:00
511331a97f feat(pkg): reconcile Easy File Uploader to live (Cadline delta)
Reconcile to live bytes. Diff vs pristine = Cadline modification (ARCHLine.XP 2024 Rendering contest upload form, ~3 files) + version drift/line-endings.

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 11:30:02 +02:00
b5e99fdf47 feat(pkg): add Easy File Uploader (pristine upstream)
Pristine Easy File Uploader manifest-mapped from github.com/ollily/easyfileuploader via lib/jmap.py (upstream master; installed 2.7.8).

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 11:30:02 +02:00
9ad18f2d14 feat(pkg): reconcile Phoca Download to live (Cadline delta)
Reconcile to live bytes. Diff vs pristine = Cadline modifications (trial-download flow, Hungarian routes, DB query — ~10 files per audit) + line-endings/install files.

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 11:30:02 +02:00
2563f54f83 feat(pkg): add Phoca Download 3.1.2 (pristine upstream)
Pristine Phoca Download 3.1.2 manifest-mapped from github.com/PhocaCz/PhocaDownload @3.1.2 via lib/jmap.py.

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 11:30:01 +02:00
556dd4cdc0 feat(pkg): reconcile OneAll to live bytes (Cadline CRM delta)
Reconcile to the vetted live deployed files (byte-truth for HIDS verification). The diff vs the previous commit is the full delta from pristine upstream: line-endings, Joomla-deployed install files, and the Cadline CRM integration in the system plugin (+ default.php blankframe branch). Vetted malware-free; SQLi code-quality follow-up noted in PROVENANCE.md.

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 11:29:08 +02:00
a32ef4a815 feat(pkg): add OneAll Social Login 5.5.0 (pristine upstream)
Pristine OneAll 5.5.0 manifest-mapped from github.com/oneall/social-login-joomla @5.5.0 via lib/jmap.py to deployed layout. The next commit reconciles to the live bytes; the diff is the full delta vs upstream (line-endings + install files + Cadline CRM modification).

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 11:29:07 +02:00
a9eeddbc3b build(baseline): add lib/jmap.py Joomla manifest-mapper + tests
Generic Joomla 3.x manifest -> deployed-path mapper (component/module/plugin/
library/template/package), used to author the pristine (upstream) commit of a
packages/<slug> module before it is reconciled to the live bytes. 18/18 tests
green; ruff/mypy-strict clean.

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 11:27:45 +02:00
e905b51c4e feat(deployed): add trada template 1.0 (no-source, vetted live)
trada template (saihoai); the dropped webshell html/mod_articles_category/meant.php is excluded; unmapped -> deployed files.

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 11:24:53 +02:00
3a45537dfe feat(deployed): add _theme3037 template 3.0 (no-source, vetted live)
_theme3037 template (TemplateMonster.com); unmapped -> deployed files.

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 11:24:53 +02:00
d3e7422d2d feat(deployed): add XEF library 1.4.4 (no-source, vetted live)
XEF library (Parvez Akther); unmapped -> deployed files.

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 11:24:53 +02:00
f6bac67e3a feat(deployed): add P3P plugin (no-source, vetted live)
P3P system plugin (Joomla! Project label, no manifest version); unmapped -> deployed files.

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 11:24:53 +02:00
ccc70a13de feat(deployed): add TM Lazy Load 1.2.1 (no-source, vetted live)
TM Lazy Load system plugin (Template Monster); unmapped -> deployed files.

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 11:24:53 +02:00
dc45f5f5aa feat(deployed): add ExtBlank 1.0 (no-source, vetted live)
ExtBlank system plugin (Convergence Services); unmapped -> deployed files.

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 11:24:52 +02:00
51499123fb feat(deployed): add EU Cookie Directive Lite 1.1.1 (no-source, vetted live)
EU Cookie Directive Lite system plugin (Channel Digital); unmapped -> deployed files.

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 11:24:52 +02:00
9c29c2ea3e feat(deployed): add MooTable 1.1.3 (no-source, vetted live)
MooTable system plugin (Roberto Segura); unmapped -> deployed files.

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 11:24:52 +02:00